1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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.
This commit is contained in:
Michael Widenius
2013-03-05 20:15:36 +02:00
parent e2a72fefb4
commit ab1c228836

View File

@ -6814,7 +6814,11 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
error= trans_commit_stmt(thd);
if (trans_commit_implicit(thd))
error= 1;
table->s->allow_access_to_protected_table();
/*
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();
}
thd->count_cuted_fields= CHECK_FIELD_IGNORE;