summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2013-03-05 00:53:18 +0200
committerMichael Widenius <monty@askmonty.org>2013-03-05 00:53:18 +0200
commite2a72fefb4b3e528562bc11ef917da0d77be73b9 (patch)
treecb305279c80c841b561030b3cc9e77ea63f32449 /sql/sql_table.cc
parent9b993fda63846cc05860ba006ff46678435e3fe2 (diff)
downloadmariadb-git-e2a72fefb4b3e528562bc11ef917da0d77be73b9.tar.gz
Fixed issue with LOCK TABLE + ALTER TABLE ENABLE KEYS + SHOW commands.
sql/sql_table.cc: Remove version protection from share when repair has been done. Without this one can't run SHOW commands on the table if it was locked until it's unlocked. sql/table.h: Allow one to remove version protection with allow_access_to_protected_table()
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index aaa59d04f03..ff0684a9ba4 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -6264,12 +6264,14 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
goto err;
DEBUG_SYNC(thd,"alter_table_enable_indexes");
error= table->file->ha_enable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE);
+ table->s->allow_access_to_protected_table();
break;
case DISABLE:
if (wait_while_table_is_used(thd, table, extra_func,
TDC_RT_REMOVE_NOT_OWN_AND_MARK_NOT_USABLE))
goto err;
error=table->file->ha_disable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE);
+ table->s->allow_access_to_protected_table();
break;
default:
DBUG_ASSERT(FALSE);
@@ -6812,6 +6814,7 @@ 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();
}
thd->count_cuted_fields= CHECK_FIELD_IGNORE;