summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-04-28 18:02:26 +0300
committerMichael Widenius <monty@askmonty.org>2011-04-28 18:02:26 +0300
commit6da8ac5f71a6501cb0fb1304ff144ec41b4d9389 (patch)
tree25fd264f65836fd6fb0cd183dc670d34ac4b3c37 /sql/sql_class.cc
parent24edac2211c46ea9ebeb4a13bc467fb20008916e (diff)
downloadmariadb-git-6da8ac5f71a6501cb0fb1304ff144ec41b4d9389.tar.gz
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).
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index f8905cd5f8c..a5c06d2aa77 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -674,6 +674,7 @@ THD::THD()
stmt_depends_on_first_successful_insert_id_in_prev_stmt(FALSE),
examined_row_count(0),
global_read_lock(0),
+ global_disable_checkpoint(0),
is_fatal_error(0),
transaction_rollback_request(0),
is_fatal_sub_stmt_error(0),