diff options
author | Sergei Golubchik <serg@mariadb.org> | 2021-02-15 16:43:15 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-02-15 16:43:15 +0100 |
commit | 25d9d2e37f37fd3d6dfa0004a142f83c260e7ebf (patch) | |
tree | dedbab65f15c43cfb4abba87f9ff5da7df47a73c /sql/unireg.cc | |
parent | 5e3d3220bbe344b0de60b26c24fd5cdc9fe1741a (diff) | |
parent | 26965387230a9b13fb716344477d108bb87dea98 (diff) | |
download | mariadb-git-25d9d2e37f37fd3d6dfa0004a142f83c260e7ebf.tar.gz |
Merge branch 'bb-10.4-release' into bb-10.5-release
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r-- | sql/unireg.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc index bffe51b6c49..51c4eeb4a4c 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -57,13 +57,7 @@ static bool make_empty_rec(THD *, uchar *, uint, List<Create_field> &, uint, */ static uchar *extra2_write_len(uchar *pos, size_t len) { - /* TODO: should be - if (len > 0 && len <= 255) - *pos++= (uchar)len; - ... - because extra2_read_len() uses 0 for 2-byte lengths. - extra2_str_size() must be fixed too. - */ + DBUG_ASSERT(len); if (len <= 255) *pos++= (uchar)len; else @@ -1151,6 +1145,8 @@ static bool make_empty_rec(THD *thd, uchar *buff, uint table_options, TABLE table; TABLE_SHARE share; Create_field *field; + Check_level_instant_set old_count_cuted_fields(thd, CHECK_FIELD_WARN); + Abort_on_warning_instant_set old_abort_on_warning(thd, 0); DBUG_ENTER("make_empty_rec"); /* We need a table to generate columns for default values */ @@ -1169,7 +1165,6 @@ static bool make_empty_rec(THD *thd, uchar *buff, uint table_options, null_pos= buff; List_iterator<Create_field> it(create_fields); - Check_level_instant_set check_level_save(thd, CHECK_FIELD_WARN); while ((field=it++)) { Record_addr addr(buff + field->offset + data_offset, |