diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index 0757936a8f7942c24c4715c0fcd96cbb96a38e61..73aaa23679f8c9b5a9243cd01b77f6760ddc9fa8 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -1,3 +1,5 @@ +set global innodb_support_xa=default; +set session innodb_support_xa=default; SET SESSION STORAGE_ENGINE = InnoDB; drop table if exists t1,t2,t3,t1m,t1i,t2m,t2i,t4; create table t1 ( diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test index 934955381411b7c3a7c8cc77ae1ad5d817eca5e9..a907866f7265e96936ced3455c966648af2fc577 100644 --- a/mysql-test/t/innodb_mysql.test +++ b/mysql-test/t/innodb_mysql.test @@ -10,5 +10,6 @@ let $engine_type= InnoDB; let $other_engine_type= MEMORY; # InnoDB does support FOREIGN KEYFOREIGN KEYs let $test_foreign_keys= 1; - +set global innodb_support_xa=default; +set session innodb_support_xa=default; --source include/mix1.inc diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 2d33da29b7759e526f92329013b30323bc2a309d..1ec56e0caea5ef31e2f7ddf6d848b733140db9bf 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -181,6 +181,7 @@ class sys_var_pluginvar: public sys_var TYPELIB* plugin_var_typelib(void); uchar* value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); bool check(THD *thd, set_var *var); + bool check_default(enum_var_type type) { return is_readonly(); } void set_default(THD *thd, enum_var_type type); bool update(THD *thd, set_var *var); }; @@ -2168,9 +2169,11 @@ static st_bookmark *register_var(const char *plugin, const char *name, size= sizeof(int); break; case PLUGIN_VAR_LONG: + case PLUGIN_VAR_ENUM: size= sizeof(long); break; case PLUGIN_VAR_LONGLONG: + case PLUGIN_VAR_SET: size= sizeof(ulonglong); break; case PLUGIN_VAR_STR: @@ -2611,6 +2614,7 @@ void sys_var_pluginvar::set_default(THD *thd, enum_var_type type) if (is_readonly()) return; + pthread_mutex_lock(&LOCK_global_system_variables); tgt= real_value_ptr(thd, type); src= ((void **) (plugin_var + 1) + 1); @@ -2627,12 +2631,14 @@ void sys_var_pluginvar::set_default(THD *thd, enum_var_type type) if (!(plugin_var->flags & PLUGIN_VAR_THDLOCAL) || type == OPT_GLOBAL) { - pthread_mutex_lock(&LOCK_plugin); plugin_var->update(thd, plugin_var, tgt, src); - pthread_mutex_unlock(&LOCK_plugin); + pthread_mutex_unlock(&LOCK_global_system_variables); } else + { + pthread_mutex_unlock(&LOCK_global_system_variables); plugin_var->update(thd, plugin_var, tgt, src); + } }