summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2010-10-18 11:25:06 +0200
committerunknown <knielsen@knielsen-hq.org>2010-10-18 11:25:06 +0200
commitffa7e0fabe50ceb00d2d64f4806fb87f9f607b3a (patch)
tree90302fed95b148e857d4a9b669695dc3214c2110 /sql/sql_parse.cc
parent8bc445360ee9f21560b5613e0bdc8b363f34d5b6 (diff)
downloadmariadb-git-ffa7e0fabe50ceb00d2d64f4806fb87f9f607b3a.tar.gz
MWL#116: Efficient group commit: Fix bug that binlog pos stored by XtraDB during commit was wrong when more than one commit in group.
Now the actual binlog position for each commit is stored in THD, and XtraDB can fetch the correct value from within commit_ordered() or commit(). mysql-test/r/group_commit_binlog_pos.result: Test case for XtraDB binlog position. mysql-test/t/group_commit_binlog_pos-master.opt: Test case for XtraDB binlog position. mysql-test/t/group_commit_binlog_pos.test: Test case for XtraDB binlog position. sql/log.cc: Save binlog position corresponding to commit in THD, and make accessible to storage engine. sql/sql_parse.cc: Add generic crash point for use in test cases. storage/xtradb/handler/ha_innodb.cc: Update to use new method of getting current binlog position that works with group commit. storage/xtradb/handler/ha_innodb.h: Update to use new method of getting current binlog position that works with group commit.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index caec049c244..8dee0155f2b 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -999,6 +999,10 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
DBUG_ENTER("dispatch_command");
DBUG_PRINT("info", ("command: %d", command));
+ DBUG_EXECUTE_IF("crash_dispatch_command_before",
+ { DBUG_PRINT("crash_dispatch_command_before", ("now"));
+ DBUG_ABORT(); });
+
thd->command=command;
/*
Commands which always take a long time are logged into