summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2017-05-07 18:26:10 +0300
committerMonty <monty@mariadb.org>2017-05-08 02:33:35 +0300
commit1e04ad284c6ac0a9ce433f827bc6dbfbd6029007 (patch)
treeff59557c55b06495d93a3420e8aac09588a87a9d /sql/table.cc
parent276b0c8ef03046cc210e4eeab7231cb8d9f16bac (diff)
downloadmariadb-git-1e04ad284c6ac0a9ce433f827bc6dbfbd6029007.tar.gz
Fixed compiler warnings and warnings from build.tags
Other things - Ensure that ut_d() is set to EXPR if ut_ad() is DEBUG_ASSERT() If not, we will get a crash in purge_sys_t::~purge_sys_t() as this ut_ad() code expect's that the ut_d() codes has been executed
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/table.cc b/sql/table.cc
index fa8ed3c2587..9c3613a879c 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -1177,7 +1177,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, *mysql57_vcol_null_pos= 0;
const uchar *disk_buff, *strpos;
ulong pos, record_offset;
ulong rec_buff_length;
@@ -2387,6 +2387,8 @@ 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; // Safety
vcol_screen_pos+= FRM_VCOL_NEW_HEADER_SIZE;
vcol_info->set_vcol_type((enum_vcol_info_type) type);
@@ -7368,7 +7370,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