summaryrefslogtreecommitdiff
path: root/sql/field.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-11-17 21:57:16 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-11-19 00:07:06 +0200
commitb80df9eba23b4eb9694e770a41135127c6dbc5df (patch)
treeefcdc041750474de31ed8406e7ddc7e9be76478b /sql/field.cc
parentbd2b05df6c5806e599698eb239b3e44b971eb031 (diff)
downloadmariadb-git-b80df9eba23b4eb9694e770a41135127c6dbc5df.tar.gz
MDEV-21069 Crash on DROP TABLE if the data file is corrupted
buf_read_ibuf_merge_pages(): Discard any page numbers that are outside the current bounds of the tablespace, by invoking the function ibuf_delete_recs() that was introduced in MDEV-20934. This could avoid an infinite change buffer merge loop on innodb_fast_shutdown=0, because normally the change buffer merge would only be attempted if a page was successfully loaded into the buffer pool. dict_drop_index_tree(): Add the parameter trx_t*. To prevent the DROP TABLE crash, do not invoke btr_free_if_exists() if the entire .ibd file will be dropped. Thus, we will avoid a crash if the BTR_SEG_LEAF or BTR_SEG_TOP of the index is corrupted, and we will also avoid unnecessarily accessing the to-be-dropped tablespace via the buffer pool. In MariaDB 10.2, we disable the DROP TABLE fix if innodb_safe_truncate=0, because the backup-unsafe MySQL 5.7 WL#6501 form of TRUNCATE TABLE requires that the individual pages be freed inside the tablespace.
Diffstat (limited to 'sql/field.cc')
0 files changed, 0 insertions, 0 deletions