r26725 - in /branches/upstream/libdbd-mysql-perl/current: ChangeLog INSTALL.html META.yml dbdimp.c lib/DBD/mysql.pm t/._71impdata.t t/70takeimp.t t/71impdata.t t/mysql.mtest

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Sun Nov 9 23:07:51 UTC 2008


Author: gregoa
Date: Sun Nov  9 23:07:49 2008
New Revision: 26725

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=26725
Log:
[svn-upgrade] Integrating new upstream version, libdbd-mysql-perl (4.010)

Removed:
    branches/upstream/libdbd-mysql-perl/current/t/._71impdata.t
Modified:
    branches/upstream/libdbd-mysql-perl/current/ChangeLog
    branches/upstream/libdbd-mysql-perl/current/INSTALL.html
    branches/upstream/libdbd-mysql-perl/current/META.yml
    branches/upstream/libdbd-mysql-perl/current/dbdimp.c
    branches/upstream/libdbd-mysql-perl/current/lib/DBD/mysql.pm
    branches/upstream/libdbd-mysql-perl/current/t/70takeimp.t
    branches/upstream/libdbd-mysql-perl/current/t/71impdata.t
    branches/upstream/libdbd-mysql-perl/current/t/mysql.mtest

Modified: branches/upstream/libdbd-mysql-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-mysql-perl/current/ChangeLog?rev=26725&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/ChangeLog (original)
+++ branches/upstream/libdbd-mysql-perl/current/ChangeLog Sun Nov  9 23:07:49 2008
@@ -1,3 +1,11 @@
+2008-10-24 Patrick Galbraith <patg at patg.net> (4.010)
+* Fix to dbd_bind_ph() for uninitialized value 'buffer_length'
+thanks for bug report and patch from Askniel.com (thanks!)
+
+2008-10-21 Patrick Galbraith <patg at patg.net> (4.009)
+* Fix to re-enable TAKE_IMP_DATA_VERSION. Still have to ensure DBI version 1.607 or higher
+* Fix to escaped single quotes throwing off bind param detection. Patch from Zhurs (zhurs at yandex.ru) Spasibo!
+
 2008-8-15 Patrick Galbraith <patg at patg.net> (4.008)
 * Multi statement patch, thanks to Chris Heath!
 * Disabled TAKE_IMP_DATA_VERSION because segfault with DBI < 1.607
@@ -1084,7 +1092,7 @@
 	* lib/Msql/Statement.pm: Fixed use of Msql::TEXT_TYPE without
 	  checking whether we are running Msql 1.
 
-$Id: ChangeLog 11650 2008-08-15 13:58:29Z capttofu $
+$Id: ChangeLog 11993 2008-10-22 00:49:10Z capttofu $
 
 DBD::mysql for DBI - Written by Jochen Wiedmann <joe at ispsoft.de>
 

Modified: branches/upstream/libdbd-mysql-perl/current/INSTALL.html
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-mysql-perl/current/INSTALL.html?rev=26725&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/INSTALL.html (original)
+++ branches/upstream/libdbd-mysql-perl/current/INSTALL.html Sun Nov  9 23:07:49 2008
@@ -4,7 +4,7 @@
 <head>
 <title>INSTALL - How to install and configure DBD::mysql</title>
 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<link rev="made" href="mailto:root at omen.apple.com" />
+<link rev="made" href="mailto:_www at b70.apple.com" />
 </head>
 
 <body style="background-color: white">

Modified: branches/upstream/libdbd-mysql-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-mysql-perl/current/META.yml?rev=26725&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/META.yml (original)
+++ branches/upstream/libdbd-mysql-perl/current/META.yml Sun Nov  9 23:07:49 2008
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         DBD-mysql
-version:      4.008
+version:      4.010
 version_from: lib/DBD/mysql.pm
 installdirs:  site
 requires:

