Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.0b5

Bug #7081 Cannot access sequences from other databases
Submitted: 2006-03-09 20:11 UTC
From: cow at neondragon dot net Assigned: lsmith
Status: Closed Package: MDB2 (version 2.0.0)
PHP Version: 4.4.2 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2006-03-09 20:11 UTC] cow at neondragon dot net (Cow)
Description: ------------ In PEAR::DB, it was possible to access sequences from other databases in a script like this: $userid = $db->nextId("database.sequence"); In MDB2, it gives the following error: Error message: nextID: on demand sequence database.sequence could not be created This is annoying because I use the table name as the sequence name. A lot of the time, the user table may be called from another database. Using MySQL driver. Test script: --------------- <?php print_r($db->nextId("database.sequence")); ?> Expected result: ---------------- Sequence should function as expected using table in specified database. Actual result: -------------- Error message: nextID: on demand sequence database.sequence could not be created

Comments

 [2006-03-09 20:14 UTC] cow at neondragon dot net
I should add that it seems like I'm getting Error message: nextID: on demand sequence database.sequence could not be created
 [2006-03-09 20:16 UTC] cow at neondragon dot net
I should add that it seems like I'm getting the following error message because of a permission error. Error message: nextID: on demand sequence database.sequence could not be created More accurately, PEAR::MDB2 treats database.sequence as database_sequence and creates a database_sequence_seq table rather than using sequence_seq in the database named database.
 [2006-03-09 23:15 UTC] lsmith
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.