MDEV-21941: Fix GCC 10 -Wmaybe-uninitialized
commit 105b879d0f541f049a131a5c3b99d678fc7d3213 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.
This commit is contained in:
parent
2a691d5744
commit
7bd3c8a4b3
@ -8146,8 +8146,8 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
|
||||
Field **f_ptr,*field;
|
||||
MY_BITMAP *dropped_fields= NULL; // if it's NULL - no dropped fields
|
||||
bool drop_period= false;
|
||||
LEX_CSTRING period_start_name;
|
||||
LEX_CSTRING period_end_name;
|
||||
LEX_CSTRING period_start_name= {nullptr, 0};
|
||||
LEX_CSTRING period_end_name= {nullptr, 0};
|
||||
if (table->s->period.name)
|
||||
{
|
||||
period_start_name= table->s->period_start_field()->field_name;
|
||||
|
Loading…
x
Reference in New Issue
Block a user