r60190 - in /trunk/libdbd-mysql-perl: ChangeLog MANIFEST META.yml dbdimp.c dbdimp.h debian/changelog debian/control debian/patches/fix_pod_for_manpage lib/DBD/mysql.pm t/40blobs.t t/52comment.t t/53comment.t t/mysql.mtest

ansgar-guest at users.alioth.debian.org ansgar-guest at users.alioth.debian.org
Sat Jul 10 12:39:39 UTC 2010


Author: ansgar-guest
Date: Sat Jul 10 12:39:15 2010
New Revision: 60190

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=60190
Log:
* New upstream release.
  + Fix issues with placeholders in comments. (Closes: #580479, #584428)
* Bump Standards-Version to 3.9.0 (no changes).

Added:
    trunk/libdbd-mysql-perl/t/53comment.t
      - copied unchanged from r60188, branches/upstream/libdbd-mysql-perl/current/t/53comment.t
Modified:
    trunk/libdbd-mysql-perl/ChangeLog
    trunk/libdbd-mysql-perl/MANIFEST
    trunk/libdbd-mysql-perl/META.yml
    trunk/libdbd-mysql-perl/dbdimp.c
    trunk/libdbd-mysql-perl/dbdimp.h
    trunk/libdbd-mysql-perl/debian/changelog
    trunk/libdbd-mysql-perl/debian/control
    trunk/libdbd-mysql-perl/debian/patches/fix_pod_for_manpage
    trunk/libdbd-mysql-perl/lib/DBD/mysql.pm
    trunk/libdbd-mysql-perl/t/40blobs.t
    trunk/libdbd-mysql-perl/t/52comment.t
    trunk/libdbd-mysql-perl/t/mysql.mtest

Modified: trunk/libdbd-mysql-perl/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-mysql-perl/ChangeLog?rev=60190&op=diff
==============================================================================
--- trunk/libdbd-mysql-perl/ChangeLog (original)
+++ trunk/libdbd-mysql-perl/ChangeLog Sat Jul 10 12:39:15 2010
@@ -1,11 +1,19 @@
+2010-07-09 Patrick Galbraith <patg at patg.net> (4.015)
+* BUG #56664 fixed t/40blobs.t skip_all logic (W. Phillip Moore)
+* BUG #57253 Fixed iteration past end of string (crash). (Chris Butler)
+* Added a new parameter for old behavior- mysql_bind_comment_placeholders which 
+  will make it possible to have placeholders bound for those who really 
+  want that behavior.
+* Fixed bind_type_guessing - always on now 
+
 2010-04-14 Patrick Galbraith <patg at patg.net> (4.014)
-* BUG 30033 Fixed handling of comments to allow comments that contain characters
+* BUG #30033 Fixed handling of comments to allow comments that contain characters
   that might otherwise cause placeholder detection to not work properly
-* BUG 53844, Fix for memory leak in stats. (Gregory Burmistrov)
-* BUG 49719, Fix for handling of NULLs in prepared statements (Gert Pache)
-* BUG 55627, Fix for testing failure due to strict mode (Yves) 
-* BUG 51784, Fix for mysqladmin on Windows in Makefile (Zeeshan Muhammad)
-* BUG 41630, Typo in Makefile
+* BUG #53844, Fix for memory leak in stats. (Gregory Burmistrov)
+* BUG #49719, Fix for handling of NULLs in prepared statements (Gert Pache)
+* BUG #55627, Fix for testing failure due to strict mode (Yves) 
+* BUG #51784, Fix for mysqladmin on Windows in Makefile (Zeeshan Muhammad)
+* BUG #41630, Typo in Makefile
 * Had to define true and false in dbdimp.h. Didn't work out of the box on Linux
 
 2009-09-16 Patrick Galbraith <patg at patg.net> (4.013)

Modified: trunk/libdbd-mysql-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-mysql-perl/MANIFEST?rev=60190&op=diff
==============================================================================
--- trunk/libdbd-mysql-perl/MANIFEST (original)
+++ trunk/libdbd-mysql-perl/MANIFEST Sat Jul 10 12:39:15 2010
@@ -44,6 +44,7 @@
 t/50commit.t
 t/51bind_type_guessing.t
 t/52comment.t
+t/53comment.t
 t/55utf8.t
 t/60leaks.t
 t/65types.t

Modified: trunk/libdbd-mysql-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-mysql-perl/META.yml?rev=60190&op=diff
==============================================================================
--- trunk/libdbd-mysql-perl/META.yml (original)
+++ trunk/libdbd-mysql-perl/META.yml Sat Jul 10 12:39:15 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               DBD-mysql
-version:            4.014
+version:            4.015
 abstract:           A MySQL driver for the Perl5 Database Interface (DBI)
 author:
     - Rudy Lippan <rlippan at remotelinux.com>

Modified: trunk/libdbd-mysql-perl/dbdimp.c
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-mysql-perl/dbdimp.c?rev=60190&op=diff
==============================================================================
--- trunk/libdbd-mysql-perl/dbdimp.c (original)
+++ trunk/libdbd-mysql-perl/dbdimp.c Sat Jul 10 12:39:15 2010
@@ -61,7 +61,7 @@
 
 */
 static int
-count_params(char *statement)
+count_params(char *statement, bool bind_comment_placeholders)
 {
   bool comment_end= false;
   char* ptr= statement;
@@ -78,87 +78,98 @@
       /* so, this is a -- comment, so let's burn up characters */
     case '-':
       {
-        comment_length= 1;
-        /* let's see if the next one is a dash */
-        c = *ptr++;
-
-        if  (c == '-') {
-          /* if two dashes, ignore everything until newline */
-          while (c = *ptr)
+          if (bind_comment_placeholders)
           {
-            if (dbis->debug >= 2)
-              PerlIO_printf(DBILOGFP, "%c\n", c);
-            ptr++;
-            comment_length++;
-            if (c == '\n')
-            {
-              comment_end= true;
+              c = *ptr++;
               break;
-            }
           }
-          /*
-            so, if there was an end to the comment, increment by one more
-            to go past the new line
-
-            if not comment_end, the comment never ended and we need to iterate
-            back to the beginning of where we started and let the database 
-            handle whatever is in the statement
-          */
-          if (comment_end)
-            ptr++;
           else
-            ptr-= comment_length;
-        }
-        /* otherwise, only one dash/hyphen, backtrack by one */
-        else
-          ptr--;
-        break;
+          {
+              comment_length= 1;
+              /* let's see if the next one is a dash */
+              c = *ptr++;
+
+              if  (c == '-') {
+                  /* if two dashes, ignore everything until newline */
+                  while (c = *ptr)
+                  {
+                      if (dbis->debug >= 2)
+                          PerlIO_printf(DBILOGFP, "%c\n", c);
+                      ptr++;
+                      comment_length++;
+                      if (c == '\n')
+                      {
+                          comment_end= true;
+                          break;
+                      }
+                  }
+                  /*
+                    if not comment_end, the comment never ended and we need to iterate
+                    back to the beginning of where we started and let the database 
+                    handle whatever is in the statement
+                */
+                  if (! comment_end)
+                      ptr-= comment_length;
+              }
+              /* otherwise, only one dash/hyphen, backtrack by one */
+              else
+                  ptr--;
+              break;
+          }
       }
     /* c-type comments */
     case '/':
       {
-        c = *ptr++;
-        /* let's check if the next one is an asterisk */
-        if  (c == '*')
-        {
-          comment_length= 0;
-          comment_end= false;
-          /* ignore everything until closing comment */
-          while (c= *ptr)
+          if (bind_comment_placeholders)
           {
-            ptr++;
-            comment_length++;
-
-            if (c == '*')
-            {
               c = *ptr++;
-              /* alas, end of comment */
-              if (c == '/')
+              break;
+          }
+          else
+          {
+              c = *ptr++;
+              /* let's check if the next one is an asterisk */
+              if  (c == '*')
               {
-                ptr++;
-                comment_end= true;
-                break;
+                  comment_length= 0;
+                  comment_end= false;
+                  /* ignore everything until closing comment */
+                  while (c= *ptr)
+                  {
+                      ptr++;
+                      comment_length++;
+
+                      if (c == '*')
+                      {
+                          c = *ptr++;
+                          /* alas, end of comment */
+                          if (c == '/')
+                          {
+                              comment_end= true;
+                              break;
+                          }
+                          /*
+                            nope, just an asterisk, not so fast, not
+                            end of comment, go back one
+                        */
+                          else
+                              ptr--;
+                      }
+                  }
+                  /*
+                    if the end of the comment was never found, we have
+                    to backtrack to whereever we first started skipping
+                    over the possible comment.
+                    This means we will pass the statement to the database
+                    to see its own fate and issue the error
+                */
+                  if (!comment_end)
+                      ptr -= comment_length;
               }
-              /*
-                nope, just an asterisk, not so fast, not end of comment, go
-                back one
-              */
               else
-                ptr--;
-            }
+                  ptr--;
+              break;
           }
-          /*
-            if the end of the comment was never found, we have to backtrack
-            to whereever we first started skipping over the possible comment.
-            This means we will pass the statement to the database to see its own
-            fate and issue the error
-          */
-          if (!comment_end)
-            ptr -= comment_length;
-        }
-        else
-          ptr--;
-        break;
       }
     case '`':
     case '"':
@@ -488,7 +499,7 @@
 }
 #endif
 
-/* 
+/*
   constructs an SQL statement previously prepared with
   actual values replacing placeholders
 */
@@ -498,7 +509,8 @@
                           STRLEN *slen_ptr,
                           imp_sth_ph_t* params,
                           int num_params,
-                          bool bind_type_guessing)
+                          bool bind_type_guessing,
+                          bool bind_comment_placeholders)
 {
   bool comment_end= false;
   char *salloc, *statement_ptr;
@@ -590,69 +602,75 @@
       /* comment detection. Anything goes in a comment */
       case '-':
       {
-        comment_length= 1;
-        comment_end= false;
-        *ptr++ = *statement_ptr++;
-        if  (*statement_ptr == '-')
-        {
-          /* ignore everything until newline */
-          while (*statement_ptr)
+          if (bind_comment_placeholders)
           {
-            comment_length++;
-            *ptr++ = *statement_ptr++;
-            if (*statement_ptr == '\n')
-            {
-              comment_end= true;
+              *ptr++= *statement_ptr++;
               break;
-            }
           }
-          /* if comment end found, iterate past the \n */
-          if (comment_end)
-          {
-            *ptr++ = *statement_ptr++;
-          }
-          /* otherwise, go back to where we started, no end found */
           else
           {
-            statement_ptr -= comment_length;
-            ptr -= comment_length;
+              comment_length= 1;
+              comment_end= false;
+              *ptr++ = *statement_ptr++;
+              if  (*statement_ptr == '-')
+              {
+                  /* ignore everything until newline or end of string */
+                  while (*statement_ptr)
+                  {
+                      comment_length++;
+                      *ptr++ = *statement_ptr++;
+                      if (!*statement_ptr || *statement_ptr == '\n')
+                      {
+                          comment_end= true;
+                          break;
+                      }
+                  }
+                  /* if not end of comment, go back to where we started, no end found */
+                  if (! comment_end)
+                  {
+                      statement_ptr -= comment_length;
+                      ptr -= comment_length;
+                  }
+              }
+              break;
           }
-        }
-        break;
       }
       /* c-type comments */
       case '/':
       {
-        comment_length= 1;
-        comment_end= false;
-        *ptr++ = *statement_ptr++;
-        if  (*statement_ptr == '*')
-        {
-          /* use up characters everything until newline */
-          while (*statement_ptr)
+          if (bind_comment_placeholders)
           {
-            *ptr++ = *statement_ptr++;
-            comment_length++;
-            if (!strncmp(statement_ptr, "*/", 2))
-            {
-              comment_length += 2;
-              comment_end= true;
+              *ptr++= *statement_ptr++;
               break;
-            }
-          }
-          /* iterate past the comment end */
-          if (comment_end)
-          {
-            *ptr++ = *statement_ptr++;
-            *ptr++ = *statement_ptr++;
           }
           else
           {
-            statement_ptr -= comment_length;
-            ptr -= comment_length;
+              comment_length= 1;
+              comment_end= false;
+              *ptr++ = *statement_ptr++;
+              if  (*statement_ptr == '*')
+              {
+                  /* use up characters everything until newline */
+                  while (*statement_ptr)
+                  {
+                      *ptr++ = *statement_ptr++;
+                      comment_length++;
+                      if (!strncmp(statement_ptr, "*/", 2))
+                      {
+                          comment_length += 2;
+                          comment_end= true;
+                          break;
+                      }
+                  }
+                  /* Go back to where started if comment end not found */
+                  if (! comment_end)
+                  {
+                      statement_ptr -= comment_length;
+                      ptr -= comment_length;
+                  }
+              }
+              break;
           }
-        }
-        break;
       }
       case '`':
       case '\'':
@@ -716,7 +734,7 @@
             }
 
             /* (note this sets *end, which we use if is_num) */
