mirror of
https://github.com/MariaDB/server.git
synced 2025-01-23 23:34:34 +01:00
d0d9299177
Active transactions must not switch table or index definitions on the fly, for several reasons, including the following: * copied indexes do not carry any history or locking information; that is, rollbacks, read views, and record locking would be broken * huge potential for race conditions, inconsistent reads and writes, loss of data, and corruption Instead of trying to track down if the table was changed during a transaction, acquire appropriate locks that protect the creation and dropping of indexes. innodb-index.test: Test the locking of CREATE INDEX and DROP INDEX. Test that consistent reads work across dropped indexes. lock_rec_insert_check_and_lock(): Relax the lock_table_has() assertion. When inserting a record into an index, the table must be at least IX-locked. However, when an index is being created, an IS-lock on the table is sufficient. row_merge_lock_table(): Add the parameter enum lock_mode mode, which must be LOCK_X or LOCK_S. row_merge_drop_table(): Assert that n_mysql_handles_opened == 0. Unconditionally drop the table. ha_innobase::add_index(): Acquire an X or S lock on the table, as appropriate. After acquiring an X lock, assert that n_mysql_handles_opened == 1. Remove the comments about dropping tables in the background. ha_innobase::final_drop_index(): Acquire an X lock on the table. dict_table_t: Remove version_number, to_be_dropped, and prebuilts. ins_node_t: Remove table_version_number. enum lock_mode: Move the definition from lock0lock.h to lock0types.h. ROW_PREBUILT_OBSOLETE, row_update_prebuilt(), row_prebuilt_table_obsolete(): Remove. row_prebuilt_t: Remove the declaration from row0types.h. row_drop_table_for_mysql_no_commit(): Always print a warning if a table was added to the background drop queue. |
||
---|---|---|
.. | ||
ctype_innodb_like.inc | ||
have_innodb.inc | ||
innodb-index-master.opt | ||
innodb-index.inc | ||
innodb-index.result | ||
innodb-index.test | ||
innodb-index_ucs2.result | ||
innodb-index_ucs2.test | ||
innodb-lock.result | ||
innodb-lock.test | ||
innodb-master.opt | ||
innodb-replace.result | ||
innodb-replace.test | ||
innodb-semi-consistent-master.opt | ||
innodb-semi-consistent.result | ||
innodb-semi-consistent.test | ||
innodb.result | ||
innodb.test | ||
innodb_information_schema.result | ||
innodb_information_schema.test | ||
innodb_trx_weight.inc | ||
innodb_trx_weight.result | ||
innodb_trx_weight.test |