Skip Menu |
 

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

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

People
Owner: CAPTTOFU [...] cpan.org
Requestors: mmaslano [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 4.019
Fixed in: 4.021



Subject: is_prefix is not exported by mysql
Download (untitled) / with headers
text/plain 970b
The function is_prefix is not officially exported by mysql. It doesn't work for example with: mysqlhotcopy -p=<secret> test test2 I applied following patch in Fedora. Could you review it and fix it properly in your code? I do not know much about xs. diff -up DBD-mysql-4.018/mysql.xs.isprefix DBD-mysql-4.018/mysql.xs --- DBD-mysql-4.018/mysql.xs.isprefix 2010-07-09 19:47:47.000000000 +0200 +++ DBD-mysql-4.018/mysql.xs 2011-05-10 18:08:07.812894258 +0200 @@ -721,7 +721,7 @@ dbd_mysql_get_info(dbh, sql_info_type) case SQL_IDENTIFIER_QUOTE_CHAR: /*XXX What about a DB started in ANSI mode? */ /* Swiped from MyODBC's get_info.c */ - using_322=is_prefix(mysql_get_server_info(imp_dbh->pmysql),"3.22"); + using_322 = ((strncmp(mysql_get_server_info(imp_dbh->pmysql),"3.22",4) == 0) ? 1 : 0 ); retsv = newSVpv(!using_322 ? "`" : " ", 1); break; case SQL_MAXIMUM_STATEMENT_LENGTH:
From: mmaslano [...] redhat.com
Attaching patch.
Subject: DBD-mysql-is_prefix.patch
diff -up DBD-mysql-4.018/mysql.xs.isprefix DBD-mysql-4.018/mysql.xs --- DBD-mysql-4.018/mysql.xs.isprefix 2010-07-09 19:47:47.000000000 +0200 +++ DBD-mysql-4.018/mysql.xs 2011-05-10 18:08:07.812894258 +0200 @@ -721,7 +721,7 @@ dbd_mysql_get_info(dbh, sql_info_type) case SQL_IDENTIFIER_QUOTE_CHAR: /*XXX What about a DB started in ANSI mode? */ /* Swiped from MyODBC's get_info.c */ - using_322=is_prefix(mysql_get_server_info(imp_dbh->pmysql),"3.22"); + using_322 = ((strncmp(mysql_get_server_info(imp_dbh->pmysql),"3.22",4) == 0) ? 1 : 0 ); retsv = newSVpv(!using_322 ? "`" : " ", 1); break; case SQL_MAXIMUM_STATEMENT_LENGTH:
Download (untitled) / with headers
text/plain 217b
This problem makes almost impossible to install DBD::mysql from CPAN on my work Fedora box... I do use DBD::mysql provided by Fedora, but I'm also using older perls using perlbrew... Would be great to have it fixed...
Download (untitled) / with headers
text/plain 370b
On Mon Nov 21 06:50:27 2011, BJAKUBSKI wrote: Show quoted text
> This problem makes almost impossible to install DBD::mysql from CPAN > on my work Fedora box... > I do use DBD::mysql provided by Fedora, but I'm also using older perls > using perlbrew... > Would be great to have it fixed...
Hi there! Sorry about this - I will get this into the release I intend to get out this week.
Download (untitled) / with headers
text/plain 487b
On Mon Nov 21 14:57:41 2011, CAPTTOFU wrote: Show quoted text
> On Mon Nov 21 06:50:27 2011, BJAKUBSKI wrote:
> > This problem makes almost impossible to install DBD::mysql from CPAN > > on my work Fedora box... > > I do use DBD::mysql provided by Fedora, but I'm also using older
> perls
> > using perlbrew... > > Would be great to have it fixed...
> > > Hi there! > > Sorry about this - I will get this into the release I intend to get > out this week.
Hi. Any chance of release in a near future?
Download (untitled) / with headers
text/plain 274b
On Thu Feb 02 09:16:16 2012, BJAKUBSKI wrote: Show quoted text
> Hi. Any chance of release in a near future?
I just wanted to add my request for a release to fix this issue. It's pretty serious and prevents doing any real work on lots of newer systems. Thanks for all the work on this.
Download (untitled) / with headers
text/plain 129b
This has now bitten me as well. I'll attempt to manually apply the patch, but it would be really nice if this was fixed on CPAN!
Download (untitled) / with headers
text/plain 220b
This patch works great for me. I've turned the patch in to a pull request on github: https://github.com/CaptTofu/DBD-mysql/pull/24 Hopefully this will help to the current maintainer get this change out on CPAN faster.
as CHORNY indicated, this was fixed in 4.021 which was released on 2012-04-28. -- Mike


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.