Re: Suddenly $dbh->{AutoCommit}=0 => 'Transactions not supported by database'
Christian Hammers <[email protected]>
| Newsgroups | gmane.comp.db.mysql.perl |
|---|---|
| Organization | www.debian.org |
| Message-ID | <[email protected]> |
Hello
On 2006-08-24 Benton, Kevin wrote:
> > Some users of the Debian packages I create recently reported that after
> > the upgrade from MySQL 5.0.22 to 5.0.24 Perl scripts that try to
> > explicitly set
> > $dbh->{AutoCommit} = 0;
> > die with the error message:
> > "Transactions not supported by database"
...
> From the docs... (http://dev.mysql.com/doc/refman/5.1/en/commit.html)
>
> To disable autocommit mode for a single series of statements, use the
> START TRANSACTION statement:
Although this is true, the "perldoc DBI" specification not only allows
the explicit use of the AutoCommit flag, it even recommends using it
this way:
$dbh = DBI->connect($dsn, $user, $password,
{ RaiseError => 1, AutoCommit => 0 });
...
Explicitly defining the required "AutoCommit" behaviour is strongly
recommended and may become mandatory in a later version. This deter-
mines whether changes are automatically committed to the database when
executed, or need to be explicitly committed later.
But this is not even the point, DBD::mysql understands this flag but
it suddenly says that the MySQL installations had no transaction support
in which case it would be allowed to issue a fatal error but which is
definitely not the case here as I have innodb enabled.
So how does it come to that conclusion?
bye,
-christian-
--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/[email protected]