Skip Menu |

This queue is for tickets about the DBD-mysql CPAN distribution.

Report information
The Basics
Id: 106527
Status: resolved
Priority: 0/
Queue: DBD-mysql

People
Owner: Nobody in particular
Requestors: RYBSKEJ [...] cpan.org
Cc: pali [...] cpan.org
AdminCc:

Bug Information
Severity: Important
Broken in: 4.030_01
Fixed in: (no value)



Subject: DBD::mysql compilation error when compiled against < 50003
The MYSQL_BIND struct did not support member "error" until MySQL 5.0.3. This prevent compilation of DBD::mysql against MySQL 5.0.2 or earlier: ... cc -c -I/opt/preview/lib/perl5/site_perl/5.8.9/i686-linux/auto/DBI -I/usr/local/mysql-standard-4.1.22-pc-linux-gnu-i686/include -mcpu=pentiumpro -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -pipe -Wall -DVERSION=\"4.032\" -DXS_VERSION=\"4.032\" -fPIC "-I/usr/lib/perl5/5.8.9/i686-linux/CORE" dbdimp.c dbdimp.c: In function `mysql_describe': dbdimp.c:3774: structure has no member named `error' ... Per http://dev.mysql.com/doc/relnotes/mysql/5.0/en/news-5-0-3.html: "Added an error member to the MYSQL_BIND data structure that is used in the C API for prepared statements. This member is used for reporting data truncation errors. Truncation reporting is enabled using the new MYSQL_REPORT_DATA_TRUNCATION option for the mysql_options() C API function." Attached patch addresses this bug.
Subject: DBD-mysql-v41-datatype-compat.patch
diff -ru DBD-mysql-4.032/dbdimp.c DBD-mysql-4.032.new/dbdimp.c --- DBD-mysql-4.032/dbdimp.c Mon Jun 15 10:43:03 2015 +++ DBD-mysql-4.032.new/dbdimp.c Tue Aug 18 18:28:32 2015 @@ -3771,7 +3771,9 @@ col_type); buffer->length= &(fbh->length); buffer->is_null= (my_bool*) &(fbh->is_null); +#if MYSQL_VERSION_ID >= NEW_DATATYPE_VERSION buffer->error= (my_bool*) &(fbh->error); +#endif switch (buffer->buffer_type) { case MYSQL_TYPE_DOUBLE: Only in DBD-mysql-4.032/t: mysql.mtest
What Linux currently still ships with MySQL header files < 50003 ? -- Michiel
On Wed Aug 19 15:49:27 2015, MICHIELB wrote: Show quoted text
> What Linux currently still ships with MySQL header files < 50003 ? > > -- > Michiel
This affected legacy appliance utilizing a custom MySQL 4.1.22 client/server installation The MySQL includes/libs provided by Linux vendor are excluded on this minimal-install platform.
On Štv Aug 20 09:40:57 2015, RYBSKEJ wrote: Show quoted text
> On Wed Aug 19 15:49:27 2015, MICHIELB wrote:
> > What Linux currently still ships with MySQL header files < 50003 ? > > > > -- > > Michiel
> > This affected legacy appliance utilizing a custom MySQL 4.1.22 > client/server installation The MySQL includes/libs provided by Linux > vendor are excluded on this minimal-install platform.
In case you are interested, driver fixes for different MySQL 5 versions and also compile fix for MySQL 4.1.22 are there: https://github.com/perl5-dbi/DBD-mysql/pull/86 Unit tests passes all testes MySQL versions: https://github.com/perl5-dbi/DBD-mysql/pull/85
Thanks to pali, this is fixed now in master. -- Michiel
Reopening, fix was reverted in 4.043.