mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
7fb9d64989
Part of MDEV-5336 Implement LOCK FOR BACKUP Originally both table metadata lock and global read lock protection were acquired before getting TABLE from table cache. This will be reordered in a future commit with MDL_BACKUP_XXX locks so that we first take table metadata lock, then get TABLE from table cache, then acquire analogue of global read lock. This patch both simplifies FLUSH TABLES code, makes FLUSH TABLES to lock less and also enables FLUSH TABLES code to be used with backup locks. The usage of FLUSH TABLES changes slightly: - FLUSH TABLES without any arguments will now only close not used tables and tables locked by the FLUSH TABLES connection. All not used table shares will be closed. Tables locked by the FLUSH TABLES connection will be reopened and re-locked after all others has stoped using the table (as before). If there was no locked tables, then FLUSH TABLES is instant and will not cause any waits. FLUSH TABLES will not wait for any in use table. - FLUSH TABLES with a table list, will ensure that the tables are closed before statement returns. The code is now only using MDL locks and not table share versions, which simplices the code greatly. One visible change is that the server will wait for the end of the transaction that are using the tables. Before FLUSH TABLES only waited for the statements to end. Signed-off-by: Monty <monty@mariadb.org>
23 lines
1 KiB
Text
23 lines
1 KiB
Text
# The test is not relevant when testing replication of error codes for
|
|
# statements that are not replicated. The test below could be changed
|
|
# to rely on the replication of error codes for statements that are not
|
|
# replicated row-based.
|
|
#
|
|
# See if an EE_ error in one event of the master's binlog stops replication
|
|
# (it should not: in this configuration the EE_ error is probably not
|
|
# critical). Example: you do a DROP TABLE on a table which has no MYI file
|
|
# check if START SLAVE, RESET SLAVE, CHANGE MASTER reset Last_slave_error and
|
|
# Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986).
|
|
####################################
|
|
#"REQUIREMENT: A master DROP TABLE on a table with non-existing MYI
|
|
# file must be correctly replicated to the slave"
|
|
####################################
|
|
-- source include/master-slave.inc
|
|
|
|
eval create table t1 (a int) engine=$engine_type;
|
|
flush tables t1;
|
|
let $MYSQLD_DATADIR= `select @@datadir`;
|
|
remove_file $MYSQLD_DATADIR/test/t1.MYI ;
|
|
drop table if exists t1;
|
|
|
|
--source include/rpl_end.inc
|