diff options
author | Monty <monty@mariadb.org> | 2018-01-01 14:10:22 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-01-01 14:10:22 +0200 |
commit | 322c637c1c7717b5d33e4d7670a39eae17040e3c (patch) | |
tree | 385fe35df07f997cef688af8735c941f19cd8ada /sql/table.cc | |
parent | 7703095d2e26a15d4ecbd3683f9779b97f851c98 (diff) | |
download | mariadb-git-322c637c1c7717b5d33e4d7670a39eae17040e3c.tar.gz |
Fixed compiler warnings about possible uninitialized variables
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sql/table.cc b/sql/table.cc index 811094ccc76..00debaec84e 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -997,7 +997,7 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table, Virtual_column_info **check_constraint_ptr= table->check_constraints; sql_mode_t saved_mode= thd->variables.sql_mode; Query_arena backup_arena; - Virtual_column_info *vcol; + Virtual_column_info *vcol= 0; StringBuffer<MAX_FIELD_WIDTH> expr_str; bool res= 1; DBUG_ENTER("parse_vcol_defs"); @@ -1168,7 +1168,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write, uint new_frm_ver, field_pack_length, new_field_pack_flag; uint interval_count, interval_parts, read_length, int_length; uint db_create_options, keys, key_parts, n_length; - uint com_length, null_bit_pos, mysql57_vcol_null_bit_pos, bitmap_count; + uint com_length, null_bit_pos, UNINIT_VAR(mysql57_vcol_null_bit_pos), bitmap_count; uint i; bool use_hash, mysql57_null_bits= 0; char *keynames, *names, *comment_pos; @@ -2104,6 +2104,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write, } } + key_first_info= keyinfo; for (uint key=0 ; key < keys ; key++,keyinfo++) { uint usable_parts= 0; @@ -2121,9 +2122,6 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write, keyinfo->name_length+1); } - if (!key) - key_first_info= keyinfo; - if (ext_key_parts > share->key_parts && key) { KEY_PART_INFO *new_key_part= (keyinfo-1)->key_part + |