summaryrefslogtreecommitdiff
path: root/sql/sql_admin.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-05-03 13:07:05 +0200
committerSergei Golubchik <serg@mariadb.org>2016-05-05 01:05:05 +0200
commit5ef0ce4131c9e5ebd2e09907a6a89b6c9d6c5afe (patch)
treebb49739a3e83ca9faed8695e468e2d8377cac0d9 /sql/sql_admin.cc
parent92e47c393f707d9877a706f76cf26f226a37166c (diff)
downloadmariadb-git-5ef0ce4131c9e5ebd2e09907a6a89b6c9d6c5afe.tar.gz
comments
Diffstat (limited to 'sql/sql_admin.cc')
-rw-r--r--sql/sql_admin.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index f27cdcc41f2..73f483bbe90 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -622,16 +622,14 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
/*
Close all instances of the table to allow MyISAM "repair"
- to rename files.
+ (which is internally also used from "optimize") to rename files.
@todo: This code does not close all instances of the table.
It only closes instances in other connections, but if this
connection has LOCK TABLE t1 a READ, t1 b WRITE,
both t1 instances will be kept open.
There is no need to execute this branch for InnoDB, which does
- repair by recreate. There is no need to do it for OPTIMIZE,
- which doesn't move files around.
- Hence, this code should be moved to prepare_for_repair(),
- and executed only for MyISAM engine.
+ repair by recreate.
+ Hence, this code should be executed only for MyISAM engine.
*/
if (lock_type == TL_WRITE && !table->table->s->tmp_table)
{