summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorHorst.Hunger <horst.hunger@sun.com>2010-04-26 20:44:10 +0200
committerHorst.Hunger <horst.hunger@sun.com>2010-04-26 20:44:10 +0200
commitbef66c5c9ff684de26533153df8188c74dcd45b3 (patch)
tree56d14b5c0a7367d82d1026837f50fc04cacfc138 /mysql-test
parent42c74ad8c3ac1217b4e9b1629405e377ef89bf96 (diff)
downloadmariadb-git-bef66c5c9ff684de26533153df8188c74dcd45b3.tar.gz
backport of patch for blckhole plugin (47748) to trunk-bugfixing.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/have_blackhole_plugin.inc5
-rw-r--r--mysql-test/r/blackhole_plugin.result15
-rw-r--r--mysql-test/t/blackhole_plugin-master.opt1
-rw-r--r--mysql-test/t/blackhole_plugin.test22
4 files changed, 43 insertions, 0 deletions
diff --git a/mysql-test/include/have_blackhole_plugin.inc b/mysql-test/include/have_blackhole_plugin.inc
new file mode 100644
index 00000000000..749efd343d6
--- /dev/null
+++ b/mysql-test/include/have_blackhole_plugin.inc
@@ -0,0 +1,5 @@
+if (`select plugin_library IS NULL from information_schema.plugins where plugin_name LIKE '%blackhole%'`)
+{
+ --skip blackhole plugin not available;
+}
+
diff --git a/mysql-test/r/blackhole_plugin.result b/mysql-test/r/blackhole_plugin.result
new file mode 100644
index 00000000000..9fc0cacd9cc
--- /dev/null
+++ b/mysql-test/r/blackhole_plugin.result
@@ -0,0 +1,15 @@
+CREATE TABLE t1(a int) ENGINE=BLACKHOLE;
+Warnings:
+Warning 1286 Unknown storage engine 'BLACKHOLE'
+Warning 1266 Using storage engine MyISAM for table 't1'
+DROP TABLE t1;
+INSTALL PLUGIN blackhole SONAME 'ha_blackhole.so';
+INSTALL PLUGIN BLACKHOLE SONAME 'ha_blackhole.so';
+ERROR HY000: Function 'BLACKHOLE' already exists
+UNINSTALL PLUGIN blackhole;
+INSTALL PLUGIN blackhole SONAME 'ha_blackhole.so';
+CREATE TABLE t1(a int) ENGINE=BLACKHOLE;
+DROP TABLE t1;
+UNINSTALL PLUGIN blackhole;
+UNINSTALL PLUGIN blackhole;
+ERROR 42000: PLUGIN blackhole does not exist
diff --git a/mysql-test/t/blackhole_plugin-master.opt b/mysql-test/t/blackhole_plugin-master.opt
new file mode 100644
index 00000000000..dff15c6f136
--- /dev/null
+++ b/mysql-test/t/blackhole_plugin-master.opt
@@ -0,0 +1 @@
+--plugin_dir=../storage/blackhole/.libs
diff --git a/mysql-test/t/blackhole_plugin.test b/mysql-test/t/blackhole_plugin.test
new file mode 100644
index 00000000000..5c712233dc7
--- /dev/null
+++ b/mysql-test/t/blackhole_plugin.test
@@ -0,0 +1,22 @@
+--source include/not_windows.inc
+--source include/have_blackhole_plugin.inc
+
+CREATE TABLE t1(a int) ENGINE=BLACKHOLE;
+DROP TABLE t1;
+
+eval INSTALL PLUGIN blackhole SONAME 'ha_blackhole.so';
+--error 1125
+eval INSTALL PLUGIN BLACKHOLE SONAME 'ha_blackhole.so';
+
+UNINSTALL PLUGIN blackhole;
+
+eval INSTALL PLUGIN blackhole SONAME 'ha_blackhole.so';
+
+CREATE TABLE t1(a int) ENGINE=BLACKHOLE;
+
+DROP TABLE t1;
+
+UNINSTALL PLUGIN blackhole;
+--error ER_SP_DOES_NOT_EXIST
+UNINSTALL PLUGIN blackhole;
+