r60245 - in /branches/upstream/libdbd-mysql-perl/current: ChangeLog META.yml dbdimp.c dbdimp.h lib/DBD/mysql.pm t/mysql.mtest

ansgar-guest at users.alioth.debian.org ansgar-guest at users.alioth.debian.org
Mon Jul 12 09:53:41 UTC 2010


Author: ansgar-guest
Date: Mon Jul 12 09:53:11 2010
New Revision: 60245

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

Modified:
    branches/upstream/libdbd-mysql-perl/current/ChangeLog
    branches/upstream/libdbd-mysql-perl/current/META.yml
    branches/upstream/libdbd-mysql-perl/current/dbdimp.c
    branches/upstream/libdbd-mysql-perl/current/dbdimp.h
    branches/upstream/libdbd-mysql-perl/current/lib/DBD/mysql.pm
    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=60245&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/ChangeLog (original)
+++ branches/upstream/libdbd-mysql-perl/current/ChangeLog Mon Jul 12 09:53:11 2010
@@ -1,3 +1,9 @@
+2010-07-10 Patrick Galbraith <patg at patg.net> (4.016)
+* Disabled mysql_bind_type_guessing due to one performance issue 
+  querying on a indexed character column unquoted will mean the index 
+  is not used
+* Fixed int types that should be bools
+
 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)

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=60245&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/META.yml (original)
+++ branches/upstream/libdbd-mysql-perl/current/META.yml Mon Jul 12 09:53:11 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               DBD-mysql
-version:            4.015
+version:            4.016
 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=60245&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/dbdimp.c (original)
+++ branches/upstream/libdbd-mysql-perl/current/dbdimp.c Mon Jul 12 09:53:11 2010
@@ -2017,7 +2017,7 @@
 
   imp_dbh->stats.auto_reconnects_ok= 0;
   imp_dbh->stats.auto_reconnects_failed= 0;
-  imp_dbh->bind_type_guessing= TRUE;
+  imp_dbh->bind_type_guessing= FALSE;
   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. */
@@ -3050,7 +3050,7 @@
                                        int use_mysql_use_result
                                       )
 {
-  bool bind_type_guessing= TRUE;
+  bool bind_type_guessing= FALSE;
   bool bind_comment_placeholders= TRUE;
   STRLEN slen;
   char *sbuf = SvPV(statement, slen);

Modified: branches/upstream/libdbd-mysql-perl/current/dbdimp.h
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-mysql-perl/current/dbdimp.h?rev=60245&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/dbdimp.h (original)
+++ branches/upstream/libdbd-mysql-perl/current/dbdimp.h Mon Jul 12 09:53:11 2010
@@ -145,26 +145,25 @@
     dbih_dbc_t com;         /*  MUST be first element in structure   */
 
     MYSQL *pmysql;
-    int has_transactions;   /*  boolean indicating support for
+    bool has_transactions;   /*  boolean indicating support for
 			     *  transactions, currently always  TRUE for MySQL
 			     */
     bool auto_reconnect;
+    bool bind_type_guessing;
+    bool bind_comment_placeholders;
+    bool no_autocommit_cmd;
+    bool use_mysql_use_result; /* TRUE if execute should use
+                               * mysql_use_result rather than
+                               * mysql_store_result
+                               */
+    bool use_server_side_prepare;
+#if defined(sv_utf8_decode) && MYSQL_VERSION_ID >=SERVER_PREPARE_VERSION
+    bool enable_utf8;
+#endif
     struct {
 	    unsigned int auto_reconnects_ok;
 	    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
-                               * mysql_store_result
-                               */
-    int use_server_side_prepare;
-    int has_autodetect_prepare;
-#if defined(sv_utf8_decode) && MYSQL_VERSION_ID >=SERVER_PREPARE_VERSION
-    bool enable_utf8;
-#endif
 };
 
 

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=60245&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/lib/DBD/mysql.pm (original)
+++ branches/upstream/libdbd-mysql-perl/current/lib/DBD/mysql.pm Mon Jul 12 09:53:11 2010
@@ -9,7 +9,7 @@
 use Carp ();
 @ISA = qw(DynaLoader);
 
-$VERSION = '4.015';
+$VERSION = '4.016';
 
 bootstrap DBD::mysql $VERSION;
 
@@ -1294,6 +1294,41 @@
 successfully run the full test suite with this option turned on,
 the name can now be simply C<mysql_bind_type_guessing>. 
 
+CAVEAT: Even though you can insert an integer value into a 
+character column, if this column is indexed, if you query that
+column with the integer value not being quoted, it will not 
+use the index:
+
+MariaDB [test]> explain select * from test where value0 = '3' \G
+*************************** 1. row ***************************
+           id: 1
+  select_type: SIMPLE
+        table: test
+         type: ref
+possible_keys: value0
+          key: value0
+      key_len: 13
+          ref: const
+         rows: 1
+        Extra: Using index condition
+1 row in set (0.00 sec)
+
+MariaDB [test]> explain select * from test where value0 = 3
+    -> \G
+*************************** 1. row ***************************
+           id: 1
+  select_type: SIMPLE
+        table: test
+         type: ALL
+possible_keys: value0
+          key: NULL
+      key_len: NULL
+          ref: NULL
+         rows: 6
+        Extra: Using where
+1 row in set (0.00 sec)
+
+
 See bug: https://rt.cpan.org/Ticket/Display.html?id=43822
 
 =item mysql_bind_comment_placeholders

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=60245&op=diff
==============================================================================
--- branches/upstream/libdbd-mysql-perl/current/t/mysql.mtest (original)
+++ branches/upstream/libdbd-mysql-perl/current/t/mysql.mtest Mon Jul 12 09:53:11 2010
@@ -8,8 +8,8 @@
          'nofoundrows' => 0,
          'testdb' => 'test',
          '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',
+         'testuser' => 'root',
+         'testpassword' => '',
          'testsocket' => ''
        };
 $::test_host = $opt->{'testhost'};




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