From 81bc313e99ed12ff87ca45529a11ab31acc28263 Mon Sep 17 00:00:00 2001 From: "monty@donna.mysql.com" <> Date: Fri, 24 Nov 2000 01:51:18 +0200 Subject: All statements are now run in a sub transaction Give warning if we are using non transactional tables and do ROLLBACK Porting of crash-me and benchmarks to FrontBase --- sql/sql_class.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sql/sql_class.h') diff --git a/sql/sql_class.h b/sql/sql_class.h index af5dcc65688..4003b057c06 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -244,7 +244,8 @@ public: delayed_insert *di; struct st_transactions { IO_CACHE trans_log; - void *bdb_tid; + THD_TRANS all; /* Trans since BEGIN WORK */ + THD_TRANS stmt; /* Trans for current statement */ uint bdb_lock_count; } transaction; Item *free_list; @@ -293,7 +294,12 @@ public: } return last_insert_id; } - inline bool active_transaction() { return transaction.bdb_tid != 0; } + inline bool active_transaction() + { + return (transaction.all.bdb_tid != 0 || + transaction.all.innobase_tid != 0 || + transaction.all.gemeni_tid != 0); + } inline gptr alloc(unsigned int size) { return alloc_root(&mem_root,size); } inline gptr calloc(unsigned int size) { -- cgit v1.2.1