⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flush_block_commit.test

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 TEST
字号:
# 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.incconnect (con1,localhost,root,,);connect (con2,localhost,root,,);connect (con3,localhost,root,,);connection con1;--disable_warningsdrop table if exists t1;--enable_warningscreate 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 con2sleep 1;connection con2;select * from t1; # verify con1 was blocked and data did not moveunlock 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 con1sleep 1;connection con3;send flush tables with read lock; # blocked by con2connection con1;commit; # should not be blocked by con3connection con2;reap;connection con3;reap;unlock tables;# BUG#6732 FLUSH TABLES WITH READ LOCK + COMMIT hangs later FLUSH TABLES# WITH READ LOCKconnection con2;commit; # unlock InnoDB row locks to allow insertionsconnection 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 hereunlock tables;# BUG#7358 SHOW CREATE DATABASE fails if open transactionbegin;select * from t1;show create database test;drop table t1;# End of 4.1 tests

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -