Re: MDB2 transaction misconfiguration with mysql

From: Date: Thu, 06 Sep 2007 14:08:40 +0000
Subject: Re: MDB2 transaction misconfiguration with mysql
References: 1 2 3 4 5 6  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-27885@lists.php.net to get a copy of this message
Lukas Kahwe Smith ha scritto:
err right .. Then I do not know whats going on. I recommend that you either file a bug, or better yet, debug the driver code yourself. The code I pasted is taken from the connect() method in the MDB2_Driver_mysql class. regards, Lukas Ok i make some tests...
I inserted these code at line 531 after the switch test in mysql driver: ob_start(); var_dump($this->supported); var_dump($this->option); $this->_getServerCapabilities(); var_dump($this->supported); var_dump($this->option); error_log(ob_get_flush(),3,"/var/tmp/mdb2test.err"); Getting no values, no dump and finally i understand what was the problem .. . No error in your code.. I use singleton to set the mdb2 object $mdb2=&MDB2::singleton($dsn,array('default_table_type'=>'InnoDB','use_transactions'=>true)); and this initializazion of MDB2 object works like factory(), that is use lazy connection to the db, then the connect() method is call only after a statement requiring to query dbms. Then to resolve the problem it's enough to force the connection with this line of code: $mdb2->connect(); and all it run as supposed. Sorry for my english Thanks a lot for your supports Regards Fusillo

« previous php.pear.general (#27885) next »