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
3366 Joerg Bruehe 2011-03-11
Fight a problem in internal test builds:
When a RPM test build in a non-release branch is done,
the $MYSQL_BINDIR variable ends in "/usr"
(rather than in "/usr/lib" as in a RPM release build),
this made test "file_contents" fail.
A branch for this case is added to the test.
The test result is unchanged.
@ mysql-test/t/file_contents.test
Fight a problem in internal test builds:
When a RPM test build in a non-release branch is done,
the $MYSQL_BINDIR variable ends in "/usr"
(rather than in "/usr/lib" as in a RPM release build),
this made test "file_contents" fail.
Because of this, the old logic did not recognize
that a RPM build is done (trailing '/' missing!)
and took the tar.gz branch.
Just removing the trailing '/' from the "/usr" is
not enough, as the logic for RPMs used to replace
"/lib" which is not present at all; rather, a new
branch was added.
To help in case of future problems, the error messages
for a failing "open()" now also report "$MYSQL_BINDIR".
modified:
mysql-test/t/file_contents.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;
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.5 branch (alexander.nozdrin:3366 to 3367) Bug#11765297 | Alexander Nozdrin | 14 Mar |