mariadb/mysql-test/suite
Jon Olav Hauglid 9ff272fbbd A 5.5 version of the fix for Bug #54360 "Deadlock DROP/ALTER/CREATE
DATABASE with open HANDLER"

Remove LOCK_create_db, database name locks, and use metadata locks instead.
This exposes CREATE/DROP/ALTER DATABASE statements to the graph-based
deadlock detector in MDL, and paves the way for a safe, deadlock-free
implementation of RENAME DATABASE.

Database DDL statements will now take exclusive metadata locks on
the database name, while table/view/routine DDL statements take
intention exclusive locks on the database name. This prevents race
conditions between database DDL and table/view/routine DDL.
(e.g. DROP DATABASE with concurrent CREATE/ALTER/DROP TABLE)

By adding database name locks, this patch implements
WL#4450 "DDL locking: CREATE/DROP DATABASE must use database locks" and
WL#4985 "DDL locking: namespace/hierarchical locks".

The patch also changes code to use init_one_table() where appropriate.
The new lock_table_names() function requires TABLE_LIST::db_length to
be set correctly, and this is taken care of by init_one_table().

This patch also adds a simple template to help work with 
the mysys HASH data structure.

Most of the patch was written by Konstantin Osipov.
2010-07-01 15:53:46 +02:00
..
binlog WL#5349 Change default storage engine to InnoDB 2010-06-17 22:51:35 +02:00
bugs Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
engines Manual merge 2010-05-26 22:34:25 +08:00
federated Bug #53261 MTR tests archive_plugin and blackhole_plugin fail when compiling with cmake 2010-06-14 11:23:49 +02:00
funcs_1 WL#5349 Change default storage engine to InnoDB 2010-06-17 22:51:35 +02:00
funcs_2 merge 5.0-> 5.1 2009-04-24 13:00:17 -04:00
ibmdb2i Bug#49329 example (and other) engines use wrong collation for open tables hash 2009-12-11 12:31:16 +05:30
innodb Post-push fixup for WL#5349 2010-06-20 22:43:34 +02:00
jp WL#2360 Performance schema 2010-01-11 18:47:27 -07:00
large_tests bug#50296 2010-02-28 19:39:28 +02:00
manual Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
ndb BUG#50479 DDL stmt on row-only/stmt-only tables generate spurious binlog_format 2010-06-02 00:25:08 +01:00
ndb_team Manual merge 2010-05-26 22:34:25 +08:00
parts WL#5349 Change default storage engine to InnoDB 2010-06-17 22:51:35 +02:00
perfschema A 5.5 version of the fix for Bug #54360 "Deadlock DROP/ALTER/CREATE 2010-07-01 15:53:46 +02:00
perfschema_stress WL#2360 Performance schema 2010-01-11 18:47:27 -07:00
rpl Bug #50124 Rpl failure on DROP table with concurrent txn/non-txn 2010-06-25 09:32:24 +02:00
rpl_ndb Manual merge from mysql-trunk-bugfixing. 2010-06-07 12:47:04 +04:00
stress
sys_vars Post-push fixup for WL#5349 2010-06-20 22:43:34 +02:00