Description:
Hello
Feel free to merge this with #21543 if it is really the same issue, I wasn't sure about it.
There are several bug reports against the Debian packages that beginning with 5.0.24 Perl programs suddenly die with fatal warnings "Transactions not supported by database" when setting $dbh->{AutoCommit} = 0 although the databases do support transactions via InnoDB.
Niko Tyni <ntyni@iki.fi> now seems to have found the problem and identifies it as an ABI change which would mean that you either have to bump the soname to libmysqlclient.so.16 or *immediately* revert this change!!!
-christian-
------
Please note, that his bug numbers refers to http://bugs.debian.org/ and
not MySQL bug numbers.
------
Hi,
this bug (#384047) is also at least #384221 (libdbd-mysql-perl) and
#383700 (request-tracker3.4).
I believe the problem is an incompatible ABI change in
libmysqlclient.15.so with version 5.0.24.
This addition in struct st_mysql_options:
--- mysql-dfsg-5.0-5.0.22/include/mysql.h 2006-05-25 11:56:42.000000000 +0300
+++ mysql-dfsg-5.0-5.0.24/include/mysql.h 2006-07-27 21:52:03.000000000 +0300
@@ -164,6 +164,7 @@
char *ssl_ca; /* PEM CA file */
char *ssl_capath; /* PEM directory of CA-s? */
char *ssl_cipher; /* cipher to use */
+ my_bool ssl_verify_server_cert; /* if to verify server cert */
char *shared_memory_base_name;
unsigned long max_allowed_packet;
my_bool use_ssl; /* if to use SSL or not */
causes the size of st_mysql_options to grow. This also affects the MYSQL
struct, since it contains st_mysql_options.
Now, libdbd-mysql-perl has this in dbdimp.h:
struct imp_dbh_st {
dbih_dbc_t com; /* MUST be first element in structure */
MYSQL mysql;
int has_transactions; /* boolean indicating support for
* transactions, currently always
* TRUE for MySQL and always FALSE
* for mSQL.
*/
[...]
so the grown MYSQL struct overlaps with has_transactions.
This hits libdbd-mysql-perl 3.006-1, which is currently compiled
against libmysqlclient15off-dev 5.0.22-x (with x depending on
the architecture). When run with libmysqlclient15off 5.0.24-1,
has_transactions gets reset to 0 and the result is 'Transactions not
supported by database'. Recompiling libdbd-mysql-perl helps, as the API
has not changed in an incompatible way.
In my understanding, the right fix is to bump the soname or to revert
the struct st_mysql_options change.
How to repeat:
#!/usr/bin/perl
use DBI;
$dbh = DBI->connect("DBI:mysql:localhost");
$dbh->{'AutoCommit'} = 0;
Suggested fix:
Revert ABI change!
Description: Hello Feel free to merge this with #21543 if it is really the same issue, I wasn't sure about it. There are several bug reports against the Debian packages that beginning with 5.0.24 Perl programs suddenly die with fatal warnings "Transactions not supported by database" when setting $dbh->{AutoCommit} = 0 although the databases do support transactions via InnoDB. Niko Tyni <ntyni@iki.fi> now seems to have found the problem and identifies it as an ABI change which would mean that you either have to bump the soname to libmysqlclient.so.16 or *immediately* revert this change!!! -christian- ------ Please note, that his bug numbers refers to http://bugs.debian.org/ and not MySQL bug numbers. ------ Hi, this bug (#384047) is also at least #384221 (libdbd-mysql-perl) and #383700 (request-tracker3.4). I believe the problem is an incompatible ABI change in libmysqlclient.15.so with version 5.0.24. This addition in struct st_mysql_options: --- mysql-dfsg-5.0-5.0.22/include/mysql.h 2006-05-25 11:56:42.000000000 +0300 +++ mysql-dfsg-5.0-5.0.24/include/mysql.h 2006-07-27 21:52:03.000000000 +0300 @@ -164,6 +164,7 @@ char *ssl_ca; /* PEM CA file */ char *ssl_capath; /* PEM directory of CA-s? */ char *ssl_cipher; /* cipher to use */ + my_bool ssl_verify_server_cert; /* if to verify server cert */ char *shared_memory_base_name; unsigned long max_allowed_packet; my_bool use_ssl; /* if to use SSL or not */ causes the size of st_mysql_options to grow. This also affects the MYSQL struct, since it contains st_mysql_options. Now, libdbd-mysql-perl has this in dbdimp.h: struct imp_dbh_st { dbih_dbc_t com; /* MUST be first element in structure */ MYSQL mysql; int has_transactions; /* boolean indicating support for * transactions, currently always * TRUE for MySQL and always FALSE * for mSQL. */ [...] so the grown MYSQL struct overlaps with has_transactions. This hits libdbd-mysql-perl 3.006-1, which is currently compiled against libmysqlclient15off-dev 5.0.22-x (with x depending on the architecture). When run with libmysqlclient15off 5.0.24-1, has_transactions gets reset to 0 and the result is 'Transactions not supported by database'. Recompiling libdbd-mysql-perl helps, as the API has not changed in an incompatible way. In my understanding, the right fix is to bump the soname or to revert the struct st_mysql_options change. How to repeat: #!/usr/bin/perl use DBI; $dbh = DBI->connect("DBI:mysql:localhost"); $dbh->{'AutoCommit'} = 0; Suggested fix: Revert ABI change!