Skip to content

Commit

Permalink
cleanup: fix a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Dec 12, 2016
1 parent 3a3017a commit d2408e4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 20 deletions.
2 changes: 1 addition & 1 deletion include/my_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
4 changes: 2 additions & 2 deletions sql/sql_parse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4167,15 +4167,15 @@ mysql_execute_command(THD *thd)
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,
select_lex->order_list.elements,
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)
Expand Down
2 changes: 1 addition & 1 deletion sql/sql_select.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 7 additions & 6 deletions sql/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/*
Expand All @@ -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 ;
Expand Down
14 changes: 4 additions & 10 deletions sql/table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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,
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit d2408e4

Please sign in to comment.