Commit ab1c2288 authored by Michael Widenius's avatar Michael Widenius

Fix for assert found by mysql-test-run


sql/sql_table.cc:
  Don't call allow_access_to_protected_table() if we haven't protected table against usage.
  Table is mainly protected against usage when one disables keys with alter table.
parent e2a72fef
...@@ -6814,6 +6814,10 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, ...@@ -6814,6 +6814,10 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
error= trans_commit_stmt(thd); error= trans_commit_stmt(thd);
if (trans_commit_implicit(thd)) if (trans_commit_implicit(thd))
error= 1; error= 1;
/*
If the table was locked, allow one to still run SHOW commands against it
*/
if (table->s->protected_against_usage())
table->s->allow_access_to_protected_table(); table->s->allow_access_to_protected_table();
} }
thd->count_cuted_fields= CHECK_FIELD_IGNORE; thd->count_cuted_fields= CHECK_FIELD_IGNORE;
......
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