summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-03-05 21:48:06 +0100
committerSergei Golubchik <sergii@pisem.net>2012-03-05 21:48:06 +0100
commit1c530b36d1c3a84c8022230e478da62021e6faa9 (patch)
treeea3862310bb5ee3ec8f813a4bed640db70a0ee4b /mysql-test
parent98141ea42b5c7e1f0426372be01c9ee6fbf9046f (diff)
downloadmariadb-git-1c530b36d1c3a84c8022230e478da62021e6faa9.tar.gz
mdev-20: INSTALL PLUGIN SONAME
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/plugin.result57
-rw-r--r--mysql-test/r/plugin_maturity.result8
-rw-r--r--mysql-test/t/plugin.test24
-rw-r--r--mysql-test/t/plugin_maturity.test6
-rw-r--r--mysql-test/t/ps.test3
5 files changed, 77 insertions, 21 deletions
diff --git a/mysql-test/r/plugin.result b/mysql-test/r/plugin.result
index 7c89beb9725..5ccd64b5c30 100644
--- a/mysql-test/r/plugin.result
+++ b/mysql-test/r/plugin.result
@@ -3,15 +3,41 @@ Warnings:
Warning 1286 Unknown storage engine 'EXAMPLE'
Warning 1266 Using storage engine MyISAM for table 't1'
DROP TABLE t1;
-INSTALL PLUGIN example SONAME 'ha_example.so';
-INSTALL PLUGIN EXAMPLE SONAME 'ha_example.so';
+INSTALL PLUGIN example SONAME 'ha_example';
+INSTALL PLUGIN EXAMPLE SONAME 'ha_example';
ERROR HY000: Function 'EXAMPLE' already exists
UNINSTALL PLUGIN example;
-INSTALL PLUGIN example SONAME 'ha_example.so';
+INSTALL SONAME 'ha_example';
+select * from information_schema.plugins where plugin_library like 'ha_example%';
+PLUGIN_NAME EXAMPLE
+PLUGIN_VERSION 0.1
+PLUGIN_STATUS ACTIVE
+PLUGIN_TYPE STORAGE ENGINE
+PLUGIN_TYPE_VERSION #
+PLUGIN_LIBRARY ha_example.so
+PLUGIN_LIBRARY_VERSION 1.1
+PLUGIN_AUTHOR Brian Aker, MySQL AB
+PLUGIN_DESCRIPTION Example storage engine
+PLUGIN_LICENSE GPL
+LOAD_OPTION ON
+PLUGIN_MATURITY Experimental
+PLUGIN_AUTH_VERSION 0.1
+PLUGIN_NAME UNUSABLE
+PLUGIN_VERSION 3.14
+PLUGIN_STATUS ACTIVE
+PLUGIN_TYPE DAEMON
+PLUGIN_TYPE_VERSION #
+PLUGIN_LIBRARY ha_example.so
+PLUGIN_LIBRARY_VERSION 1.1
+PLUGIN_AUTHOR Sergei Golubchik
+PLUGIN_DESCRIPTION Unusable Daemon
+PLUGIN_LICENSE GPL
+LOAD_OPTION ON
+PLUGIN_MATURITY Experimental
+PLUGIN_AUTH_VERSION 3.14.15.926
CREATE TABLE t1(a int) ENGINE=EXAMPLE;
SELECT * FROM t1;
a
-DROP TABLE t1;
set global example_ulong_var=500;
set global example_enum_var= e1;
show status like 'example%';
@@ -21,7 +47,24 @@ show variables like 'example%';
Variable_name Value
example_enum_var e1
example_ulong_var 500
-UNINSTALL PLUGIN example;
+UNINSTALL SONAME 'ha_example';
+Warnings:
+Warning 1620 Plugin is busy and will be uninstalled on shutdown
+select * from information_schema.plugins where plugin_library like 'ha_example%';
+PLUGIN_NAME EXAMPLE
+PLUGIN_VERSION 0.1
+PLUGIN_STATUS DELETED
+PLUGIN_TYPE STORAGE ENGINE
+PLUGIN_TYPE_VERSION #
+PLUGIN_LIBRARY ha_example.so
+PLUGIN_LIBRARY_VERSION 1.1
+PLUGIN_AUTHOR Brian Aker, MySQL AB
+PLUGIN_DESCRIPTION Example storage engine
+PLUGIN_LICENSE GPL
+LOAD_OPTION ON
+PLUGIN_MATURITY Experimental
+PLUGIN_AUTH_VERSION 0.1
+DROP TABLE t1;
UNINSTALL PLUGIN EXAMPLE;
ERROR 42000: PLUGIN EXAMPLE does not exist
UNINSTALL PLUGIN non_exist;
@@ -30,13 +73,13 @@ ERROR 42000: PLUGIN non_exist does not exist
# Bug#32034: check_func_enum() does not check correct values but set it
# to impossible int val
#
-INSTALL PLUGIN example SONAME 'ha_example.so';
+INSTALL PLUGIN example SONAME 'ha_example';
SET GLOBAL example_enum_var= e1;
SET GLOBAL example_enum_var= e2;
SET GLOBAL example_enum_var= impossible;
ERROR 42000: Variable 'example_enum_var' can't be set to the value of 'impossible'
UNINSTALL PLUGIN example;
-INSTALL PLUGIN example SONAME 'ha_example.so';
+INSTALL PLUGIN example SONAME 'ha_example';
select @@session.sql_mode into @old_sql_mode;
set session sql_mode='';
set global example_ulong_var=500;
diff --git a/mysql-test/r/plugin_maturity.result b/mysql-test/r/plugin_maturity.result
index 97147459f6f..3249ea9b3c1 100644
--- a/mysql-test/r/plugin_maturity.result
+++ b/mysql-test/r/plugin_maturity.result
@@ -1,2 +1,8 @@
INSTALL PLUGIN example SONAME 'ha_example.so';
-ERROR HY000: Can't open shared library 'ha_example.so' (errno: 0 Loading of experimental plugins is prohibited by --plugin-maturity=stable)
+ERROR HY000: Can't open shared library 'ha_example.so' (errno: 0 Loading of experimental plugin EXAMPLE is prohibited by --plugin-maturity=stable)
+INSTALL SONAME 'ha_example.so';
+ERROR HY000: Can't open shared library 'ha_example.so' (errno: 0 Loading of experimental plugin EXAMPLE is prohibited by --plugin-maturity=stable)
+show warnings;
+Level Code Message
+Error 1126 Can't open shared library 'ha_example.so' (errno: 0 Loading of experimental plugin EXAMPLE is prohibited by --plugin-maturity=stable)
+Error 1126 Can't open shared library 'ha_example.so' (errno: 0 Loading of experimental plugin UNUSABLE is prohibited by --plugin-maturity=stable)
diff --git a/mysql-test/t/plugin.test b/mysql-test/t/plugin.test
index 6b0308cfc32..2b234b64047 100644
--- a/mysql-test/t/plugin.test
+++ b/mysql-test/t/plugin.test
@@ -4,23 +4,23 @@
CREATE TABLE t1(a int) ENGINE=EXAMPLE;
DROP TABLE t1;
---replace_regex /\.dll/.so/
-eval INSTALL PLUGIN example SONAME '$HA_EXAMPLE_SO';
+eval INSTALL PLUGIN example SONAME 'ha_example';
--replace_regex /\.dll/.so/
--error 1125
-eval INSTALL PLUGIN EXAMPLE SONAME '$HA_EXAMPLE_SO';
+eval INSTALL PLUGIN EXAMPLE SONAME 'ha_example';
UNINSTALL PLUGIN example;
+eval INSTALL SONAME 'ha_example';
+--replace_column 5 #
--replace_regex /\.dll/.so/
-eval INSTALL PLUGIN example SONAME '$HA_EXAMPLE_SO';
+--query_vertical select * from information_schema.plugins where plugin_library like 'ha_example%'
CREATE TABLE t1(a int) ENGINE=EXAMPLE;
# Let's do some advanced ops with the example engine :)
SELECT * FROM t1;
-DROP TABLE t1;
# a couple of tests for variables
set global example_ulong_var=500;
@@ -28,7 +28,13 @@ set global example_enum_var= e1;
show status like 'example%';
show variables like 'example%';
-UNINSTALL PLUGIN example;
+eval UNINSTALL SONAME 'ha_example';
+--replace_column 5 #
+--replace_regex /\.dll/.so/
+--query_vertical select * from information_schema.plugins where plugin_library like 'ha_example%'
+
+DROP TABLE t1;
+
--error 1305
UNINSTALL PLUGIN EXAMPLE;
@@ -40,8 +46,7 @@ UNINSTALL PLUGIN non_exist;
--echo # Bug#32034: check_func_enum() does not check correct values but set it
--echo # to impossible int val
--echo #
---replace_regex /\.dll/.so/
-eval INSTALL PLUGIN example SONAME '$HA_EXAMPLE_SO';
+eval INSTALL PLUGIN example SONAME 'ha_example';
SET GLOBAL example_enum_var= e1;
SET GLOBAL example_enum_var= e2;
@@ -55,8 +60,7 @@ UNINSTALL PLUGIN example;
#
# Bug #32757 hang with sql_mode set when setting some global variables
#
---replace_regex /\.dll/.so/
-eval INSTALL PLUGIN example SONAME '$HA_EXAMPLE_SO';
+eval INSTALL PLUGIN example SONAME 'ha_example';
select @@session.sql_mode into @old_sql_mode;
diff --git a/mysql-test/t/plugin_maturity.test b/mysql-test/t/plugin_maturity.test
index fe95f19b803..e1e4941492e 100644
--- a/mysql-test/t/plugin_maturity.test
+++ b/mysql-test/t/plugin_maturity.test
@@ -4,3 +4,9 @@
--replace_regex /\.dll/.so/
--error 1126
eval INSTALL PLUGIN example SONAME '$HA_EXAMPLE_SO';
+
+--replace_regex /\.dll/.so/
+--error 1126
+eval INSTALL SONAME '$HA_EXAMPLE_SO';
+--replace_regex /\.dll/.so/
+show warnings;
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test
index ce7c498133c..58e85c7a3a1 100644
--- a/mysql-test/t/ps.test
+++ b/mysql-test/t/ps.test
@@ -2594,13 +2594,10 @@ drop table t1;
create procedure proc_1() install plugin my_plug soname 'some_plugin.so';
---replace_regex /(Can\'t open shared library).*$/\1/
--error ER_CANT_OPEN_LIBRARY,ER_FEATURE_DISABLED
call proc_1();
---replace_regex /(Can\'t open shared library).*$/\1/
--error ER_CANT_OPEN_LIBRARY,ER_FEATURE_DISABLED
call proc_1();
---replace_regex /(Can\'t open shared library).*$/\1/
--error ER_CANT_OPEN_LIBRARY,ER_FEATURE_DISABLED
call proc_1();
drop procedure proc_1;