r3676 - in /packages/libdbd-mysql-perl/trunk: ./ debian/ lib/DBD/ t/

gregoa-guest at users.alioth.debian.org gregoa-guest at users.alioth.debian.org
Sat Sep 9 18:35:44 UTC 2006


Author: gregoa-guest
Date: Sat Sep  9 18:35:43 2006
New Revision: 3676

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=3676
Log:
* New upstream release.

Added:
    packages/libdbd-mysql-perl/trunk/t/40bindparam2.t
      - copied unchanged from r3675, packages/libdbd-mysql-perl/branches/upstream/current/t/40bindparam2.t
Modified:
    packages/libdbd-mysql-perl/trunk/ChangeLog
    packages/libdbd-mysql-perl/trunk/MANIFEST
    packages/libdbd-mysql-perl/trunk/META.yml
    packages/libdbd-mysql-perl/trunk/Makefile.PL
    packages/libdbd-mysql-perl/trunk/README
    packages/libdbd-mysql-perl/trunk/constants.h
    packages/libdbd-mysql-perl/trunk/dbdimp.c
    packages/libdbd-mysql-perl/trunk/debian/changelog
    packages/libdbd-mysql-perl/trunk/debian/rules
    packages/libdbd-mysql-perl/trunk/lib/DBD/mysql.pm
    packages/libdbd-mysql-perl/trunk/mysql.xs
    packages/libdbd-mysql-perl/trunk/t/10dsnlist.t
    packages/libdbd-mysql-perl/trunk/t/35prepare.t
    packages/libdbd-mysql-perl/trunk/t/40blobs.t
    packages/libdbd-mysql-perl/trunk/t/dbdadmin.t
    packages/libdbd-mysql-perl/trunk/t/mysql.dbtest
    packages/libdbd-mysql-perl/trunk/t/prepare_noerror.t

Modified: packages/libdbd-mysql-perl/trunk/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdbd-mysql-perl/trunk/ChangeLog?rev=3676&op=diff
==============================================================================
--- packages/libdbd-mysql-perl/trunk/ChangeLog (original)
+++ packages/libdbd-mysql-perl/trunk/ChangeLog Sat Sep  9 18:35:43 2006
@@ -1,3 +1,19 @@
+2006-09-08 Jim Winstead <jimw at mysql.com>, Patrick Galbraith <patg at mysql.com>
+(3.0007) (3.0006 is the same as 3.0005)
+  * Make sure to call dbd_st_finish when all rows from a statement handle
+    have been fetched. (Bug #20153, Bug# 21607, as rt.cpan.org ticket #s
+    20464, 21241) Jim Winstead
+  * Patch from Steve Hay to fix bind_param to deal properly with insertion
+    of a NULL into an INT or DOUBLE column using server-side prepare.
+    Converted Steve's dbi.pl script to expose this problem to 40bindparam2
+    test.
+  * Fix to mysql_st_internal_execute to keep from passing undefined dbh
+    handle member (bind_type_guessing) to parse_param causing crash on
+    OpenBSD. Reported on rt.cpan.org (#20868) by Kyle Georg, as well as
+    info from Sam Smith and Federico Giannici
+  * Cleaned up tests to make sure test table is dropped at end of test.
+
+
 2006-06-10 Patrick Galbraith <patg at mysql.com) (3.0005)
   * Fix dbd_st_finish in 3.0004 didn't clean up bind buffers resulting in
     a memory leak. See eg/prepare_memory_usage.pl to see how this manifests
@@ -852,7 +868,7 @@
 	* lib/Msql/Statement.pm: Fixed use of Msql::TEXT_TYPE without
 	  checking whether we are running Msql 1.
 
-$Id: ChangeLog 6305 2006-05-17 22:29:38Z capttofu $
+$Id: ChangeLog 6506 2006-06-14 19:05:50Z capttofu $
 
 DBD::mysql for DBI - Written by Jochen Wiedmann <joe at ispsoft.de>
 

Modified: packages/libdbd-mysql-perl/trunk/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdbd-mysql-perl/trunk/MANIFEST?rev=3676&op=diff
==============================================================================
--- packages/libdbd-mysql-perl/trunk/MANIFEST (original)
+++ packages/libdbd-mysql-perl/trunk/MANIFEST Sat Sep  9 18:35:43 2006
@@ -14,6 +14,7 @@
 t/20createdrop.t
 t/mysql.dbtest
 t/40bindparam.t
+t/40bindparam2.t
 t/41bindparam.t
 t/42bindparam.t
 t/40blobs.t

Modified: packages/libdbd-mysql-perl/trunk/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdbd-mysql-perl/trunk/META.yml?rev=3676&op=diff
==============================================================================
--- packages/libdbd-mysql-perl/trunk/META.yml (original)
+++ packages/libdbd-mysql-perl/trunk/META.yml Sat Sep  9 18:35:43 2006
@@ -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:      3.0006
+version:      3.0007
 version_from: lib/DBD/mysql.pm
 installdirs:  site
 requires:

Modified: packages/libdbd-mysql-perl/trunk/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdbd-mysql-perl/trunk/Makefile.PL?rev=3676&op=diff
==============================================================================
--- packages/libdbd-mysql-perl/trunk/Makefile.PL (original)
+++ packages/libdbd-mysql-perl/trunk/Makefile.PL Sat Sep  9 18:35:43 2006
@@ -154,6 +154,7 @@
 
 MSG
 
+$opt->{'test_user'} ||= "";
 delete $opt->{'help'};
 my $keylen = 0;
 foreach my $key (keys %$opt)

Modified: packages/libdbd-mysql-perl/trunk/README
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdbd-mysql-perl/trunk/README?rev=3676&op=diff
==============================================================================
--- packages/libdbd-mysql-perl/trunk/README (original)
+++ packages/libdbd-mysql-perl/trunk/README Sat Sep  9 18:35:43 2006
@@ -95,6 +95,6 @@
 
 The driver is maintained by a mailing list:
 
-  msql-mysql-modules at lists.mysql.com
+  perl at lists.mysql.com
 
 You can also get help from MySQL, Patrick Galbraith patg at mysql.com

Modified: packages/libdbd-mysql-perl/trunk/constants.h
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdbd-mysql-perl/trunk/constants.h?rev=3676&op=diff
==============================================================================
--- packages/libdbd-mysql-perl/trunk/constants.h (original)
+++ packages/libdbd-mysql-perl/trunk/constants.h Sat Sep  9 18:35:43 2006
@@ -3,7 +3,7 @@
 #include "XSUB.h"
 #include <mysql.h>
 
