mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
don't set default value in temp table if NO_DEFAULT_VALUE_FLAG
when an internal temporary table field is created from a real field, a new temp field should only copy a default from the source field when the latter has it
This commit is contained in:
@ -18241,7 +18241,8 @@ Field *Item_field::create_tmp_field_ex(TABLE *table,
|
||||
src->set_field(field);
|
||||
if (!(result= create_tmp_field_from_item_field(table, NULL, param)))
|
||||
return NULL;
|
||||
if (field->eq_def(result))
|
||||
if (!(field->flags & NO_DEFAULT_VALUE_FLAG) &&
|
||||
field->eq_def(result))
|
||||
src->set_default_field(field);
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user