From 6da8ac5f71a6501cb0fb1304ff144ec41b4d9389 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Thu, 28 Apr 2011 18:02:26 +0300 Subject: Added option "AND DISABLE CHECKPOINT" to "FLUSH TABLES WITH READ LOCK" This makes it possible to do safe multi volume snapshots as long as one snapshots the volume with the transaction logs last. include/mysql_com.h: Added REFRESH_CHECKPOINT mysql-test/r/flush.result: Added test of new FLUSH TABLES syntax + calls to checkpoint_status handler calls mysql-test/t/flush.test: Added test of new FLUSH TABLES syntax + calls to checkpoint_status handler calls sql/handler.cc: Added code to call checkpoint_state for all handlertons that supports it sql/handler.h: Added new checkpoint_state() handlerton call to temporarly disable checkpoints. sql/lex.h: Added CHECKPOINT keyword sql/sql_yacc.yy: Added support for FLUSH TABLES WITH READ LOCK AND DISABLE CHECKPOINT storage/maria/ha_maria.cc: Added handlerton call to disable checkpoints. storage/maria/ma_checkpoint.c: Don't do checkpoint if checkpoints are disabled. storage/maria/ma_static.c: Added maria_checkpoint_disabled storage/maria/maria_def.h: Added maria_checkpoint_disabled storage/xtradb/handler/ha_innodb.cc: Added handlerton call to disable checkpoints. storage/xtradb/include/log0log.h: Added option to log_checkpoint() to allow one to ignore not critical checkpoints during the time checkpoints are disabled. storage/xtradb/log/log0log.c: Added code to allow one to disable checkpoints during a FLUSH TABLES ... DISABLE CHECKPOINT This was done by adding a new argument to log_checkpoint() which tells us when the checkpoint is called by srv_master_thread (which are safe to ignore) storage/xtradb/srv/srv0srv.c: Tell log_checkpoint() that checkpoints from srv_master_thread() are safe to ignore (will just delay recovery time a bit). --- mysql-test/t/flush.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/t/flush.test') diff --git a/mysql-test/t/flush.test b/mysql-test/t/flush.test index f27d4cf2fad..b0d685e2b41 100644 --- a/mysql-test/t/flush.test +++ b/mysql-test/t/flush.test @@ -28,7 +28,7 @@ enable_query_log; connection con1; select * from t1; connection con2; -flush tables with read lock; +flush tables with read lock and disable checkpoint; --error 1223 drop table t2; connection con1; -- cgit v1.2.1