-static double mymsql_constant(char* name, char* arg) {
+static double mysql_constant(char* name, char* arg) {
   errno = 0;
   switch (*name) {
   case 'B':

Modified: packages/libdbd-mysql-perl/trunk/dbdimp.c
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdbd-mysql-perl/trunk/dbdimp.c?rev=3676&op=diff
==============================================================================
--- packages/libdbd-mysql-perl/trunk/dbdimp.c (original)
+++ packages/libdbd-mysql-perl/trunk/dbdimp.c Sat Sep  9 18:35:43 2006
@@ -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 6305 2006-05-17 22:29:38Z capttofu $
+ *  $Id: dbdimp.c 6506 2006-06-14 19:05:50Z capttofu $
  */
 
 
@@ -2342,14 +2342,51 @@
   D_imp_sth(h);
   D_imp_dbh_from_sth;
   STRLEN slen;
+  bool bind_type_guessing;
   char *sbuf = SvPV(statement, slen);
-  char *salloc = parse_params(svsock,
-                              sbuf,
-                              &slen,
-                              params,
-                              num_params,
-                              imp_dbh->bind_type_guessing);
   char *table;
+  char *salloc;
+  int htype;
+
+  /* thank you DBI.c for this info! */
+  D_imp_xxh(h);
+  htype= DBIc_TYPE(imp_xxh);
+  /*
+    It is important to import imp_dbh properly according to the htype
+    that it is! Also, one might ask why bind_type_guessing is assigned
+    in each block. Well, it's because D_imp_ macros called in these
+    blocks make it so imp_dbh is not "visible" or defined outside of the
+    if/else (when compiled, it fails for imp_dbh not being defined).
+  */
+  /* h is a dbh */
+  if (htype==DBIt_DB)
+  {
+    D_imp_dbh(h);
+    /* 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;
+  }
+  /* h is a sth */
+  else
+  {
+    D_imp_sth(h);
+    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;
+  }
+
+  salloc= parse_params(svsock,
+                       sbuf,
+                       &slen,
+                       params,
+                       num_params,
+                       imp_dbh->bind_type_guessing);
+
   my_ulonglong rows= 0;
 
   if (dbis->debug >= 2)
@@ -2848,12 +2885,14 @@
         do_error(sth, mysql_stmt_errno(imp_sth->stmt),
                  mysql_stmt_error(imp_sth->stmt));
 
-      if (rc == 100)
+      if (rc == MYSQL_NO_DATA)
       {
         /* Update row_num to affected_rows value */
         imp_sth->row_num= mysql_stmt_affected_rows(imp_sth->stmt);
         imp_sth->fetch_done=1;
       }
+
+      dbd_st_finish(sth, imp_sth);
 
       return Nullav;
     }
@@ -2951,6 +2990,8 @@
       if (mysql_errno(&imp_dbh->mysql))
         do_error(sth, mysql_errno(&imp_dbh->mysql),
                  mysql_error(&imp_dbh->mysql));
+
+      dbd_st_finish(sth, imp_sth);
 
       return Nullav;
     }
@@ -3575,7 +3616,7 @@
 		 IV sql_type, SV *attribs, int is_inout, IV maxlen) {
   int rc;
   int param_num= SvIV(param);
-  int idx= param_num - 1;   
+  int idx= param_num - 1;
   char err_msg[64];
 
 #if MYSQL_VERSION_ID >=40101
@@ -3625,23 +3666,19 @@
   rc = bind_param(&imp_sth->params[idx], value, sql_type);
 
 #if MYSQL_VERSION_ID >= SERVER_PREPARE_VERSION
-    if (imp_sth->use_server_side_prepare)
-    {
-      if (SvOK(imp_sth->params[idx].value) && imp_sth->params[idx].value)
-        buffer_is_null= 0;
-      else
-      {
-        buffer= NULL;
-        buffer_is_null= 1;
-      }
+  if (imp_sth->use_server_side_prepare)
+  {
+    if (SvOK(imp_sth->params[idx].value) && imp_sth->params[idx].value)
+    {
+      buffer_is_null= 0;
 
       switch(sql_type) {
-        case SQL_NUMERIC:
-        case SQL_INTEGER:
-        case SQL_SMALLINT:
-        case SQL_BIGINT:
-        case SQL_TINYINT:
-          /* INT */
+      case SQL_NUMERIC:
+      case SQL_INTEGER:
+      case SQL_SMALLINT:
+      case SQL_BIGINT:
+      case SQL_TINYINT:
+        /* INT */
         if (!SvIOK(imp_sth->params[idx].value) && dbis->debug >= 2)
           PerlIO_printf(DBILOGFP, "\t\tTRY TO BIND AN INT NUMBER\n");
 
@@ -3652,45 +3689,42 @@
           PerlIO_printf(DBILOGFP,
                         "   SCALAR type %d ->%ld<- IS A INT NUMBER\n",
                         sql_type, (long) (*buffer));
-          break;
-
-        case SQL_DOUBLE:
-        case SQL_DECIMAL:
-        case SQL_FLOAT:
-        case SQL_REAL:
-          /* FLOAT */
-          if (!SvNOK(imp_sth->params[idx].value) && dbis->debug >= 2)
-            PerlIO_printf(DBILOGFP, "\t\tTRY TO BIND A FLOAT NUMBER\n");
-
-            buffer_type= MYSQL_TYPE_DOUBLE;
-            imp_sth->fbind[idx].numeric_val.dval= SvNV(imp_sth->params[idx].value);
-            buffer=(char*)&(imp_sth->fbind[idx].numeric_val.dval);
-
-            if (dbis->debug >= 2)
-              PerlIO_printf(DBILOGFP,
-                          "   SCALAR type %d ->%f<- IS A FLOAT NUMBER\n",
-                          sql_type, (double)(*buffer));
-          break;
-
-        case SQL_CHAR:
-        case SQL_VARCHAR:
-        case SQL_DATE:
-        case SQL_TIME:
-        case SQL_TIMESTAMP:
-        case SQL_LONGVARCHAR:
-        case SQL_BINARY:
-        case SQL_VARBINARY:
-        case SQL_LONGVARBINARY:
-          buffer_type= MYSQL_TYPE_STRING;
-          break;
-
-        default:
-          buffer_type= MYSQL_TYPE_STRING;
-          break;
+        break;
+
+      case SQL_DOUBLE:
+      case SQL_DECIMAL:
+      case SQL_FLOAT:
+      case SQL_REAL:
+        /* FLOAT */
+        if (!SvNOK(imp_sth->params[idx].value) && dbis->debug >= 2)
+          PerlIO_printf(DBILOGFP, "\t\tTRY TO BIND A FLOAT NUMBER\n");
+
+        buffer_type= MYSQL_TYPE_DOUBLE;
+        imp_sth->fbind[idx].numeric_val.dval= SvNV(imp_sth->params[idx].value);
+        buffer=(char*)&(imp_sth->fbind[idx].numeric_val.dval);
+
+        if (dbis->debug >= 2)
+          PerlIO_printf(DBILOGFP,
+                        "   SCALAR type %d ->%f<- IS A FLOAT NUMBER\n",
+                        sql_type, (double)(*buffer));
+        break;
+
+      case SQL_CHAR:
+      case SQL_VARCHAR:
+      case SQL_DATE:
+      case SQL_TIME:
+      case SQL_TIMESTAMP:
+      case SQL_LONGVARCHAR:
+      case SQL_BINARY:
+      case SQL_VARBINARY:
+      case SQL_LONGVARBINARY:
+        buffer_type= MYSQL_TYPE_STRING;
+        break;
+
+      default:
+        buffer_type= MYSQL_TYPE_STRING;
+        break;
       }
-
-      if (buffer_is_null)
-        buffer_type= MYSQL_TYPE_NULL;
 
       if (buffer_type == MYSQL_TYPE_STRING)
       {
@@ -3701,29 +3735,36 @@
                         "   SCALAR type %d ->%s<- IS A STRING\n",
                         sql_type, buffer);
       }
-
-      /* Type of column was changed. Force to rebind */
-      if (imp_sth->bind[idx].buffer_type != buffer_type)
-        imp_sth->has_been_bound = 0;
-
-
-      /* prepare has not been called */
-      if (imp_sth->has_been_bound == 0) 
-      {
-        imp_sth->bind[idx].buffer_type= buffer_type;
-        imp_sth->bind[idx].buffer= buffer;
-        imp_sth->bind[idx].buffer_length= buffer_length;
-      }
-      else /* prepare has been called */
-      {
-        imp_sth->stmt->params[idx].buffer= buffer;
-        imp_sth->stmt->params[idx].buffer_length= buffer_length;
-      }
-      imp_sth->fbind[idx].length= buffer_length;
-      imp_sth->fbind[idx].is_null= buffer_is_null;
-    }
-#endif
-    return rc;
+    }
+    else
+    {
+      buffer= NULL;
+      buffer_is_null= 1;
+      buffer_type= MYSQL_TYPE_NULL;
+    }
+
+    /* Type of column was changed. Force to rebind */
+    if (imp_sth->bind[idx].buffer_type != buffer_type)
+      imp_sth->has_been_bound = 0;
+
+
+    /* prepare has not been called */
+    if (imp_sth->has_been_bound == 0)
+    {
+      imp_sth->bind[idx].buffer_type= buffer_type;
+      imp_sth->bind[idx].buffer= buffer;
+      imp_sth->bind[idx].buffer_length= buffer_length;
+    }
+    else /* prepare has been called */
+    {
+      imp_sth->stmt->params[idx].buffer= buffer;
+      imp_sth->stmt->params[idx].buffer_length= buffer_length;
+    }
+    imp_sth->fbind[idx].length= buffer_length;
+    imp_sth->fbind[idx].is_null= buffer_is_null;
+  }
+#endif
+  return rc;
 }
 
 

