1
0
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:
Sergei Golubchik
2023-01-09 12:49:37 +01:00
parent 32f09df2b8
commit 1e6ad0ce13
4 changed files with 42 additions and 6 deletions

View File

@ -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;
}