-            if( parse_number(valbuf, vallen, &end) != 0 && is_num)
+            if ( parse_number(valbuf, vallen, &end) != 0 && is_num)
             {
               if (bind_type_guessing) {
                 /* .. not a number, so apparerently we guessed wrong */
@@ -1705,13 +1723,21 @@
                           "imp_dbh->use_mysql_use_result: %d\n",
                           imp_dbh->use_mysql_use_result);
         }
-        if ((svp = hv_fetch(hv, "mysql_bind_type_guessing", 24, FALSE)) && *svp)
+        if ((svp = hv_fetch(hv, "mysql_bind_type_guessing", 24, TRUE)) && *svp)
         {
           imp_dbh->bind_type_guessing= SvTRUE(*svp);
           if (DBIc_TRACE_LEVEL(imp_xxh) >= 2)
             PerlIO_printf(DBILOGFP,
                           "imp_dbh->bind_type_guessing: %d\n",
                           imp_dbh->bind_type_guessing);
+        }
+        if ((svp = hv_fetch(hv, "mysql_bind_comment_placeholders", 31, FALSE)) && *svp)
+        {
+          imp_dbh->bind_comment_placeholders = SvTRUE(*svp);
+          if (DBIc_TRACE_LEVEL(imp_xxh) >= 2)
+            PerlIO_printf(DBILOGFP,
+                          "imp_dbh->bind_comment_placeholders: %d\n",
+                          imp_dbh->bind_comment_placeholders);
         }
         if ((svp = hv_fetch(hv, "mysql_no_autocommit_cmd", 23, FALSE)) && *svp)
         {
@@ -1991,7 +2017,8 @@
 
   imp_dbh->stats.auto_reconnects_ok= 0;
   imp_dbh->stats.auto_reconnects_failed= 0;
-  imp_dbh->bind_type_guessing= FALSE;
+  imp_dbh->bind_type_guessing= TRUE;
+  imp_dbh->bind_comment_placeholders= FALSE;
   imp_dbh->has_transactions= TRUE;
  /* Safer we flip this to TRUE perl side if we detect a mod_perl env. */
   imp_dbh->auto_reconnect = FALSE;
@@ -2322,6 +2349,8 @@
     imp_dbh->no_autocommit_cmd= SvTRUE(valuesv);
   else if (kl == 24 && strEQ(key,"mysql_bind_type_guessing"))
     imp_dbh->bind_type_guessing = SvTRUE(valuesv);
+  else if (kl == 31 && strEQ(key,"mysql_bind_comment_placeholders"))
+    imp_dbh->bind_type_guessing = SvTRUE(valuesv);
 #if defined(sv_utf8_decode) && MYSQL_VERSION_ID >=SERVER_PREPARE_VERSION
   else if (kl == 17 && strEQ(key, "mysql_enable_utf8"))
     imp_dbh->enable_utf8 = bool_value;
@@ -2401,7 +2430,14 @@
   case 'b':
     if (kl == strlen("bind_type_guessing") &&
         strEQ(key, "bind_type_guessing"))
+    {
       result = sv_2mortal(newSViv(imp_dbh->bind_type_guessing));
+    }
+    else if (kl == strlen("bind_comment_placeholders") &&
+        strEQ(key, "bind_comment_placeholders"))
+    {
+      result = sv_2mortal(newSViv(imp_dbh->bind_comment_placeholders));
+    }
     break;
   case 'e':
     if (strEQ(key, "errno"))
@@ -2758,9 +2794,11 @@
 #if MYSQL_VERSION_ID >= SERVER_PREPARE_VERSION
   /* Count the number of parameters (driver, vs server-side) */
   if (imp_sth->use_server_side_prepare == 0)
-    DBIc_NUM_PARAMS(imp_sth) = count_params(statement);
-#else
-    DBIc_NUM_PARAMS(imp_sth) = count_params(statement);
+    DBIc_NUM_PARAMS(imp_sth) = count_params(statement,
+                                            imp_dbh->bind_comment_placeholders);
+#else
+  DBIc_NUM_PARAMS(imp_sth) = count_params(statement,
+                                          imp_dbh->bind_comment_placeholders);
 #endif
 
   /* Allocate memory for parameters */
@@ -3012,7 +3050,8 @@
                                        int use_mysql_use_result
                                       )
 {
-  bool bind_type_guessing= 0;
+  bool bind_type_guessing= TRUE;
+  bool bind_comment_placeholders= TRUE;
   STRLEN slen;
   char *sbuf = SvPV(statement, slen);
   char *table;
@@ -3033,14 +3072,15 @@
     if/else (when compiled, it fails for imp_dbh not being defined).
   */
   /* h is a dbh */
-  if (htype==DBIt_DB)
+  if (htype == DBIt_DB)
   {
     D_imp_dbh(h);
     /* if imp_dbh is not available, it causes segfault (proper) on OpenBSD */
     if (imp_dbh && imp_dbh->bind_type_guessing)
+    {
       bind_type_guessing= imp_dbh->bind_type_guessing;
-    else
-      bind_type_guessing= 0;
+      bind_comment_placeholders= bind_comment_placeholders;
+    }
   }
   /* h is a sth */
   else
@@ -3049,9 +3089,10 @@
     D_imp_dbh_from_sth;
     /* if imp_dbh is not available, it causes segfault (proper) on OpenBSD */
     if (imp_dbh)
+    {
       bind_type_guessing= imp_dbh->bind_type_guessing;
-    else
-      bind_type_guessing=0;
+      bind_comment_placeholders= imp_dbh->bind_comment_placeholders;
+    }
   }
 
   if (DBIc_TRACE_LEVEL(imp_xxh) >= 2)
