1 --source include/not_windows_embedded.inc
2 --source include/have_example_plugin.inc
4 CREATE TABLE t1(a int) ENGINE=EXAMPLE;
7 --replace_regex /\.dll/.so/
8 eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO;
9 --replace_regex /\.dll/.so/
11 eval INSTALL PLUGIN EXAMPLE SONAME $HA_EXAMPLE_SO;
13 UNINSTALL PLUGIN example;
15 --replace_regex /\.dll/.so/
16 eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO;
18 CREATE TABLE t1(a int) ENGINE=EXAMPLE;
20 # Let's do some advanced ops with the example engine :)
25 UNINSTALL PLUGIN example;
27 UNINSTALL PLUGIN EXAMPLE;
30 UNINSTALL PLUGIN non_exist;
34 --echo # Bug#32034: check_func_enum() does not check correct values but set it
35 --echo # to impossible int val
37 --replace_regex /\.dll/.so/
38 eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO;
40 SET GLOBAL example_enum_var= e1;
41 SET GLOBAL example_enum_var= e2;
43 SET GLOBAL example_enum_var= impossible;
45 UNINSTALL PLUGIN example;
50 # Bug #32757 hang with sql_mode set when setting some global variables
52 --replace_regex /\.dll/.so/
53 eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO;
55 select @@session.sql_mode into @old_sql_mode;
57 # first, try normal sql_mode (no error, send OK)
58 set session sql_mode='';
59 set global example_ulong_var=500;
60 select @@global.example_ulong_var;
61 # overflow -- correct value, but throw warning
62 set global example_ulong_var=1111;
63 select @@global.example_ulong_var;
65 # now, try STRICT (error occurrs, no message is sent, so send default)
66 set session sql_mode='STRICT_ALL_TABLES';
67 set global example_ulong_var=500;
68 select @@global.example_ulong_var;
69 # overflow -- throw warning, do NOT change value
70 --error ER_WRONG_VALUE_FOR_VAR
71 set global example_ulong_var=1111;
72 select @@global.example_ulong_var;
74 set session sql_mode=@old_sql_mode;
76 # finally, show that conditions that already raised an error are not
77 # adversely affected (error was already sent, do nothing)
78 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
81 UNINSTALL PLUGIN example;