diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-21 11:26:12 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-21 11:26:12 +0200 |
commit | a9c230669e7ffeb936554c99fc239b612e1172aa (patch) | |
tree | 806f5d1f618c9f47bd2c1cadd3986bf01326b477 /storage | |
parent | 2b00bdfd25fcab34e10785fa4d854a9b939f9efa (diff) | |
download | mariadb-git-a9c230669e7ffeb936554c99fc239b612e1172aa.tar.gz |
Fix -Wmaybe-uninitialized (non-functional change)
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/handler/handler0alter.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index 6c989be7c1b..e0c1c62a472 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -9041,7 +9041,6 @@ innobase_rename_or_enlarge_column_try( bool is_v) { dict_col_t* col; - dict_v_col_t* v_col; DBUG_ENTER("innobase_rename_or_enlarge_column_try"); @@ -9050,12 +9049,16 @@ innobase_rename_or_enlarge_column_try( ut_ad(mutex_own(&dict_sys->mutex)); ut_ad(rw_lock_own(dict_operation_lock, RW_LOCK_X)); + ulint n_base; + if (is_v) { - v_col = dict_table_get_nth_v_col(user_table, pos); + dict_v_col_t* v_col= dict_table_get_nth_v_col(user_table, pos); pos = dict_create_v_col_pos(v_col->v_pos, v_col->m_col.ind); col = &v_col->m_col; + n_base = v_col->num_base; } else { col = dict_table_get_nth_col(user_table, pos); + n_base = 0; } ulint prtype, mtype, len; @@ -9107,8 +9110,7 @@ innobase_rename_or_enlarge_column_try( DBUG_RETURN(innodb_insert_sys_columns(user_table->id, pos, f.field_name.str, mtype, prtype, len, - is_v ? v_col->num_base : 0, - trx, true)); + n_base, trx, true)); } /** Rename or enlarge columns in the data dictionary cache |