r73362 - in /branches/upstream/libdbd-mysql-perl/current: ChangeLog INSTALL.html MANIFEST META.yml dbdimp.c lib/DBD/mysql.pm t/86_bug_36972.t

periapt-guest at users.alioth.debian.org periapt-guest at users.alioth.debian.org
Sun Apr 24 09:46:40 UTC 2011


Author: periapt-guest
Date: Sun Apr 24 09:46:24 2011
New Revision: 73362

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

Added:
    branches/upstream/libdbd-mysql-perl/current/t/86_bug_36972.t
Modified:
    branches/upstream/libdbd-mysql-perl/current/ChangeLog
    branches/upstream/libdbd-mysql-perl/current/INSTALL.html
    branches/upstream/libdbd-mysql-perl/current/MANIFEST
    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

Modified: branches/upstream/libdbd-mysql-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-mysql-perl/current/ChangeLog?rev=73362&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/ChangeLog (original)
+++ branches/upstream/libdbd-mysql-perl/current/ChangeLog Sun Apr 24 09:46:24 2011
@@ -1,3 +1,8 @@
+2010-08-11 Patrick Galbraith <patg at patg.net> (4.018)
+* Added client and server info patch from Robert M. Jansen
+* Added documentation and tests for new features
+* More code cleanup
+
 2010-08-11 Patrick Galbraith <patg at patg.net> (4.017)
 * BUG #60085, Andreas Koenig's patch for DBI changes
 * Updated documents

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=73362&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/INSTALL.html (original)
+++ branches/upstream/libdbd-mysql-perl/current/INSTALL.html Sun Apr 24 09:46:24 2011
@@ -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:_mdnsresponder at b87.apple.com" />
+<link rev="made" href="mailto:_www at b04.apple.com" />
 </head>
 
 <body style="background-color: white">

Modified: branches/upstream/libdbd-mysql-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-mysql-perl/current/MANIFEST?rev=73362&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/MANIFEST (original)
+++ branches/upstream/libdbd-mysql-perl/current/MANIFEST Sun Apr 24 09:46:24 2011
@@ -54,6 +54,7 @@
 t/76multi_statement.t
 t/80procs.t
 t/85init_command.t
+t/86_bug_36972.t
 t/lib.pl
 t/mysql.dbtest
 t/mysql.mtest

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=73362&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/META.yml (original)
+++ branches/upstream/libdbd-mysql-perl/current/META.yml Sun Apr 24 09:46:24 2011
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               DBD-mysql
-version:            4.017
+version:            4.018
 abstract:           A MySQL driver for the Perl5 Database Interface (DBI)
 author:
     - Rudy Lippan <rlippan at remotelinux.com>

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=73362&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/dbdimp.c (original)
+++ branches/upstream/libdbd-mysql-perl/current/dbdimp.c Sun Apr 24 09:46:24 2011
@@ -2439,6 +2439,18 @@
       result = sv_2mortal(newSViv(imp_dbh->bind_comment_placeholders));
     }
     break;
+  case 'c':
+    if (kl == 10 && strEQ(key, "clientinfo"))
+    {
+      const char* clientinfo = mysql_get_client_info();
+      result= clientinfo ?
+        sv_2mortal(newSVpv(clientinfo, strlen(clientinfo))) : &sv_undef;
+    }
+    else if (kl == 13 && strEQ(key, "clientversion"))
+    {
+      result= sv_2mortal(my_ulonglong2str(mysql_get_client_version()));
+    }
+    break;
   case 'e':
     if (strEQ(key, "errno"))
       result= sv_2mortal(newSViv((IV)mysql_errno(imp_dbh->pmysql)));
@@ -2514,6 +2526,8 @@
       result= serverinfo ?
         sv_2mortal(newSVpv(serverinfo, strlen(serverinfo))) : &PL_sv_undef;
     }
+    else if (kl == 13 && strEQ(key, "serverversion"))
+      result= sv_2mortal(my_ulonglong2str(mysql_get_server_version(imp_dbh->pmysql)));
     else if (strEQ(key, "sock"))
       result= sv_2mortal(newSViv((IV) imp_dbh->pmysql));
     else if (strEQ(key, "sockfd"))
@@ -2548,7 +2562,7 @@
 }
 
 
-/* 
+/*
  **************************************************************************
  *
  *  Name:    dbd_st_prepare

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=73362&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/lib/DBD/mysql.pm (original)
+++ branches/upstream/libdbd-mysql-perl/current/lib/DBD/mysql.pm Sun Apr 24 09:46:24 2011
@@ -9,7 +9,7 @@
 use Carp ();
 @ISA = qw(DynaLoader);
 
-$VERSION = '4.017';
+$VERSION = '4.018';
 
 bootstrap DBD::mysql $VERSION;
 
@@ -1482,6 +1482,27 @@
 the theoretically possible maximum. I<max_length> is valid for MySQL
 only.
 
+=item mysql_clientinfo
+
+List information of the MySQL client library that DBD::mysql was built
+against:
+
+print "$dbh->{mysql_clientinfo}\n";
+
+5.2.0-MariaDB
+
+=item mysql_clientversion
+
+print "$dbh->{mysql_clientversion}\n";
+
+50200
+
+=item mysql_serverversion
+
+print "$dbh->{mysql_serverversion}\n";
+
+50200
+
 =item NAME
 
 A reference to an array of column names.

Added: branches/upstream/libdbd-mysql-perl/current/t/86_bug_36972.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-mysql-perl/current/t/86_bug_36972.t?rev=73362&op=file
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/t/86_bug_36972.t (added)
+++ branches/upstream/libdbd-mysql-perl/current/t/86_bug_36972.t Sun Apr 24 09:46:24 2011
@@ -1,0 +1,46 @@
+#!perl -w
+# vim: ft=perl
+
+use strict;
+use Test::More;
+use DBI;
+use lib 't', '.';
+require 'lib.pl';
+use vars qw($table $test_dsn $test_user $test_password);
+
+$|= 1;
+
+my $dbh;
+eval {$dbh= DBI->connect($test_dsn, $test_user, $test_password,
+                      { RaiseError => 1, PrintError => 1, AutoCommit => 0 });};
+
+if ($@) {
+    plan skip_all => "ERROR: $@. Can't continue test";
+}
+plan tests => 11; 
+
+ok(defined $dbh, "connecting");
+
+#
+# Bug #42723: Binding server side integer parameters results in corrupt data
+#
+ok($dbh->do('DROP TABLE IF EXISTS t1'), "making slate clean");
+
+ok($dbh->do('CREATE TABLE `t1` (`i` int,`si` smallint,`ti` tinyint,`bi` bigint)'), "creating test table");
+
+my $sth2;
+ok($sth2 = $dbh->prepare('INSERT INTO t1 VALUES (?,?,?,?)'));
+
+#bind test values
+ok($sth2->bind_param(1, 101, DBI::SQL_INTEGER), "binding int");
+ok($sth2->bind_param(2, 102, DBI::SQL_SMALLINT), "binding smallint");
+ok($sth2->bind_param(3, 103, DBI::SQL_TINYINT), "binding tinyint");
+ok($sth2->bind_param(4, 104, DBI::SQL_INTEGER), "binding bigint");
+
+ok($sth2->execute(), "inserting data");
+
+is_deeply($dbh->selectall_arrayref('SELECT * FROM t1'), [[101, 102, 103, 104]]);
+
+ok ($dbh->do('DROP TABLE t1'), "cleaning up");
+
+$dbh->disconnect();




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