Modified: packages/libdbd-mysql-perl/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdbd-mysql-perl/trunk/debian/changelog?rev=3676&op=diff
==============================================================================
--- packages/libdbd-mysql-perl/trunk/debian/changelog (original)
+++ packages/libdbd-mysql-perl/trunk/debian/changelog Sat Sep  9 18:35:43 2006
@@ -1,3 +1,9 @@
+libdbd-mysql-perl (3.0007-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- gregor herrmann <gregor+debian at comodo.priv.at>  Sat,  9 Sep 2006 20:24:50 +0200
+
 libdbd-mysql-perl (3.0006-1) unstable; urgency=low
 
   * New upstream release.

Modified: packages/libdbd-mysql-perl/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdbd-mysql-perl/trunk/debian/rules?rev=3676&op=diff
==============================================================================
--- packages/libdbd-mysql-perl/trunk/debian/rules (original)
+++ packages/libdbd-mysql-perl/trunk/debian/rules Sat Sep  9 18:35:43 2006
@@ -46,6 +46,7 @@
 	dh_testroot
 	dh_installdirs
 	$(MAKE) install PREFIX=$(TMP)/usr
+	sed -i -e 's/ö/\\\[:o\]/' $(TMP)/usr/share/man/man3/*
 	find $(TMP)/usr -name 'dbimon*' | xargs -r rm -f
 	find $(TMP)/usr -name '*.pod' | xargs -r chmod 0644
 	touch install-stamp	

Modified: packages/libdbd-mysql-perl/trunk/lib/DBD/mysql.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdbd-mysql-perl/trunk/lib/DBD/mysql.pm?rev=3676&op=diff
==============================================================================
--- packages/libdbd-mysql-perl/trunk/lib/DBD/mysql.pm (original)
+++ packages/libdbd-mysql-perl/trunk/lib/DBD/mysql.pm Sat Sep  9 18:35:43 2006
@@ -9,7 +9,7 @@
 use Carp ();
 @ISA = qw(DynaLoader);
 
-$VERSION = '3.0006';
+$VERSION = '3.0007';
 
 bootstrap DBD::mysql $VERSION;
 

Modified: packages/libdbd-mysql-perl/trunk/mysql.xs
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdbd-mysql-perl/trunk/mysql.xs?rev=3676&op=diff
==============================================================================
--- packages/libdbd-mysql-perl/trunk/mysql.xs (original)
+++ packages/libdbd-mysql-perl/trunk/mysql.xs Sat Sep  9 18:35:43 2006
@@ -1,6 +1,6 @@
 /* Hej, Emacs, this is -*- C -*- mode!
 
-   $Id: mysql.xs 1379 2005-07-04 16:02:42Z capttofu $
+   $Id: mysql.xs 6506 2006-06-14 19:05:50Z capttofu $
 
    Copyright (c) 2003      Rudolf Lippan
    Copyright (c) 1997-2003 Jochen Wiedmann
@@ -29,7 +29,7 @@
     char* name
     char* arg
   CODE:
-    RETVAL = mymsql_constant(name, arg);
+    RETVAL = mysql_constant(name, arg);
   OUTPUT:
     RETVAL
 

Modified: packages/libdbd-mysql-perl/trunk/t/10dsnlist.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdbd-mysql-perl/trunk/t/10dsnlist.t?rev=3676&op=diff
==============================================================================
--- packages/libdbd-mysql-perl/trunk/t/10dsnlist.t (original)
+++ packages/libdbd-mysql-perl/trunk/t/10dsnlist.t Sat Sep  9 18:35:43 2006
@@ -61,7 +61,7 @@
     #   Try different DSN's
     #
     my(@dsnList);
-    if (($mdriver eq 'mysql'  or  $mdriver eq 'mSQL' or $mdriver eq 'mysqlEmb')
+    if (($mdriver eq 'mysql' or $mdriver eq 'mysqlEmb')
 	and  $test_dsn eq "DBI:$mdriver:test") {
 	@dsnList = ("DBI:$mdriver:test:localhost",
 		    "DBI:$mdriver:test;localhost",

Modified: packages/libdbd-mysql-perl/trunk/t/35prepare.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdbd-mysql-perl/trunk/t/35prepare.t?rev=3676&op=diff
==============================================================================
--- packages/libdbd-mysql-perl/trunk/t/35prepare.t (original)
+++ packages/libdbd-mysql-perl/trunk/t/35prepare.t Sat Sep  9 18:35:43 2006
@@ -39,8 +39,8 @@
   { RaiseError => 1, AutoCommit => 1})) or ServerError() ;
 
   # don't want this during make test!
-  Test($state or (1 || $dbh->trace("3", "/tmp/trace.log"))) or
-   DbiError($dbh->err, $dbh->errstr);
+  #Test($state or (1 || $dbh->trace("3", "/tmp/trace.log"))) or
+  # DbiError($dbh->err, $dbh->errstr);
 
   Test($state or $table = FindNewTable($dbh)) or
     DbiError($dbh->err, $dbh->errstr); 
@@ -117,17 +117,10 @@
   Test($state or $ret_ref = $sth->fetchall_arrayref()) or  
     DbiError($dbh->err, $dbh->errstr);
 
-  Test($state or $sth=
-    $dbh->prepare("DROP TABLE IF EXISTS $table")) or
-    DbiError($dbh->err, $dbh->errstr);
+  #
+  # drop table
+  #
+  Test($state or $dbh->do("DROP TABLE $table"))
+    or DbiError($dbh->err, $dbh->errstr);
 
-  Test($state or $sth->execute()) or 
-    DbiError($dbh->err, $dbh->errstr);
-
-  Test($state or $sth=
-    $dbh->prepare("DROP TABLE IF EXISTS t1")) or
-    DbiError($dbh->err, $dbh->errstr);
-
-  Test($state or $sth->execute()) or 
-    DbiError($dbh->err, $dbh->errstr);
 }

Modified: packages/libdbd-mysql-perl/trunk/t/40blobs.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdbd-mysql-perl/trunk/t/40blobs.t?rev=3676&op=diff
==============================================================================
--- packages/libdbd-mysql-perl/trunk/t/40blobs.t (original)
+++ packages/libdbd-mysql-perl/trunk/t/40blobs.t Sat Sep  9 18:35:43 2006
@@ -27,10 +27,6 @@
     if ($mdriver ne '') {
 	last;
     }
-}
-if ($dbdriver eq 'mSQL'  ||  $dbdriver eq 'mSQL1') {
-    print "1..0\n";
-    exit 0;
 }
 
 sub ServerError() {
@@ -101,12 +97,7 @@
 	    for ($i = 0;  $i < $size;  $i++) {
 		$blob .= $b;
 	    }
-	    if ($mdriver eq 'pNET') {
-		# Quote manually, no remote quote
-		$qblob = eval "DBD::" . $dbdriver . "::db->quote(\$blob)";
-	    } else {
-		$qblob = $dbh->quote($blob);
-	    }
+            $qblob = $dbh->quote($blob);
 	}
 
 	#

Modified: packages/libdbd-mysql-perl/trunk/t/dbdadmin.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdbd-mysql-perl/trunk/t/dbdadmin.t?rev=3676&op=diff
==============================================================================
--- packages/libdbd-mysql-perl/trunk/t/dbdadmin.t (original)
+++ packages/libdbd-mysql-perl/trunk/t/dbdadmin.t Sat Sep  9 18:35:43 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 #
-#   Test suite for the admin functions of DBD::mSQL and DBD::mysql.
+#   Test suite for the admin functions of DBD::mysql.
 #
 
 use strict;
@@ -98,7 +98,7 @@
 	or ErrMsgF("Ping failed: %s.\n", $dbh->errstr);
 
 
-    if ($mdriver eq 'mSQL'  or $mdriver eq 'mysql') {
+    if ($mdriver eq 'mysql') {
 	my($testdsn) = "testaa";
 	my($testdsn1, $testdsn2);
 	my($accessDenied) = 0;

Modified: packages/libdbd-mysql-perl/trunk/t/mysql.dbtest
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdbd-mysql-perl/trunk/t/mysql.dbtest?rev=3676&op=diff
==============================================================================
--- packages/libdbd-mysql-perl/trunk/t/mysql.dbtest (original)
+++ packages/libdbd-mysql-perl/trunk/t/mysql.dbtest Sat Sep  9 18:35:43 2006
@@ -52,10 +52,6 @@
 
     #
     #   Should be acceptable for most ANSI conformant databases;
-    #
-    #   msql 1 uses a non-ANSI definition of the primary key: A
-    #   column definition has the attribute "PRIMARY KEY". On
-    #   the other hand, msql 2 uses the ANSI fashion ...
     #
     my($col, @keys, @colDefs, $keyDef);
 

Modified: packages/libdbd-mysql-perl/trunk/t/prepare_noerror.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdbd-mysql-perl/trunk/t/prepare_noerror.t?rev=3676&op=diff
==============================================================================
--- packages/libdbd-mysql-perl/trunk/t/prepare_noerror.t (original)
+++ packages/libdbd-mysql-perl/trunk/t/prepare_noerror.t Sat Sep  9 18:35:43 2006
@@ -5,9 +5,43 @@
 
 use strict;
 use DBI ();
+use Data::Dumper;
 
 use vars qw($test_dsn $test_user $test_password $state);
-require "t/lib.pl";
+my ($mdriver,$file) = ('','');
+foreach $file ("lib.pl", "t/lib.pl")
+{
+  do $file; if ($@) { print STDERR "Error while executing lib.pl: $@\n";
+    exit 10;
+  }
+  if ($mdriver ne '') {
+    last;
+  }
+}
+
+my $tmp_dbh= DBI->connect("$test_dsn;mysql_server_prepare=1",
+  $test_user, $test_password, {RaiseError => 0});
+
+my $tmp_sth= $tmp_dbh->prepare("select version()"); 
+
+$tmp_sth->execute();
+
+my $tmp_ref= $tmp_sth->fetchall_arrayref();
+
+my $tmp_version= $tmp_ref->[0][0];
+
+$tmp_version =~ /^(\d)\.(\d)/;
+print "version $tmp_version version # $1 dot $2\n";
+
+$tmp_sth->finish();
+$tmp_dbh->disconnect();
+
+if ($1 < 5 || $2 < 1)
+{
+  print "1..0 # Skip test - will only run with MySQL 5.1 and above.\n";
+  exit(0);
+}
+
 
 while (Testing()) {
   my ($dbh, $sth);
@@ -27,7 +61,7 @@
   $dbh->{PrintError} = 1;
   $dbh->{PrintWarn} = 1;
   Test($state or (defined($DBI::errstr) && ($DBI::errstr ne "")));
-  #print STDERR $DBI::errstr;
+  print "errstr $DBI::errstr\n" if $DBI::errstr;
   #
   # Close the database connection
   Test($state or ($dbh->disconnect() or 1));




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