Modified: branches/upstream/libdbd-mysql-perl/current/dbdimp.c
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-mysql-perl/current/dbdimp.c?rev=26725&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/dbdimp.c (original)
+++ branches/upstream/libdbd-mysql-perl/current/dbdimp.c Sun Nov  9 23:07:49 2008
@@ -8,7 +8,7 @@
  *  You may distribute this under the terms of either the GNU General Public
  *  License or the Artistic License, as specified in the Perl README file.
  *
- *  $Id: dbdimp.c 11649 2008-08-15 13:31:25Z capttofu $
+ *  $Id: dbdimp.c 11993 2008-10-22 00:49:10Z capttofu $
  */
 
 
@@ -80,7 +80,7 @@
         while ((c = *ptr)  &&  c != end_token)
         {
           if (c == '\\')
-            if (! *ptr)
+            if (! *(++ptr))
               continue;
 
           ++ptr;
@@ -1711,7 +1711,7 @@
   D_imp_xxh(dbh);
 
   /* TODO- resolve this so that it is set only if DBI is 1.607 */
-#define TAKE_IMP_DATA_VERSION 1 
+#define TAKE_IMP_DATA_VERSION 1
 #if TAKE_IMP_DATA_VERSION
   if (DBIc_has(imp_dbh, DBIcf_IMPSET))
   { /* eg from take_imp_data() */
@@ -4278,6 +4278,7 @@
             PerlIO_printf(DBILOGFP, "\t\tTRY TO BIND AN INT NUMBER\n");
 
           buffer_type= MYSQL_TYPE_LONG;
+          buffer_length = sizeof imp_sth->fbind[idx].numeric_val.lval;
           imp_sth->fbind[idx].numeric_val.lval= SvIV(imp_sth->params[idx].value);
           buffer=(void*)&(imp_sth->fbind[idx].numeric_val.lval);
           if (DBIc_TRACE_LEVEL(imp_xxh) >= 2)
@@ -4294,6 +4295,7 @@
             PerlIO_printf(DBILOGFP, "\t\tTRY TO BIND A FLOAT NUMBER\n");
 
           buffer_type= MYSQL_TYPE_DOUBLE;
+          buffer_length = sizeof imp_sth->fbind[idx].numeric_val.dval;
           imp_sth->fbind[idx].numeric_val.dval= SvNV(imp_sth->params[idx].value);
           buffer=(char*)&(imp_sth->fbind[idx].numeric_val.dval);
 
@@ -4320,15 +4322,8 @@
           break;
       }
 
-      if (buffer_type == MYSQL_TYPE_STRING)
-      {
-        buffer= SvPV(imp_sth->params[idx].value, slen);
-        buffer_length= slen;
-        if (DBIc_TRACE_LEVEL(imp_xxh) >= 2)
-          PerlIO_printf(DBILOGFP,
-                        "   SCALAR type %d ->%s<- IS A STRING\n",
-                        sql_type, buffer);
-      }
+      buffer= SvPV(imp_sth->params[idx].value, slen);
+      buffer_length= slen;
     }
     else
     {
@@ -4409,7 +4404,11 @@
   memcpy (&save_socket, imp_dbh->pmysql,sizeof(save_socket));
   memset (imp_dbh->pmysql,0,sizeof(*(imp_dbh->pmysql)));
 
-  if (!my_login(h, imp_dbh))
+  /* we should disconnect the db handle before reconnecting, this will
+   * prevent my_login from thinking it's adopting an active child which
+   * would prevent the handle from actually reconnecting
+   */
+  if (!dbd_db_disconnect(h, imp_dbh) || !my_login(h, imp_dbh))
   {
     do_error(h, mysql_errno(imp_dbh->pmysql), mysql_error(imp_dbh->pmysql),
              mysql_sqlstate(imp_dbh->pmysql));

Modified: branches/upstream/libdbd-mysql-perl/current/lib/DBD/mysql.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-mysql-perl/current/lib/DBD/mysql.pm?rev=26725&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/lib/DBD/mysql.pm (original)
+++ branches/upstream/libdbd-mysql-perl/current/lib/DBD/mysql.pm Sun Nov  9 23:07:49 2008
@@ -9,7 +9,7 @@
 use Carp ();
 @ISA = qw(DynaLoader);
 
-$VERSION = '4.008';
+$VERSION = '4.010';
 
 bootstrap DBD::mysql $VERSION;
 

Modified: branches/upstream/libdbd-mysql-perl/current/t/70takeimp.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-mysql-perl/current/t/70takeimp.t?rev=26725&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/t/70takeimp.t (original)
+++ branches/upstream/libdbd-mysql-perl/current/t/70takeimp.t Sun Nov  9 23:07:49 2008
@@ -2,7 +2,7 @@
 # vim: ft=perl
 
 #
-#   $Id: 70takeimp.t 11645 2008-08-15 11:36:38Z capttofu $
+#   $Id: 70takeimp.t 11993 2008-10-22 00:49:10Z capttofu $
 #
 #   This is a skeleton test. For writing new tests, take this file
 #   and modify/extend it.
@@ -30,11 +30,12 @@
 if ($@) {
     plan skip_all => "Can't connect to database ERROR: $@. Can't continue test";
 }
-
+unless ($DBI::VERSION ge '1.607') {
+    plan skip_all => "version of DBI $DBI::VERSION doesn't support this test. Can't continue test";
+}
 unless ($dbh->can('take_imp_data')) {
     plan skip_all => "version of DBI $DBI::VERSION doesn't support this test. Can't continue test";
 }
-plan skip_all => "This test is disabled";
 plan tests => 21;
 
 pass("obtained driver handle");
@@ -75,8 +76,10 @@
     is $warn, 4, 'we should have received 4 warnings';
 }
 
+print "here\n";
 my $dbh2 = DBI->connect($test_dsn, $test_user, $test_password,
     { dbi_imp_data => $imp_data });
+print "there\n";
 
 # XXX: how can we test that the same connection is used?
 my $id2 = connection_id($dbh2);

Modified: branches/upstream/libdbd-mysql-perl/current/t/71impdata.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-mysql-perl/current/t/71impdata.t?rev=26725&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/t/71impdata.t (original)
+++ branches/upstream/libdbd-mysql-perl/current/t/71impdata.t Sun Nov  9 23:07:49 2008
@@ -21,10 +21,12 @@
     plan skip_all => "Can't obtain driver handle. Can't continue test";
 }
 
