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

Bug #8270 Nested transaction raise an error with the MySQL and Schema module
Submitted: 2006-07-23 21:02 UTC
From: christian_rocher at hotmail dot com Assigned:
Status: No Feedback Package: MDB2
PHP Version: 5.1.4 OS: WinXP
Roadmaps: (Not assigned)    

 [2006-07-23 21:02 UTC] christian_rocher at hotmail dot com (Christian Rocher)
Description: ------------ I use the Schema module to create/upgrate my databse schema. Since this version of MDB2 I get an error: ".\pear\MDB2.php line 1801 - Call to undefined function: MDB2_Driver_mysql::beginNestedTransaction()." My workarround is to force the support of transactions to false as soon as I'm connected: $Schema->connect( $DBConnection); $Schema->db->supported[transactions] = false; Test script: --------------- $DBConnection =& MDB2::factory( $DSN, $DSN_Options); $Schema =& $DBConnection->loadModule( 'Schema', null, true); if ( PEAR::isError( $Schema)) { return $Schema; } $Schema->connect( $DBConnection); Expected result: ---------------- Successful connected Actual result: -------------- ".\pear\MDB2.php line 1801 - Call to undefined function: MDB2_Driver_mysql::beginNestedTransaction()."


 [2006-07-23 21:05 UTC] lsmith (Lukas Smith)
Err this issue sounds rather peculiar. In the 2.2.0 version of MDB2.php there is no call to beginNestedTransaction() on line 1801. Did you use the pear installer to update MDB2_Schema and your MySQL driver for MDB2?
 [2006-07-24 09:17 UTC] lsmith (Lukas Smith)
I just looked at your code example again. You are loading MDB2_Schema incorrectly. MDB2::loadFile('Schema'); $schema =& new MDB2_Schema::factory($dsn, $options);
 [2006-07-30 17:27 UTC] christian_rocher at hotmail dot com
Hi, This is my mistake, I tried to reduce the code I added in this bug. You're right, my sample is not valid. To be sure I tried with your code and the behaviour is unchanged (error): MDB2::loadFile('Schema'); $schema =& new MDB2_Schema::factory($dsn, $options); if ( PEAR::isError( $Schema))return $Schema; $Result = $Schema->updateDatabase( $Database); $Result = $Schema->updateDatabase( $Database1); $Result = $Schema->updateDatabase( $Database2); I have three variables to define my schema, I divided it by logical modules. I found that the first call to updateDatabase works fine, but the next raise the error. Thus, I merge all my dictionaries runtime to call updateDatabase only one time.
 [2006-07-30 19:21 UTC] lsmith (Lukas Smith)
Which verion of MySQL are you using? Are you using the mysql or mysqli driver?
 [2006-08-11 14:04 UTC] lsmith (Lukas Smith)
Ok, you are obviously using the mysql driver. Could you send me the schema files? I tried to reproduce the issue but when I used 3 simple schema files I was not able to reproduce the error.
 [2006-08-19 19:02 UTC] lsmith (Lukas Smith)
I am getting ready to make the next MDB2 release. Could you please provide some feedback? I would really like to get any issues resolved.
 [2006-09-08 01:38 UTC] anderson at tsci dot com dot br (Anderson Alipio)
I'm having the same error whith ibase driver, it was working fine with MDB, but I just updated my OS(Fedora 5) with PHP5.1.4-1 and MDB2. At first, the funtion fetchInto() was not working, then i found something saing that it was replaced by fetchRow(), but the error is the same: "PHP Fatal error: Call to undefined function: MDB2_Driver_ibase::fetchRow(). in /usr/share/pear/MDB2.php on line 1917" here is my code(the line where the problem is I guess): $result = $this->db->query($sql); while ($row = $this->db->fetchRow($result,MDB2_FETCHMODE_ASSOC) ) { in MDB this line look like this: $result = $this->db->query($sql); while ($row = $this->$db->fetchInto(MDB_FETCHMODE_ASSOC,$result)) { I'm almost rewriting this site from the start... any ideas? P.s.: Sorry my english.
 [2006-09-08 01:40 UTC] lsmith (Lukas Smith)
your issue is unrelated .. you are simply missing proper error handling. please ask on if you are unsure how to solve your issue.
 [2006-10-16 08:25 UTC] lsmith (Lukas Smith)
No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you.
 [2010-02-19 21:42 UTC] besttrav (jose rodrigues)
New Category - New Property - View Properties Fatal error: Call to undefined function mdb2_driver_mysql_connect() in /home/besttrav/public_html/prop.php on line 269 Please can you help to fix this problem? Thank you Jose Rodrigues
 [2010-02-20 19:14 UTC] ifeghali (Igor Feghali)
-Package: MDB2_Schema +Package: MDB2