1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-17021 Server crash or assertion `length <= column->length' failure in write_block_record

Problem was that the number of NULL bit's was record wrong in the
.frm file because there could be more fields marked NOT_NULL after the
number of not_null fields where recorded.

Fixed by copying test for virtual fields from prepare_create_field()
The code change, only the test, doesn't have to be merged to 10.3
as this is fixed there.
This commit is contained in:
Monty
2018-08-24 18:08:56 +03:00
parent 0cafc13164
commit f195286a3e
3 changed files with 61 additions and 0 deletions

View File

@ -3328,6 +3328,10 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
}
}
/* Virtual fields are always NULL */
if (sql_field->vcol_info)
sql_field->flags&= ~NOT_NULL_FLAG;
if (sql_field->sql_type == MYSQL_TYPE_SET ||
sql_field->sql_type == MYSQL_TYPE_ENUM)
{