Skip to content

Commit d2408e4

Browse files
committed
cleanup: fix a comment
1 parent 3a3017a commit d2408e4

File tree

5 files changed

+15
-20
lines changed

5 files changed

+15
-20
lines changed

include/my_base.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ typedef ulong key_part_map;
566566
#define HA_STATE_KEY_CHANGED 128
567567
#define HA_STATE_WRITE_AT_END 256 /* set in _ps_find_writepos */
568568
#define HA_STATE_BUFF_SAVED 512 /* If current keybuff is info->buff */
569-
#define HA_STATE_ROW_CHANGED 1024 /* To invalide ROW cache */
569+
#define HA_STATE_ROW_CHANGED 1024 /* To invalidate ROW cache */
570570
#define HA_STATE_EXTEND_BLOCK 2048
571571
#define HA_STATE_RNEXT_SAME 4096 /* rnext_same occupied lastkey2 */
572572

sql/sql_parse.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4167,15 +4167,15 @@ mysql_execute_command(THD *thd)
41674167
DBUG_ASSERT(select_lex->offset_limit == 0);
41684168
unit->set_limit(select_lex);
41694169
MYSQL_UPDATE_START(thd->query());
4170-
res= (up_result= mysql_update(thd, all_tables,
4170+
res= up_result= mysql_update(thd, all_tables,
41714171
select_lex->item_list,
41724172
lex->value_list,
41734173
select_lex->where,
41744174
select_lex->order_list.elements,
41754175
select_lex->order_list.first,
41764176
unit->select_limit_cnt,
41774177
lex->duplicates, lex->ignore,
4178-
&found, &updated));
4178+
&found, &updated);
41794179
MYSQL_UPDATE_DONE(res, found, updated);
41804180
/* mysql_update return 2 if we need to switch to multi-update */
41814181
if (up_result != 2)

sql/sql_select.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1926,7 +1926,7 @@ JOIN::optimize_inner()
19261926
/*
19271927
It's necessary to check const part of HAVING cond as
19281928
there is a chance that some cond parts may become
1929-
const items after make_join_statisctics(for example
1929+
const items after make_join_statistics(for example
19301930
when Item is a reference to cost table field from
19311931
outer join).
19321932
This check is performed only for those conditions

sql/structs.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,11 @@ typedef struct st_keyfile_info { /* used with ha_info() */
6464

6565

6666
typedef struct st_key_part_info { /* Info about a key part */
67-
Field *field;
68-
uint offset; /* offset in record (from 0) */
69-
uint null_offset; /* Offset to null_bit in record */
67+
Field *field; /* the Field object for the indexed
68+
prefix of the original table Field.
69+
NOT necessarily the original Field */
70+
uint offset; /* Offset in record (from 0) */
71+
uint null_offset; /* Offset to null_bit in record */
7072
/* Length of key part in bytes, excluding NULL flag and length bytes */
7173
uint16 length;
7274
/*
@@ -77,9 +79,8 @@ typedef struct st_key_part_info { /* Info about a key part */
7779
*/
7880
uint16 store_length;
7981
uint16 key_type;
80-
/* Fieldnr begins counting from 1 */
81-
uint16 fieldnr; /* Fieldnum in UNIREG */
82-
uint16 key_part_flag; /* 0 or HA_REVERSE_SORT */
82+
uint16 fieldnr; /* Fieldnr begins counting from 1 */
83+
uint16 key_part_flag; /* 0 or HA_REVERSE_SORT */
8384
uint8 type;
8485
uint8 null_bit; /* Position to null_bit */
8586
} KEY_PART_INFO ;

sql/table.cc

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2674,10 +2674,10 @@ static bool fix_and_check_vcol_expr(THD *thd, TABLE *table, Field *field,
26742674
Unpack the definition of a virtual column from its linear representation
26752675
26762676
@param thd The thread object
2677-
@param mem_root Where to allocate memory
2677+
@param mem_root Where to allocate memory
26782678
@param table The table containing the virtual column
2679+
@param field Field if this is a DEFAULT or AS, otherwise NULL
26792680
@param vcol The Virtual_column object
2680-
@param field Field if this is a DEFAULT or AS, otherwise NULL
26812681
@param[out] error_reported Flag to inform the caller that no
26822682
other error messages are to be generated
26832683
@@ -2696,10 +2696,8 @@ static bool fix_and_check_vcol_expr(THD *thd, TABLE *table, Field *field,
26962696
Before passing 'vcol_expr' to the parser the function wraps it in
26972697
parentheses and prepends a special keyword.
26982698
2699-
@retval
2700-
Virtual_column_info* If a success
2701-
@retval
2702-
NULL Error
2699+
@retval Virtual_column_info* Success
2700+
@retval NULL Error
27032701
*/
27042702

27052703
Virtual_column_info *unpack_vcol_info_from_frm(THD *thd,
@@ -2820,10 +2818,6 @@ static bool check_vcol_forward_refs(Field *field, Virtual_column_info *vcol)
28202818
return res;
28212819
}
28222820

2823-
/*
2824-
Read data from a binary .frm file from MySQL 3.23 - 5.0 into TABLE_SHARE
2825-
*/
2826-
28272821
/*
28282822
Open a table based on a TABLE_SHARE
28292823

0 commit comments

Comments
 (0)