@@ -3063,7 +3104,8 @@
                               &slen,
                               params,
                               num_params,
-                              bind_type_guessing);
+                              bind_type_guessing,
+                              bind_comment_placeholders);
 
   if (salloc)
   {
@@ -4912,7 +4954,8 @@
       }
       else if (!isdigit(*cp))
       {
-        seen_digit= 1;
+        /* Not sure why this was changed */
+        /* seen_digit= 1; */
         break;
       }
     }
@@ -4920,7 +4963,9 @@
     *end= cp;
 
     /* length 0 -> not a number */
-    if (len == 0 || cp - string < (int) len || seen_digit == 0) {
+    /* Need to revisit this */
+    /*if (len == 0 || cp - string < (int) len || seen_digit == 0) {*/
+    if (len == 0 || cp - string < (int) len) {
         return -1;
     }
 

Modified: trunk/libdbd-mysql-perl/dbdimp.h
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-mysql-perl/dbdimp.h?rev=60190&op=diff
==============================================================================
--- trunk/libdbd-mysql-perl/dbdimp.h (original)
+++ trunk/libdbd-mysql-perl/dbdimp.h Sat Jul 10 12:39:15 2010
@@ -154,6 +154,7 @@
 	    unsigned int auto_reconnects_failed;
     } stats;
     unsigned short int  bind_type_guessing;
