Commit 7bd3c8a4 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-21941: Fix GCC 10 -Wmaybe-uninitialized

commit 105b879d introduced this
warning. The warning looks harmless, but GCC does not understand
that the initialization and the use of the variables are guarded
by the same predicate.
parent 2a691d57
...@@ -8146,8 +8146,8 @@ mysql_prepare_alter_table(THD *thd, TABLE *table, ...@@ -8146,8 +8146,8 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
Field **f_ptr,*field; Field **f_ptr,*field;
MY_BITMAP *dropped_fields= NULL; // if it's NULL - no dropped fields MY_BITMAP *dropped_fields= NULL; // if it's NULL - no dropped fields
bool drop_period= false; bool drop_period= false;
LEX_CSTRING period_start_name; LEX_CSTRING period_start_name= {nullptr, 0};
LEX_CSTRING period_end_name; LEX_CSTRING period_end_name= {nullptr, 0};
if (table->s->period.name) if (table->s->period.name)
{ {
period_start_name= table->s->period_start_field()->field_name; period_start_name= table->s->period_start_field()->field_name;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment