summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-01-27 15:03:30 +0200
committerMonty <monty@mariadb.org>2018-01-27 15:03:30 +0200
commit95f393394442437eea403d91c3c4bd68ec24fdf9 (patch)
tree13c955baf344c372b78fe48ac742ea92e0003ed6 /sql/table.cc
parent8ff5ddae231d31f0ff721d2fd518f65d96142c21 (diff)
downloadmariadb-git-95f393394442437eea403d91c3c4bd68ec24fdf9.tar.gz
Fixed compiler warnings
Only warnings, should not have caused any bugs in old code
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 33f408f958a..3ff13fc9d87 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -1174,7 +1174,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
char *keynames, *names, *comment_pos;
const uchar *forminfo, *extra2;
const uchar *frm_image_end = frm_image + frm_length;
- uchar *record, *null_flags, *null_pos, *mysql57_vcol_null_pos;
+ uchar *record, *null_flags, *null_pos, *UNINIT_VAR(mysql57_vcol_null_pos);
const uchar *disk_buff, *strpos;
ulong pos, record_offset;
ulong rec_buff_length;
@@ -2407,6 +2407,11 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
DBUG_ASSERT(field_nr < share->fields);
reg_field= share->field[field_nr];
}
+ else
+ {
+ reg_field= 0;
+ DBUG_ASSERT(name_length);
+ }
vcol_screen_pos+= FRM_VCOL_NEW_HEADER_SIZE;
vcol_info->set_vcol_type((enum_vcol_info_type) type);
@@ -7411,7 +7416,7 @@ int TABLE::update_virtual_fields(handler *h, enum_vcol_update_mode update_mode)
DBUG_ASSERT(vcol_info);
DBUG_ASSERT(vcol_info->expr);
- bool update, swap_values= 0;
+ bool update= 0, swap_values= 0;
switch (update_mode) {
case VCOL_UPDATE_FOR_READ:
update= !vcol_info->stored_in_db