diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 3b2e57abcf5..5193524ca05 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4186,11 +4186,7 @@ mysql_execute_command(THD *thd) goto end_with_restore_list; } - /* Copy temporarily the statement flags to thd for lock_table_names() */ - uint save_thd_create_info_options= thd->lex->create_info.options; - thd->lex->create_info.options|= create_info.options; res= open_and_lock_tables(thd, create_info, lex->query_tables, TRUE, 0); - thd->lex->create_info.options= save_thd_create_info_options; if (unlikely(res)) { /* Got error or warning. Set res to 1 if error */ diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 16f2a0a0b70..5aacf8bf4d6 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -5543,12 +5543,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, properly isolated from all concurrent operations which matter. */ - /* Copy temporarily the statement flags to thd for lock_table_names() */ - // QQ: is this really needed??? - uint save_thd_create_info_options= thd->lex->create_info.options; - thd->lex->create_info.options|= create_info->options; - res= open_tables(thd, &thd->lex->query_tables, ¬_used, 0); - thd->lex->create_info.options= save_thd_create_info_options; + res= open_tables(thd, *create_info, &thd->lex->query_tables, ¬_used, 0); if (res) {