Commit 42e3c5d1 authored by Alexander Nozdrin's avatar Alexander Nozdrin

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).
parent a8f5ef62
...@@ -10,6 +10,9 @@ UNINSTALL PLUGIN archive; ...@@ -10,6 +10,9 @@ UNINSTALL PLUGIN archive;
INSTALL PLUGIN archive SONAME 'ha_archive.so'; INSTALL PLUGIN archive SONAME 'ha_archive.so';
CREATE TABLE t1(a int) ENGINE=ARCHIVE; CREATE TABLE t1(a int) ENGINE=ARCHIVE;
DROP TABLE t1; DROP TABLE t1;
SELECT 1;
1
1
UNINSTALL PLUGIN archive; UNINSTALL PLUGIN archive;
UNINSTALL PLUGIN archive; UNINSTALL PLUGIN archive;
ERROR 42000: PLUGIN archive does not exist ERROR 42000: PLUGIN archive does not exist
...@@ -10,6 +10,9 @@ UNINSTALL PLUGIN blackhole; ...@@ -10,6 +10,9 @@ UNINSTALL PLUGIN blackhole;
INSTALL PLUGIN blackhole SONAME 'ha_blackhole.so'; INSTALL PLUGIN blackhole SONAME 'ha_blackhole.so';
CREATE TABLE t1(a int) ENGINE=BLACKHOLE; CREATE TABLE t1(a int) ENGINE=BLACKHOLE;
DROP TABLE t1; DROP TABLE t1;
SELECT 1;
1
1
UNINSTALL PLUGIN blackhole; UNINSTALL PLUGIN blackhole;
UNINSTALL PLUGIN blackhole; UNINSTALL PLUGIN blackhole;
ERROR 42000: PLUGIN blackhole does not exist ERROR 42000: PLUGIN blackhole does not exist
...@@ -20,6 +20,14 @@ CREATE TABLE t1(a int) ENGINE=ARCHIVE; ...@@ -20,6 +20,14 @@ CREATE TABLE t1(a int) ENGINE=ARCHIVE;
DROP TABLE t1; 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; UNINSTALL PLUGIN archive;
--error ER_SP_DOES_NOT_EXIST --error ER_SP_DOES_NOT_EXIST
......
...@@ -20,6 +20,14 @@ CREATE TABLE t1(a int) ENGINE=BLACKHOLE; ...@@ -20,6 +20,14 @@ CREATE TABLE t1(a int) ENGINE=BLACKHOLE;
DROP TABLE t1; 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; UNINSTALL PLUGIN blackhole;
--error ER_SP_DOES_NOT_EXIST --error ER_SP_DOES_NOT_EXIST
UNINSTALL PLUGIN blackhole; UNINSTALL PLUGIN blackhole;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment