Skip to content

Commit 5ef0ce4

Browse files
committed
comments
1 parent 92e47c3 commit 5ef0ce4

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

sql/handler.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ enum enum_alter_inplace_result {
129129
*/
130130
#define HA_PRIMARY_KEY_REQUIRED_FOR_POSITION (1ULL << 16)
131131
#define HA_CAN_RTREEKEYS (1ULL << 17)
132-
#define HA_NOT_DELETE_WITH_CACHE (1ULL << 18)
132+
#define HA_NOT_DELETE_WITH_CACHE (1ULL << 18) /* unused */
133133
/*
134134
The following is we need to a primary key to delete (and update) a row.
135135
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 {
143143
#define HA_HAS_OLD_CHECKSUM (1ULL << 24)
144144
/* Table data are stored in separate files (for lower_case_table_names) */
145145
#define HA_FILE_BASED (1ULL << 26)
146-
#define HA_NO_VARCHAR (1ULL << 27)
146+
#define HA_NO_VARCHAR (1ULL << 27) /* unused */
147147
#define HA_CAN_BIT_FIELD (1ULL << 28) /* supports bit fields */
148148
#define HA_NEED_READ_RANGE_BUFFER (1ULL << 29) /* for read_multi_range */
149149
#define HA_ANY_INDEX_MAY_BE_UNIQUE (1ULL << 30)

sql/sql_admin.cc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -622,16 +622,14 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
622622

623623
/*
624624
Close all instances of the table to allow MyISAM "repair"
625-
to rename files.
625+
(which is internally also used from "optimize") to rename files.
626626
@todo: This code does not close all instances of the table.
627627
It only closes instances in other connections, but if this
628628
connection has LOCK TABLE t1 a READ, t1 b WRITE,
629629
both t1 instances will be kept open.
630630
There is no need to execute this branch for InnoDB, which does
631-
repair by recreate. There is no need to do it for OPTIMIZE,
632-
which doesn't move files around.
633-
Hence, this code should be moved to prepare_for_repair(),
634-
and executed only for MyISAM engine.
631+
repair by recreate.
632+
Hence, this code should be executed only for MyISAM engine.
635633
*/
636634
if (lock_type == TL_WRITE && !table->table->s->tmp_table)
637635
{

0 commit comments

Comments
 (0)