Re: MDB2 transaction misconfiguration with mysql

From: Date: Thu, 06 Sep 2007 11:43:07 +0000
Subject: Re: MDB2 transaction misconfiguration with mysql
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-27877@lists.php.net to get a copy of this message
fusillo wrote:
I also tried to download the latest csv release of mysql driver copying all Driver/*/mysql.php and Driver/mysql.php in my PEAR path /usr/local/php/lib/php/MDB2/Driver following the suggest found on the bug track PEAR system. I don't resolve the problem anyway. Might I update other files?
Here is the code in the driver:
        $this->supported['transactions'] = $this->options['use_transactions'];
        if ($this->options['default_table_type']) {
            switch (strtoupper($this->options['default_table_type'])) {
            case 'BLACKHOLE':
            case 'MEMORY':
            case 'ARCHIVE':
            case 'CSV':
            case 'HEAP':
            case 'ISAM':
            case 'MERGE':
            case 'MRG_ISAM':
            case 'ISAM':
            case 'MRG_MYISAM':
            case 'MYISAM':
                $this->supported['transactions'] = false;
                $this->warnings[] = $this->options['default_table_type'] .
                    ' is not a supported default table type';
                break;
            }
        }
The default_table_type seems to default to an empty string too. @Lorenzo: Yes, I know I wrote the code, but the way this check works seems a bit bogus to me. I think either the default table type shold default to InnoDB or .. not sure .. It also does not seem wise to do this as blacklist. I think a whitelist would make more sense. @Fusillo: So the key thing for you is: $mdb2=&MDB2::singleton($dsn,array('use_transactions'=>true, 'default_table_type' => 'InnoDB')); regards, Lukas

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