diff options
author | Michael Widenius <monty@askmonty.org> | 2013-03-05 00:53:18 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2013-03-05 00:53:18 +0200 |
commit | e2a72fefb4b3e528562bc11ef917da0d77be73b9 (patch) | |
tree | cb305279c80c841b561030b3cc9e77ea63f32449 /sql/table.h | |
parent | 9b993fda63846cc05860ba006ff46678435e3fe2 (diff) | |
download | mariadb-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/table.h')
-rw-r--r-- | sql/table.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/table.h b/sql/table.h index eaea0fe65e5..cfdc0ffd077 100644 --- a/sql/table.h +++ b/sql/table.h @@ -807,6 +807,15 @@ struct TABLE_SHARE version= 0; } /* + This is used only for the case of locked tables, as we want to + allow one to do SHOW commands on them even after ALTER or REPAIR + */ + inline void allow_access_to_protected_table() + { + DBUG_ASSERT(version == 0); + version= 1; + } + /* Remove from table definition cache at close. Table can still be opened by SHOW */ |