Commit 9c41b35b authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-8220 Server crashes if started with --enforce-storage-engine option

parent d6025745
create table t1 (c1 int primary key auto_increment, c2 varchar(10)) engine=memory;
Warnings:
Note 1266 Using storage engine MyISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL AUTO_INCREMENT,
`c2` varchar(10) DEFAULT NULL,
PRIMARY KEY (`c1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
set session sql_mode='no_engine_substitution';
create table t2 (c1 int primary key auto_increment, c2 varchar(10)) engine=memory;
ERROR 42000: Unknown storage engine 'MEMORY'
drop table t1;
--enforce-storage-engine=myisam
create table t1 (c1 int primary key auto_increment, c2 varchar(10)) engine=memory;
show create table t1;
set session sql_mode='no_engine_substitution';
--error 1286
create table t2 (c1 int primary key auto_increment, c2 varchar(10)) engine=memory;
drop table t1;
...@@ -3107,6 +3107,9 @@ void plugin_thdvar_init(THD *thd) ...@@ -3107,6 +3107,9 @@ void plugin_thdvar_init(THD *thd)
if (global_system_variables.tmp_table_plugin) if (global_system_variables.tmp_table_plugin)
thd->variables.tmp_table_plugin= thd->variables.tmp_table_plugin=
intern_plugin_lock(NULL, global_system_variables.tmp_table_plugin); intern_plugin_lock(NULL, global_system_variables.tmp_table_plugin);
if (global_system_variables.enforced_table_plugin)
thd->variables.enforced_table_plugin=
intern_plugin_lock(NULL, global_system_variables.enforced_table_plugin);
intern_plugin_unlock(NULL, old_table_plugin); intern_plugin_unlock(NULL, old_table_plugin);
intern_plugin_unlock(NULL, old_tmp_table_plugin); intern_plugin_unlock(NULL, old_tmp_table_plugin);
intern_plugin_unlock(NULL, old_enforced_table_plugin); intern_plugin_unlock(NULL, old_enforced_table_plugin);
......
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