Commit 5ef0ce41 authored by Sergei Golubchik's avatar Sergei Golubchik

comments

parent 92e47c39
...@@ -129,7 +129,7 @@ enum enum_alter_inplace_result { ...@@ -129,7 +129,7 @@ enum enum_alter_inplace_result {
*/ */
#define HA_PRIMARY_KEY_REQUIRED_FOR_POSITION (1ULL << 16) #define HA_PRIMARY_KEY_REQUIRED_FOR_POSITION (1ULL << 16)
#define HA_CAN_RTREEKEYS (1ULL << 17) #define HA_CAN_RTREEKEYS (1ULL << 17)
#define HA_NOT_DELETE_WITH_CACHE (1ULL << 18) #define HA_NOT_DELETE_WITH_CACHE (1ULL << 18) /* unused */
/* /*
The following is we need to a primary key to delete (and update) a row. The following is we need to a primary key to delete (and update) a row.
If there is no primary key, all columns needs to be read on update and delete If there is no primary key, all columns needs to be read on update and delete
...@@ -143,7 +143,7 @@ enum enum_alter_inplace_result { ...@@ -143,7 +143,7 @@ enum enum_alter_inplace_result {
#define HA_HAS_OLD_CHECKSUM (1ULL << 24) #define HA_HAS_OLD_CHECKSUM (1ULL << 24)
/* Table data are stored in separate files (for lower_case_table_names) */ /* Table data are stored in separate files (for lower_case_table_names) */
#define HA_FILE_BASED (1ULL << 26) #define HA_FILE_BASED (1ULL << 26)
#define HA_NO_VARCHAR (1ULL << 27) #define HA_NO_VARCHAR (1ULL << 27) /* unused */
#define HA_CAN_BIT_FIELD (1ULL << 28) /* supports bit fields */ #define HA_CAN_BIT_FIELD (1ULL << 28) /* supports bit fields */
#define HA_NEED_READ_RANGE_BUFFER (1ULL << 29) /* for read_multi_range */ #define HA_NEED_READ_RANGE_BUFFER (1ULL << 29) /* for read_multi_range */
#define HA_ANY_INDEX_MAY_BE_UNIQUE (1ULL << 30) #define HA_ANY_INDEX_MAY_BE_UNIQUE (1ULL << 30)
......
...@@ -622,16 +622,14 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, ...@@ -622,16 +622,14 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
/* /*
Close all instances of the table to allow MyISAM "repair" 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. @todo: This code does not close all instances of the table.
It only closes instances in other connections, but if this It only closes instances in other connections, but if this
connection has LOCK TABLE t1 a READ, t1 b WRITE, connection has LOCK TABLE t1 a READ, t1 b WRITE,
both t1 instances will be kept open. both t1 instances will be kept open.
There is no need to execute this branch for InnoDB, which does There is no need to execute this branch for InnoDB, which does
repair by recreate. There is no need to do it for OPTIMIZE, repair by recreate.
which doesn't move files around. Hence, this code should be executed only for MyISAM engine.
Hence, this code should be moved to prepare_for_repair(),
and executed only for MyISAM engine.
*/ */
if (lock_type == TL_WRITE && !table->table->s->tmp_table) if (lock_type == TL_WRITE && !table->table->s->tmp_table)
{ {
......
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