Skip Menu |
 

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

Report information
The Basics
Id: 123826
Status: open
Priority: 0/
Queue: DBD-mysql

People
Owner: Nobody in particular
Requestors: yuriy.zhilovets [...] gmail.com
Cc: pali [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: mysql_server_prepare causes SIGSEGV
Date: Wed, 6 Dec 2017 13:08:40 +0300
To: bug-DBD-mysql [...] rt.cpan.org
From: Yuriy Zhilovets <yuriy.zhilovets [...] gmail.com>
Download (untitled) / with headers
text/plain 596b
Symptoms are the same as in https://rt.cpan.org/Public/Bug/Display.html?id=83497 GDB shows: dbdimp.c:3554 for (i = mysql_stmt_field_count(stmt) - 1; i >=0; --i) { enum_type = mysql_to_perl_type(stmt->fields[i].type); here i = 1 but stmt->fields == 0x0 DBD 4.043, but the same on the DBD 4.041 from the system distribution Perl 5, version 24, subversion 1 (v5.24.1) built for x86_64-linux-gnu-thread-multi OS Debian GNU/Linux 9.2 (stretch) DB 10.2.11-MariaDB-10.2.11+maria~stretch I guess that the problem lies in the Maria itself, because there was no issues in Maria 10.2.9
Download (untitled) / with headers
text/plain 1.1k
On Wed Dec 06 05:08:49 2017, yuriy.zhilovets@gmail.com wrote: Show quoted text
> Symptoms are the same as in > https://rt.cpan.org/Public/Bug/Display.html?id=83497 > > GDB shows: > > dbdimp.c:3554 > > for (i = mysql_stmt_field_count(stmt) - 1; i >=0; --i) { > enum_type = mysql_to_perl_type(stmt->fields[i].type); > > here i = 1 but stmt->fields == 0x0 > > DBD 4.043, but the same on the DBD 4.041 from the system distribution > > Perl 5, version 24, subversion 1 (v5.24.1) built for > x86_64-linux-gnu-thread-multi > > OS Debian GNU/Linux 9.2 (stretch) > > DB 10.2.11-MariaDB-10.2.11+maria~stretch > > I guess that the problem lies in the Maria itself, because there was no > issues in Maria 10.2.9
Hi! This is a problem in dbdimp.c driver code itself. stmt structure is internal and there is no guarantee about values for its members. I fixed this problem in DBD::MariaDB driver (fork of DBD::mysql) in this pull request: https://github.com/gooddata/DBD-MariaDB/pull/63 Basically all code which access internal stmt structures was rewritten to use public C API only. Driver is working fine with MariaDB 10.2 and also with 10.3 versions.
Download (untitled) / with headers
text/plain 1.3k
On Tue Jun 19 08:51:53 2018, PALI wrote: Show quoted text
> On Wed Dec 06 05:08:49 2017, yuriy.zhilovets@gmail.com wrote:
> > Symptoms are the same as in > > https://rt.cpan.org/Public/Bug/Display.html?id=83497 > > > > GDB shows: > > > > dbdimp.c:3554 > > > > for (i = mysql_stmt_field_count(stmt) - 1; i >=0; --i) { > > enum_type = mysql_to_perl_type(stmt->fields[i].type); > > > > here i = 1 but stmt->fields == 0x0 > > > > DBD 4.043, but the same on the DBD 4.041 from the system distribution > > > > Perl 5, version 24, subversion 1 (v5.24.1) built for > > x86_64-linux-gnu-thread-multi > > > > OS Debian GNU/Linux 9.2 (stretch) > > > > DB 10.2.11-MariaDB-10.2.11+maria~stretch > > > > I guess that the problem lies in the Maria itself, because there was > > no > > issues in Maria 10.2.9
> > Hi! This is a problem in dbdimp.c driver code itself. stmt structure > is internal and there is no guarantee about values for its members. I > fixed this problem in DBD::MariaDB driver (fork of DBD::mysql) in this > pull request: > https://github.com/gooddata/DBD-MariaDB/pull/63 > > Basically all code which access internal stmt structures was rewritten > to use public C API only. Driver is working fine with MariaDB 10.2 and > also with 10.3 versions.
Now it is fixed in DBD::MariaDB version 1.00 which is available on cpan: https://metacpan.org/pod/DBD::MariaDB


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.