List:Commits« Previous MessageNext Message »
From:Alexander Nozdrin Date:March 14 2011 11:03am
Subject:bzr commit into mysql-5.5 branch (alexander.nozdrin:3367) Bug#11765297
View as plain text  
#At file:///home/alik/MySQL/bzr/00/bug58251/mysql-5.5-bug58251/ based on revid:joerg.bruehe@stripped

 3367 Alexander Nozdrin	2011-03-14
      A patch for Bug#11765297 (58251 - archive_plugin and blackhole_plugin
      fails when running with ps-protocol).
      
      The problem was that when running in --ps-protocol mode mysqltest.cc
      didn't close created prepared statements. So, the plugins could not be
      unistalled because there was a prepared statement using them.
      
      A fix is to add a dummy statement that forces mysqltest.cc to close
      the last prepared statement (which uses a plugin-defined table).

    modified:
      mysql-test/r/archive_plugin.result
      mysql-test/r/blackhole_plugin.result
      mysql-test/t/archive_plugin.test
      mysql-test/t/blackhole_plugin.test
=== modified file 'mysql-test/r/archive_plugin.result'
--- a/mysql-test/r/archive_plugin.result	2010-04-26 19:39:24 +0000
+++ b/mysql-test/r/archive_plugin.result	2011-03-14 11:03:08 +0000
@@ -10,6 +10,9 @@ UNINSTALL PLUGIN archive;
 INSTALL PLUGIN archive SONAME 'ha_archive.so';
 CREATE TABLE t1(a int) ENGINE=ARCHIVE;
 DROP TABLE t1;
+SELECT 1;
+1
+1
 UNINSTALL PLUGIN archive;
 UNINSTALL PLUGIN archive;
 ERROR 42000: PLUGIN archive does not exist

=== modified file 'mysql-test/r/blackhole_plugin.result'
--- a/mysql-test/r/blackhole_plugin.result	2010-04-26 18:44:10 +0000
+++ b/mysql-test/r/blackhole_plugin.result	2011-03-14 11:03:08 +0000
@@ -10,6 +10,9 @@ UNINSTALL PLUGIN blackhole;
 INSTALL PLUGIN blackhole SONAME 'ha_blackhole.so';
 CREATE TABLE t1(a int) ENGINE=BLACKHOLE;
 DROP TABLE t1;
+SELECT 1;
+1
+1
 UNINSTALL PLUGIN blackhole;
 UNINSTALL PLUGIN blackhole;
 ERROR 42000: PLUGIN blackhole does not exist

=== modified file 'mysql-test/t/archive_plugin.test'
--- a/mysql-test/t/archive_plugin.test	2010-06-14 09:23:49 +0000
+++ b/mysql-test/t/archive_plugin.test	2011-03-14 11:03:08 +0000
@@ -20,6 +20,14 @@ CREATE TABLE t1(a int) ENGINE=ARCHIVE;
 
 DROP TABLE t1;
 
+# This dummy statement is required for --ps-protocol mode.
+# The thing is that last prepared statement is "cached" in mysqltest.cc
+# (unless "reconnect" is enabled, and that's not the case here).
+# This statement forces mysqltest.cc to close prepared "DROP TABLE t1".
+# Otherwise, the plugin can not be uninstalled because there is an active
+# prepared statement using it.
+SELECT 1;
+
 UNINSTALL PLUGIN archive;
 
 --error ER_SP_DOES_NOT_EXIST 

=== modified file 'mysql-test/t/blackhole_plugin.test'
--- a/mysql-test/t/blackhole_plugin.test	2010-06-14 09:23:49 +0000
+++ b/mysql-test/t/blackhole_plugin.test	2011-03-14 11:03:08 +0000
@@ -20,6 +20,14 @@ CREATE TABLE t1(a int) ENGINE=BLACKHOLE;
 
 DROP TABLE t1;
 
+# This dummy statement is required for --ps-protocol mode.
+# The thing is that last prepared statement is "cached" in mysqltest.cc
+# (unless "reconnect" is enabled, and that's not the case here).
+# This statement forces mysqltest.cc to close prepared "DROP TABLE t1".
+# Otherwise, the plugin can not be uninstalled because there is an active
+# prepared statement using it.
+SELECT 1;
+
 UNINSTALL PLUGIN blackhole;
 --error ER_SP_DOES_NOT_EXIST
 UNINSTALL PLUGIN blackhole;


Attachment: [text/bzr-bundle] bzr/alexander.nozdrin@oracle.com-20110314110308-avxfnzy61z9vtlqz.bundle
Thread
bzr commit into mysql-5.5 branch (alexander.nozdrin:3367) Bug#11765297Alexander Nozdrin14 Mar