summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2007-07-30 18:10:34 +0400
committerunknown <evgen@moonbone.local>2007-07-30 18:10:34 +0400
commit3887705e09a943f02a831380af3deebef2516443 (patch)
tree92ec199d176c507c6baabcd0d08b943fca421c55 /sql/handler.cc
parentb9097abf00983f479f8e4b9f0ee82ac7fde74adc (diff)
parent9246c3720103caa421d5e0c5d7ad81bf570e071d (diff)
downloadmariadb-git-3887705e09a943f02a831380af3deebef2516443.tar.gz
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into moonbone.local:/mnt/gentoo64/work/24989-bug-5.0-opt-mysql sql/ha_innodb.cc: Auto merged sql/handler.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index dcc9fde8b76..2285a190c8e 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -821,6 +821,9 @@ int ha_rollback_trans(THD *thd, bool all)
}
}
#endif /* USING_TRANSACTIONS */
+ if (all)
+ thd->transaction_rollback_request= FALSE;
+
/*
If a non-transactional table was updated, warn; don't warn if this is a
slave thread (because when a slave thread executes a ROLLBACK, it has
@@ -858,6 +861,8 @@ int ha_autocommit_or_rollback(THD *thd, int error)
if (ha_commit_stmt(thd))
error=1;
}
+ else if (thd->transaction_rollback_request && !thd->in_sub_stmt)
+ (void) ha_rollback(thd);
else
(void) ha_rollback_stmt(thd);