Skip Menu |
 

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

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

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

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

Attachments


Subject: Symbol renaming in DBI breaks DBD-mysql 4.016
Download (untitled) / with headers
text/plain 490b
The details are in RT ticket 59840. Short summary: PERL_POLLUTE is an age old (and deprecated) macro collection that will be removed in perl 5.14. So Tim removed it in DBI 1.613_70 to provide driver authors a transition path. All they should have to do is rename a few symbols. Indeed, I can see DBD::mysql fail the compilation phase when based on DBI 1.613_70 with perl 5.13.1 and more. Appended is a patch that lets it get past the compilation phase and pass all tests. HTH && Regards,
Subject: DBD-mysql-4.016-ANDK-01.patch
Only in DBD-mysql-4.016-K9Cnew//blib/arch/auto/DBD/mysql: mysql.bs Only in DBD-mysql-4.016-K9Cnew//blib/arch/auto/DBD/mysql: mysql.so Only in DBD-mysql-4.016-K9Cnew//blib/man3: Bundle::DBD::mysql.3 Only in DBD-mysql-4.016-K9Cnew//blib/man3: DBD::mysql.3 Only in DBD-mysql-4.016-K9Cnew//blib/man3: DBD::mysql::INSTALL.3 diff -ur DBD-mysql-4.016-K9C3pi//dbdimp.c DBD-mysql-4.016-K9Cnew//dbdimp.c --- DBD-mysql-4.016-K9C3pi//dbdimp.c 2010-07-10 16:53:53.000000000 +0200 +++ DBD-mysql-4.016-K9Cnew//dbdimp.c 2010-08-04 22:06:41.000000000 +0200 @@ -1649,7 +1649,7 @@ { SV* sv = DBIc_IMP_DATA(imp_dbh); - DBIc_set(imp_dbh, DBIcf_AutoCommit, &sv_yes); + DBIc_set(imp_dbh, DBIcf_AutoCommit, &PL_sv_yes); if (sv && SvROK(sv)) { HV* hv = (HV*) SvRV(sv); @@ -2197,7 +2197,7 @@ #endif /* The disconnect_all concept is flawed and needs more work */ - if (!dirty && !SvTRUE(perl_get_sv("DBI::PERL_ENDING",0))) { + if (!PL_dirty && !SvTRUE(perl_get_sv("DBI::PERL_ENDING",0))) { sv_setiv(DBIc_ERR(imp_drh), (IV)1); sv_setpv(DBIc_ERRSTR(imp_drh), (char*)"disconnect_all not implemented"); @@ -2205,7 +2205,7 @@ DBIc_ERR(imp_drh), DBIc_ERRSTR(imp_drh)); */ return FALSE; } - perl_destruct_level = 0; + PL_perl_destruct_level = 0; return FALSE; } @@ -2411,7 +2411,7 @@ if (imp_dbh->has_transactions) return sv_2mortal(boolSV(DBIc_has(imp_dbh,DBIcf_AutoCommit))); /* Default */ - return &sv_yes; + return &PL_sv_yes; } break; } @@ -2482,7 +2482,7 @@ { const char* hostinfo = mysql_get_host_info(imp_dbh->pmysql); result= hostinfo ? - sv_2mortal(newSVpv(hostinfo, strlen(hostinfo))) : &sv_undef; + sv_2mortal(newSVpv(hostinfo, strlen(hostinfo))) : &PL_sv_undef; } break; @@ -2490,7 +2490,7 @@ if (strEQ(key, "info")) { const char* info = mysql_info(imp_dbh->pmysql); - result= info ? sv_2mortal(newSVpv(info, strlen(info))) : &sv_undef; + result= info ? sv_2mortal(newSVpv(info, strlen(info))) : &PL_sv_undef; } else if (kl == 8 && strEQ(key, "insertid")) /* We cannot return an IV, because the insertid is a long. */ @@ -2512,7 +2512,7 @@ { const char* serverinfo = mysql_get_server_info(imp_dbh->pmysql); result= serverinfo ? - sv_2mortal(newSVpv(serverinfo, strlen(serverinfo))) : &sv_undef; + sv_2mortal(newSVpv(serverinfo, strlen(serverinfo))) : &PL_sv_undef; } else if (strEQ(key, "sock")) result= sv_2mortal(newSViv((IV) imp_dbh->pmysql)); @@ -2522,14 +2522,14 @@ { const char* stats = mysql_stat(imp_dbh->pmysql); result= stats ? - sv_2mortal(newSVpv(stats, strlen(stats))) : &sv_undef; + sv_2mortal(newSVpv(stats, strlen(stats))) : &PL_sv_undef; } else if (strEQ(key, "stats")) { /* Obsolete, as of 2.09 */ const char* stats = mysql_stat(imp_dbh->pmysql); result= stats ? - sv_2mortal(newSVpv(stats, strlen(stats))) : &sv_undef; + sv_2mortal(newSVpv(stats, strlen(stats))) : &PL_sv_undef; } else if (kl == 14 && strEQ(key,"server_prepare")) result= sv_2mortal(newSViv((IV) imp_dbh->use_server_side_prepare)); @@ -4225,7 +4225,7 @@ break; default: - sv= &sv_undef; + sv= &PL_sv_undef; break; } av_push(av, sv); @@ -4239,7 +4239,7 @@ } if (av == Nullav) - return &sv_undef; + return &PL_sv_undef; return sv_2mortal(newRV_inc((SV*)av)); } @@ -4726,7 +4726,7 @@ sv= newSVpv((char*) (c), 0); \ SvREADONLY_on(sv); \ } else { \ - sv= &sv_undef; \ + sv= &PL_sv_undef; \ } \ av_push(row, sv); @@ -4803,7 +4803,7 @@ IV_PUSH(t->num_prec_radix); } else - av_push(row, &sv_undef); + av_push(row, &PL_sv_undef); IV_PUSH(t->sql_datatype); /* SQL_DATATYPE*/ IV_PUSH(t->sql_datetime_sub); /* SQL_DATETIME_SUB*/ Only in DBD-mysql-4.016-K9Cnew/: dbdimp.o Only in DBD-mysql-4.016-K9Cnew/: mysql.bs Only in DBD-mysql-4.016-K9Cnew/: mysql.c Only in DBD-mysql-4.016-K9Cnew/: mysql.o Only in DBD-mysql-4.016-K9Cnew/: mysql.xsi
Download (untitled) / with headers
text/plain 360b
Rereading the ticket I realize I didn't express myself as clearly as I wanted: DBD::mysql fails to compile with DBI 1.613_70 with any perl, not only 5.13.x. So you can verify the functioning of the patch with older perls too. And on the other hand the patch does not break DBD::mysql for old DBIs and old perls. I just verified this with perl 5.8.7 and 5.8.3.
Thank you! I will be add this as well as another patch and put out a release tomorrow.
releasing this with 4.017 - uploading as we speak.
Download (untitled) / with headers
text/plain 594b
sv_undef came back? I just discovered that 4.018 has an sv_undef again in dbdimp.c. Here is the patch that makes it work under bleadperl: --- dbdimp.c~ 2010-10-27 06:28:58.000000000 +0200 +++ dbdimp.c 2010-10-27 06:29:07.000000000 +0200 @@ -2444,7 +2444,7 @@ { const char* clientinfo = mysql_get_client_info(); result= clientinfo ? - sv_2mortal(newSVpv(clientinfo, strlen(clientinfo))) : &sv_undef; + sv_2mortal(newSVpv(clientinfo, strlen(clientinfo))) : &PL_sv_undef; } else if (kl == 13 && strEQ(key, "clientversion")) { HTH, Regards,
Download (untitled) / with headers
text/plain 759b
Tested this patch with 5.14.0RC1, worked just fine. Thanks, On Wed Oct 27 00:31:37 2010, ANDK wrote: Show quoted text
> sv_undef came back? > > I just discovered that 4.018 has an sv_undef again in dbdimp.c. > > Here is the patch that makes it work under bleadperl: > > --- dbdimp.c~ 2010-10-27 06:28:58.000000000 +0200 > +++ dbdimp.c 2010-10-27 06:29:07.000000000 +0200 > @@ -2444,7 +2444,7 @@ > { > const char* clientinfo = mysql_get_client_info(); > result= clientinfo ? > - sv_2mortal(newSVpv(clientinfo, strlen(clientinfo))) : &sv_undef; > + sv_2mortal(newSVpv(clientinfo, strlen(clientinfo))) : &PL_sv_undef; > } > else if (kl == 13 && strEQ(key, "clientversion")) > { > > > HTH, Regards,
-- Hi, how are you?
Subject: Re: [rt.cpan.org #60085] Symbol renaming in DBI breaks DBD-mysql 4.016
Date: Fri, 29 Apr 2011 13:54:14 -0400
To: bug-DBD-mysql [...] rt.cpan.org
From: Patrick Galbraith <patg [...] patg.net>
I will add this to DBD::mysql this weekend. Thank you very much! On Fri, Apr 29, 2011 at 1:27 PM, Pedro Melo via RT < bug-DBD-mysql@rt.cpan.org> wrote: Show quoted text
> Queue: DBD-mysql > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=60085 > > > Tested this patch with 5.14.0RC1, worked just fine. > > Thanks, > > On Wed Oct 27 00:31:37 2010, ANDK wrote:
> > sv_undef came back? > > > > I just discovered that 4.018 has an sv_undef again in dbdimp.c. > > > > Here is the patch that makes it work under bleadperl: > > > > --- dbdimp.c~ 2010-10-27 06:28:58.000000000 +0200 > > +++ dbdimp.c 2010-10-27 06:29:07.000000000 +0200 > > @@ -2444,7 +2444,7 @@ > > { > > const char* clientinfo = mysql_get_client_info(); > > result= clientinfo ? > > - sv_2mortal(newSVpv(clientinfo, strlen(clientinfo))) : &sv_undef; > > + sv_2mortal(newSVpv(clientinfo, strlen(clientinfo))) :
> &PL_sv_undef;
> > } > > else if (kl == 13 && strEQ(key, "clientversion")) > > { > > > > > > HTH, Regards,
> > -- > Hi, how are you? >
Download (untitled) / with headers
text/plain 1.2k
Patch works with 5.14.0RC2 as well, please apply! :) Shawn On 2011-4꜈-29 金 13:54:23, patg@patg.net wrote: Show quoted text
> I will add this to DBD::mysql this weekend. Thank you very much! > > On Fri, Apr 29, 2011 at 1:27 PM, Pedro Melo via RT < > bug-DBD-mysql@rt.cpan.org> wrote: >
> > Queue: DBD-mysql > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=60085 > > > > > Tested this patch with 5.14.0RC1, worked just fine. > > > > Thanks, > > > > On Wed Oct 27 00:31:37 2010, ANDK wrote:
> > > sv_undef came back? > > > > > > I just discovered that 4.018 has an sv_undef again in dbdimp.c. > > > > > > Here is the patch that makes it work under bleadperl: > > > > > > --- dbdimp.c~ 2010-10-27 06:28:58.000000000 +0200 > > > +++ dbdimp.c 2010-10-27 06:29:07.000000000 +0200 > > > @@ -2444,7 +2444,7 @@ > > > { > > > const char* clientinfo = mysql_get_client_info(); > > > result= clientinfo ? > > > - sv_2mortal(newSVpv(clientinfo, strlen(clientinfo))) :
> &sv_undef;
> > > + sv_2mortal(newSVpv(clientinfo, strlen(clientinfo))) :
> > &PL_sv_undef;
> > > } > > > else if (kl == 13 && strEQ(key, "clientversion")) > > > { > > > > > > > > > HTH, Regards,
> > > > -- > > Hi, how are you? > >
Subject: Re: [rt.cpan.org #60085] Symbol renaming in DBI breaks DBD-mysql 4.016
Date: Sun, 8 May 2011 21:40:03 -0400
To: bug-DBD-mysql [...] rt.cpan.org
From: Patrick Galbraith <patg [...] patg.net>
Download (untitled) / with headers
text/plain 1.1k
Pedro, Thank you! The code is in the main repo and just uploaded to CPAN - plus some other new great contributions from other developers. Regards, Patrick On Fri, Apr 29, 2011 at 1:27 PM, Pedro Melo via RT < bug-DBD-mysql@rt.cpan.org> wrote: Show quoted text
> Queue: DBD-mysql > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=60085 > > > Tested this patch with 5.14.0RC1, worked just fine. > > Thanks, > > On Wed Oct 27 00:31:37 2010, ANDK wrote:
> > sv_undef came back? > > > > I just discovered that 4.018 has an sv_undef again in dbdimp.c. > > > > Here is the patch that makes it work under bleadperl: > > > > --- dbdimp.c~ 2010-10-27 06:28:58.000000000 +0200 > > +++ dbdimp.c 2010-10-27 06:29:07.000000000 +0200 > > @@ -2444,7 +2444,7 @@ > > { > > const char* clientinfo = mysql_get_client_info(); > > result= clientinfo ? > > - sv_2mortal(newSVpv(clientinfo, strlen(clientinfo))) : &sv_undef; > > + sv_2mortal(newSVpv(clientinfo, strlen(clientinfo))) :
> &PL_sv_undef;
> > } > > else if (kl == 13 && strEQ(key, "clientversion")) > > { > > > > > > HTH, Regards,
> > -- > Hi, how are you? >


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.