diff options
author | Monty <monty@mariadb.org> | 2018-05-23 00:19:15 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-05-23 00:32:49 +0300 |
commit | 2dff8fecb744380395b27640833bbe0958e5d935 (patch) | |
tree | 5c756a99c572b41d49571e61ad9d4ccc4b337b81 /sql | |
parent | a107c79fcdde80d1dea0a1caf5859647f77b48c9 (diff) | |
download | mariadb-git-2dff8fecb744380395b27640833bbe0958e5d935.tar.gz |
MDEV-15338 Crash in debug build when dropping column that is part of CHECK
Crash happened when deleting all columns that was part of a check constraint
The bug was that read map for from table was used when
checking CHECK constraint and was not properly reset
in copy_data_between_tables()
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_table.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 164634f17ca..b01629cb1e9 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -9844,6 +9844,11 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to, alter_table_manage_keys(to, from->file->indexes_are_disabled(), keys_onoff); + /* Set read map for all fields in from table */ + from->default_column_bitmaps(); + bitmap_set_all(from->read_set); + from->file->column_bitmaps_signal(); + /* We can abort alter table for any table type */ thd->abort_on_warning= !ignore && thd->is_strict_mode(); |