summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-06-23 21:47:07 +0200
committerunknown <serg@serg.mylan>2004-06-23 21:47:07 +0200
commit253e0a213be0dfff1c201d62081ec05cbd1bfae8 (patch)
tree6cd5f4008934990cdea25b8a9a29edcec8c12790 /sql/handler.cc
parent66bece2018bf2f6c7143b1619dd88e0b8e4c9a0e (diff)
parent006a624c68a1ad7a66ec7167a69e548f21daed3d (diff)
downloadmariadb-git-253e0a213be0dfff1c201d62081ec05cbd1bfae8.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1 client/mysqldump.c: Auto merged configure.in: Auto merged sql/handler.cc: Auto merged
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc21
1 files changed, 11 insertions, 10 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 2b3c91c9a93..0e1b2d62a4f 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -588,10 +588,11 @@ int ha_rollback_trans(THD *thd, THD_TRANS *trans)
if ((trans == &thd->transaction.all) && mysql_bin_log.is_open())
{
/*
- Update the binary log with a BEGIN/ROLLBACK block if we have cached some
- queries and we updated some non-transactional table. Such cases should
- be rare (updating a non-transactional table inside a transaction...).
- Count disk writes to trans_log in any case.
+ Update the binary log with a BEGIN/ROLLBACK block if we have
+ cached some queries and we updated some non-transactional
+ table. Such cases should be rare (updating a
+ non-transactional table inside a transaction...). Count disk
+ writes to trans_log in any case.
*/
if (my_b_tell(&thd->transaction.trans_log))
{
@@ -636,12 +637,12 @@ int ha_rollback_trans(THD *thd, THD_TRANS *trans)
simply truncate the binlog cache, we lose the part of the binlog cache where
the update is. If we want to not lose it, we need to write the SAVEPOINT
command and the ROLLBACK TO SAVEPOINT command to the binlog cache. The latter
- is easy: it's just write at the end of the binlog cache, but the former should
- be *inserted* to the place where the user called SAVEPOINT. The solution is
- that when the user calls SAVEPOINT, we write it to the binlog cache (so no
- need to later insert it). As transactions are never intermixed in the binary log
- (i.e. they are serialized), we won't have conflicts with savepoint names when
- using mysqlbinlog or in the slave SQL thread.
+ is easy: it's just write at the end of the binlog cache, but the former
+ should be *inserted* to the place where the user called SAVEPOINT. The
+ solution is that when the user calls SAVEPOINT, we write it to the binlog
+ cache (so no need to later insert it). As transactions are never intermixed
+ in the binary log (i.e. they are serialized), we won't have conflicts with
+ savepoint names when using mysqlbinlog or in the slave SQL thread.
Then when ROLLBACK TO SAVEPOINT is called, if we updated some
non-transactional table, we don't truncate the binlog cache but instead write
ROLLBACK TO SAVEPOINT to it; otherwise we truncate the binlog cache (which