mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
ea1f7e4b56
libmysqld/lib_sql.cc: check for bootstrap added mysql-test/include/federated.inc: disabled in embedded mysql-test/mysql-test-run.pl: we disable ssh in embedded server mysql-test/r/bdb.result: part moved to bdb_notembedded as it uses binlog mysql-test/r/flush_block_commit.result: part moved to flush_block_commit_notembedded mysql-test/r/insert.result: part moved to insert_notembedded as delayed works differently in embedded server mysql-test/r/insert_select.result: part moved to insert_notembedded as GRANTS usually disabled in embedded server mysql-test/r/join.result: access rights hidden in result mysql-test/t/backup.test: now available in embedded server mysql-test/t/bdb.test: part moved to bdb_notembedded as it uses binlog mysql-test/t/delayed.test: code trimmed mysql-test/t/execution_constants.test: skipped in embedded-server mode mysql-test/t/flush_block_commit.test: moved to flush_block_commit_notembedded mysql-test/t/information_schema_db.test: skipped in embedded-server mysql-test/t/innodb.test: directories replaced to be embedded-server compliant mysql-test/t/insert.test: part moved to insert_notembedded mysql-test/t/insert_select.test: part moved to insert_notembedded mysql-test/t/join.test: access rights hidden mysql-test/t/status.test: skipped in embedded server mysql-test/t/trigger.test: directories replaced to be embedded-server compliant sql/item_strfunc.cc: extra contexts not needed whan access checks disabled sql/share/errmsg.txt: bigger paths reserved to prevent test's fails mysql-test/r/bdb_notembedded.result: ***MISSING WEAVE*** mysql-test/r/flush_block_commit_notembedded.result: added mysql-test/r/insert_notembedded.result: added mysql-test/t/bdb_notembedded.test: ***MISSING WEAVE*** mysql-test/t/flush_block_commit_notembedded.test: added mysql-test/t/insert_notembedded.test: added
77 lines
1.6 KiB
Text
77 lines
1.6 KiB
Text
# Let's see if FLUSH TABLES WITH READ LOCK blocks COMMIT of existing
|
|
# transactions.
|
|
# We verify that we did not introduce a deadlock.
|
|
# This is intended to mimick how mysqldump and innobackup work.
|
|
|
|
# And it requires InnoDB
|
|
-- source include/have_innodb.inc
|
|
|
|
connect (con1,localhost,root,,);
|
|
connect (con2,localhost,root,,);
|
|
connect (con3,localhost,root,,);
|
|
connection con1;
|
|
|
|
--disable_warnings
|
|
drop table if exists t1;
|
|
--enable_warnings
|
|
create table t1 (a int) engine=innodb;
|
|
|
|
# blocks COMMIT ?
|
|
|
|
begin;
|
|
insert into t1 values(1);
|
|
connection con2;
|
|
flush tables with read lock;
|
|
select * from t1;
|
|
connection con1;
|
|
send commit; # blocked by con2
|
|
sleep 1;
|
|
connection con2;
|
|
select * from t1; # verify con1 was blocked and data did not move
|
|
unlock tables;
|
|
connection con1;
|
|
reap;
|
|
|
|
# No deadlock ?
|
|
|
|
connection con1;
|
|
begin;
|
|
select * from t1 for update;
|
|
connection con2;
|
|
begin;
|
|
send select * from t1 for update; # blocked by con1
|
|
sleep 1;
|
|
connection con3;
|
|
send flush tables with read lock; # blocked by con2
|
|
connection con1;
|
|
commit; # should not be blocked by con3
|
|
connection con2;
|
|
reap;
|
|
connection con3;
|
|
reap;
|
|
unlock tables;
|
|
|
|
# BUG#6732 FLUSH TABLES WITH READ LOCK + COMMIT hangs later FLUSH TABLES
|
|
# WITH READ LOCK
|
|
|
|
connection con2;
|
|
commit; # unlock InnoDB row locks to allow insertions
|
|
connection con1;
|
|
begin;
|
|
insert into t1 values(10);
|
|
flush tables with read lock;
|
|
commit;
|
|
unlock tables;
|
|
connection con2;
|
|
flush tables with read lock; # bug caused hang here
|
|
unlock tables;
|
|
|
|
# BUG#7358 SHOW CREATE DATABASE fails if open transaction
|
|
|
|
begin;
|
|
select * from t1;
|
|
show create database test;
|
|
|
|
drop table t1;
|
|
|
|
# End of 4.1 tests
|