+    bool bind_comment_placeholders;
     unsigned short int  no_autocommit_cmd;
     int use_mysql_use_result; /* TRUE if execute should use
                                * mysql_use_result rather than

Modified: trunk/libdbd-mysql-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-mysql-perl/debian/changelog?rev=60190&op=diff
==============================================================================
--- trunk/libdbd-mysql-perl/debian/changelog (original)
+++ trunk/libdbd-mysql-perl/debian/changelog Sat Jul 10 12:39:15 2010
@@ -1,3 +1,11 @@
+libdbd-mysql-perl (4.015-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+    + Fix issues with placeholders in comments. (Closes: #580479, #584428)
+  * Bump Standards-Version to 3.9.0 (no changes).
+
+ -- Ansgar Burchardt <ansgar at 43-1.org>  Sat, 10 Jul 2010 21:26:57 +0900
+
 libdbd-mysql-perl (4.014-1) unstable; urgency=low
 
   * New upstream release.

Modified: trunk/libdbd-mysql-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-mysql-perl/debian/control?rev=60190&op=diff
==============================================================================
--- trunk/libdbd-mysql-perl/debian/control (original)
+++ trunk/libdbd-mysql-perl/debian/control Sat Jul 10 12:39:15 2010
@@ -6,7 +6,7 @@
  Krzysztof Krzyżaniak (eloy) <eloy at debian.org>,
  Gunnar Wolf <gwolf at debian.org>,
  Ansgar Burchardt <ansgar at 43-1.org>
-Standards-Version: 3.8.4
+Standards-Version: 3.9.0
 Homepage: http://search.cpan.org/dist/DBD-mysql/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libdbd-mysql-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libdbd-mysql-perl/

Modified: trunk/libdbd-mysql-perl/debian/patches/fix_pod_for_manpage
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-mysql-perl/debian/patches/fix_pod_for_manpage?rev=60190&op=diff
==============================================================================
--- trunk/libdbd-mysql-perl/debian/patches/fix_pod_for_manpage (original)
+++ trunk/libdbd-mysql-perl/debian/patches/fix_pod_for_manpage Sat Jul 10 12:39:15 2010
@@ -1,8 +1,8 @@
 Author: Gunnar Wolf <gwolf at debian.org>
 Description: fix pod errors
 
---- a/lib/DBD/mysql.pm
-+++ b/lib/DBD/mysql.pm
+--- libdbd-mysql-perl.orig/lib/DBD/mysql.pm
++++ libdbd-mysql-perl/lib/DBD/mysql.pm
 @@ -1230,6 +1230,7 @@
   $bool_value = $dbh->{mysql_auto_reconnect};
   $dbh->{mysql_auto_reconnect} = $AutoReconnect ? 1 : 0;
@@ -11,7 +11,7 @@
  
  =item mysql_auto_reconnect
  
-@@ -1332,7 +1333,7 @@
+@@ -1342,7 +1343,7 @@
  
    $dbh->{mysql_no_autocommit_cmd} = 1;
  
@@ -20,7 +20,7 @@
  
  =head1 STATEMENT HANDLES
  
-@@ -1574,8 +1575,6 @@
+@@ -1584,8 +1585,6 @@
  
  =back
  

Modified: trunk/libdbd-mysql-perl/lib/DBD/mysql.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-mysql-perl/lib/DBD/mysql.pm?rev=60190&op=diff
==============================================================================
--- trunk/libdbd-mysql-perl/lib/DBD/mysql.pm (original)
+++ trunk/libdbd-mysql-perl/lib/DBD/mysql.pm Sat Jul 10 12:39:15 2010
@@ -9,7 +9,7 @@
 use Carp ();
 @ISA = qw(DynaLoader);
 
-$VERSION = '4.014';
+$VERSION = '4.015';
 
 bootstrap DBD::mysql $VERSION;
 
@@ -1296,6 +1296,16 @@
 
 See bug: https://rt.cpan.org/Ticket/Display.html?id=43822
 
+=item mysql_bind_comment_placeholders
+
+This attribute causes the driver (emulated prepare statements) 
+will cause any placeholders in comments to be bound. This is 
+not correct prepared statement behavior, but some developers
+have come to depend on this behavior, so I have made it available 
+in 4.015
+
+See bug: https://rt.cpan.org/Ticket/Display.html?id=
+
 C<mysql_bind_type_guessing> can be turned on via 
 
  - through DSN 

Modified: trunk/libdbd-mysql-perl/t/40blobs.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-mysql-perl/t/40blobs.t?rev=60190&op=diff
==============================================================================
--- trunk/libdbd-mysql-perl/t/40blobs.t (original)
+++ trunk/libdbd-mysql-perl/t/40blobs.t Sat Jul 10 12:39:15 2010
@@ -34,14 +34,16 @@
 eval {$dbh = DBI->connect($test_dsn, $test_user, $test_password,
   { RaiseError => 1, AutoCommit => 1}) or ServerError() ;};
 
+if ($@) {
+    plan skip_all => "ERROR: $DBI::errstr. Can't continue test";
+}
+else {
+    plan tests => 14;
+}
+
 if ($dbh->get_info($GetInfoType{SQL_DBMS_VER}) lt "4.1") {
     $charset= '';
 }
-
-if ($@) {
-    plan skip_all => "ERROR: $DBI::errstr. Can't continue test";
-}
-plan tests => 14;
 
 my $size= 128;
 

Modified: trunk/libdbd-mysql-perl/t/52comment.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-mysql-perl/t/52comment.t?rev=60190&op=diff
==============================================================================
--- trunk/libdbd-mysql-perl/t/52comment.t (original)
+++ trunk/libdbd-mysql-perl/t/52comment.t Sat Jul 10 12:39:15 2010
@@ -12,13 +12,17 @@
 use vars qw($test_dsn $test_user $test_password $table);
 
 my $dbh;
-eval {$dbh= DBI->connect($test_dsn, $test_user, $test_password,
-                      { RaiseError => 1, PrintError => 1, AutoCommit => 0 });};
+eval { $dbh= DBI->connect($test_dsn, $test_user, $test_password,
+                      { RaiseError => 1,
+                        PrintError => 1, 
+                        AutoCommit => 0, }
+                        );
+     };
 if ($@) {
     plan skip_all => 
         "ERROR: $DBI::errstr. Can't continue test";
 }
-plan tests => 9; 
+plan tests => 30; 
 
 ok $dbh->do("DROP TABLE IF EXISTS $table"), "drop table if exists $table";
 
@@ -56,6 +60,26 @@
 $retrow= $dbh->selectrow_arrayref($statement, {}, 1);
 cmp_ok $retrow->[0], '==', 1;
 
+$statement= "SELECT id FROM $table WHERE id = ? /* it's a bug? */";
+
+$retrow= $dbh->selectrow_arrayref($statement, {}, 1);
+cmp_ok $retrow->[0], '==', 1;
+
+$statement= "SELECT id FROM $table WHERE id = ? ";
+my $comment = "/* it's/a_directory/does\ this\ work/bug? */";
+
+for (0 .. 9) {
+    $retrow= $dbh->selectrow_arrayref($statement . $comment, {}, 1);
+    cmp_ok $retrow->[0], '==', 1;
+}
+
+$comment = "/* $0 */";
+
+for (0 .. 9) {
+    $retrow= $dbh->selectrow_arrayref($statement . $comment, {}, 1);
+    cmp_ok $retrow->[0], '==', 1;
+}
+
 ok $dbh->do("DROP TABLE IF EXISTS $table"), "drop table if exists $table";
 
 ok $dbh->disconnect;

Modified: trunk/libdbd-mysql-perl/t/mysql.mtest
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-mysql-perl/t/mysql.mtest?rev=60190&op=diff
==============================================================================
--- trunk/libdbd-mysql-perl/t/mysql.mtest (original)
+++ trunk/libdbd-mysql-perl/t/mysql.mtest Sat Jul 10 12:39:15 2010
@@ -7,9 +7,9 @@
          'testhost' => '',
          'nofoundrows' => 0,
          'testdb' => 'test',
-         'cflags' => '-I/usr/local/maria/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' => '',
+         'cflags' => '-I/usr/local/maria/include/mysql -g  -g -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT  -DDONT_DECLARE_CXA_PURE_VIRTUAL',
+         'testuser' => 'patg',
+         'testpassword' => 'patg',
          'testsocket' => ''
        };
 $::test_host = $opt->{'testhost'};




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