+unless ($DBI::VERSION ge '1.607') {
+    plan skip_all => "version of DBI $DBI::VERSION doesn't support this test. Can't continue test";
+}
 unless ($dbh->can('take_imp_data')) {
     plan skip_all => "version of DBI $DBI::VERSION doesn't support this test. Can't continue test";
 }
-plan skip_all => "This test is disabled";
 plan tests => 10;
 
 pass("Connected to database");

Modified: branches/upstream/libdbd-mysql-perl/current/t/mysql.mtest
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-mysql-perl/current/t/mysql.mtest?rev=26725&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/t/mysql.mtest (original)
+++ branches/upstream/libdbd-mysql-perl/current/t/mysql.mtest Sun Nov  9 23:07:49 2008
@@ -7,7 +7,7 @@
          'testhost' => '',
          'nofoundrows' => 0,
          'testdb' => 'test',
-         'cflags' => '-I/usr/local/include/mysql -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT  -DDONT_DECLARE_CXA_PURE_VIRTUAL',
+         'cflags' => '-I/usr/local/mysql/include/mysql -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT  -DDONT_DECLARE_CXA_PURE_VIRTUAL',
          'testuser' => 'root',
          'testpassword' => '',
          'testsocket' => ''




More information about the Pkg-perl-cvs-commits mailing list