Bug#383700: Bug #384047: mysql-server-5.0: "Transactions not supported by database" error when used with perl DBI/DBD
On Thu, Aug 24, 2006 at 02:02:43AM +0200, Christian Hammers 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"
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.
Cheers,
--
Niko Tyni ntyni@iki.fi
Reply to: