Subject: | Symbol renaming in DBI breaks DBD-mysql 4.016 |
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