diff options
author | heikki@hundin.mysql.fi <> | 2004-12-27 04:10:25 +0200 |
---|---|---|
committer | heikki@hundin.mysql.fi <> | 2004-12-27 04:10:25 +0200 |
commit | 7ad5e20461d04809a7e3bf1f966fe51c707f5332 (patch) | |
tree | edc9436d7606b90f03beba7251499fb1e63afa5e /innobase/include/row0mysql.h | |
parent | aa9c7a679202e7f1ebc2f817bbb4896614db5a84 (diff) | |
download | mariadb-git-7ad5e20461d04809a7e3bf1f966fe51c707f5332.tar.gz |
Many files:
Fix InnoDB critical bug #7496; we scan the InnoDB data dictionary also at a normal mysqld startup, and create the spaces, so that we know the mapping space id -> .ibd file name; fix an infinite loop if DISCARD TABLESPACE coincides with INSERT or some other table operation; fix a potential crash if DISCARD TABLESPACE coincides with a cascaded FOREIGN KEY operation in the same table; do not allow DISCARD TABLESPACE of a referenced table if FOREIGN_KEY_CHECKS=1
Diffstat (limited to 'innobase/include/row0mysql.h')
-rw-r--r-- | innobase/include/row0mysql.h | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/innobase/include/row0mysql.h b/innobase/include/row0mysql.h index f47ce74ce37..19007069e28 100644 --- a/innobase/include/row0mysql.h +++ b/innobase/include/row0mysql.h @@ -367,25 +367,7 @@ row_drop_table_for_mysql( /************************************************************************* Discards the tablespace of a table which stored in an .ibd file. Discarding means that this function deletes the .ibd file and assigns a new table id for -the table. Also the flag table->ibd_file_missing is set TRUE. - -How do we prevent crashes caused by ongoing operations on the table? Old -operations could try to access non-existent pages. - -1) SQL queries, INSERT, SELECT, ...: we must get an exclusive MySQL table lock -on the table before we can do DISCARD TABLESPACE. Then there are no running -queries on the table. -2) Purge and rollback: we assign a new table id for the table. Since purge and -rollback look for the table based on the table id, they see the table as -'dropped' and discard their operations. -3) Insert buffer: we remove all entries for the tablespace in the insert -buffer tree; as long as the tablespace mem object does not exist, ongoing -insert buffer page merges are discarded in buf0rea.c. If we recreate the -tablespace mem object with IMPORT TABLESPACE later, then the tablespace will -have the same id, but the tablespace_version field in the mem object is -different, and ongoing old insert buffer page merges get discarded. -4) Linear readahead and random readahead: we use the same method as in 3) to -discard ongoing operations. */ +the table. Also the flag table->ibd_file_missing is set TRUE. */ int row_discard_tablespace_for_mysql( |