From d2408e43f912d91de3c982330d62f717e63efbc5 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 1 Apr 2016 18:42:15 +0200 Subject: [PATCH] cleanup: fix a comment --- include/my_base.h | 2 +- sql/sql_parse.cc | 4 ++-- sql/sql_select.cc | 2 +- sql/structs.h | 13 +++++++------ sql/table.cc | 14 ++++---------- 5 files changed, 15 insertions(+), 20 deletions(-) diff --git a/include/my_base.h b/include/my_base.h index f5842685f9d..84b2e28d340 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -566,7 +566,7 @@ typedef ulong key_part_map; #define HA_STATE_KEY_CHANGED 128 #define HA_STATE_WRITE_AT_END 256 /* set in _ps_find_writepos */ #define HA_STATE_BUFF_SAVED 512 /* If current keybuff is info->buff */ -#define HA_STATE_ROW_CHANGED 1024 /* To invalide ROW cache */ +#define HA_STATE_ROW_CHANGED 1024 /* To invalidate ROW cache */ #define HA_STATE_EXTEND_BLOCK 2048 #define HA_STATE_RNEXT_SAME 4096 /* rnext_same occupied lastkey2 */ diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index a2a4ed2b77e..d80706e6796 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4167,7 +4167,7 @@ end_with_restore_list: DBUG_ASSERT(select_lex->offset_limit == 0); unit->set_limit(select_lex); MYSQL_UPDATE_START(thd->query()); - res= (up_result= mysql_update(thd, all_tables, + res= up_result= mysql_update(thd, all_tables, select_lex->item_list, lex->value_list, select_lex->where, @@ -4175,7 +4175,7 @@ end_with_restore_list: select_lex->order_list.first, unit->select_limit_cnt, lex->duplicates, lex->ignore, - &found, &updated)); + &found, &updated); MYSQL_UPDATE_DONE(res, found, updated); /* mysql_update return 2 if we need to switch to multi-update */ if (up_result != 2) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 168e0af5d38..63a86bae054 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1926,7 +1926,7 @@ JOIN::optimize_inner() /* It's necessary to check const part of HAVING cond as there is a chance that some cond parts may become - const items after make_join_statisctics(for example + const items after make_join_statistics(for example when Item is a reference to cost table field from outer join). This check is performed only for those conditions diff --git a/sql/structs.h b/sql/structs.h index e51f3e0fe3a..144e12ca06c 100644 --- a/sql/structs.h +++ b/sql/structs.h @@ -64,9 +64,11 @@ typedef struct st_keyfile_info { /* used with ha_info() */ typedef struct st_key_part_info { /* Info about a key part */ - Field *field; - uint offset; /* offset in record (from 0) */ - uint null_offset; /* Offset to null_bit in record */ + Field *field; /* the Field object for the indexed + prefix of the original table Field. + NOT necessarily the original Field */ + uint offset; /* Offset in record (from 0) */ + uint null_offset; /* Offset to null_bit in record */ /* Length of key part in bytes, excluding NULL flag and length bytes */ uint16 length; /* @@ -77,9 +79,8 @@ typedef struct st_key_part_info { /* Info about a key part */ */ uint16 store_length; uint16 key_type; - /* Fieldnr begins counting from 1 */ - uint16 fieldnr; /* Fieldnum in UNIREG */ - uint16 key_part_flag; /* 0 or HA_REVERSE_SORT */ + uint16 fieldnr; /* Fieldnr begins counting from 1 */ + uint16 key_part_flag; /* 0 or HA_REVERSE_SORT */ uint8 type; uint8 null_bit; /* Position to null_bit */ } KEY_PART_INFO ; diff --git a/sql/table.cc b/sql/table.cc index d4d5d02e939..9a2cad8c128 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -2674,10 +2674,10 @@ static bool fix_and_check_vcol_expr(THD *thd, TABLE *table, Field *field, Unpack the definition of a virtual column from its linear representation @param thd The thread object - @param mem_root Where to allocate memory + @param mem_root Where to allocate memory @param table The table containing the virtual column + @param field Field if this is a DEFAULT or AS, otherwise NULL @param vcol The Virtual_column object - @param field Field if this is a DEFAULT or AS, otherwise NULL @param[out] error_reported Flag to inform the caller that no other error messages are to be generated @@ -2696,10 +2696,8 @@ static bool fix_and_check_vcol_expr(THD *thd, TABLE *table, Field *field, Before passing 'vcol_expr' to the parser the function wraps it in parentheses and prepends a special keyword. - @retval - Virtual_column_info* If a success - @retval - NULL Error + @retval Virtual_column_info* Success + @retval NULL Error */ 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) return res; } -/* - Read data from a binary .frm file from MySQL 3.23 - 5.0 into TABLE_SHARE -*/ - /* Open a table based on a TABLE_SHARE