Bug#45548: XA transaction without access to InnoDB tables crashes the server

The problem is that the one phase commit function failed to
properly end a empty transaction. The solution is to ensure
that the transaction cleanup procedure is invoked even for
empty transactions.

mysql-test/r/xa.result:
  Add test case result for Bug#45548
mysql-test/t/xa.test:
  Add test case for Bug#45548
sql/handler.cc:
  Invoke transaction cleanup function whenever a transaction is ended.
This commit is contained in:
Davi Arnaut 2009-06-25 12:25:23 -03:00
commit eefdd70ab2
3 changed files with 25 additions and 2 deletions

View file

@ -135,6 +135,20 @@ xa start 'a';
xa end 'a';
xa rollback 'a';
#
# Bug#45548: XA transaction without access to InnoDB tables crashes the server
#
xa start 'a';
xa end 'a';
xa prepare 'a';
xa commit 'a';
xa start 'a';
xa end 'a';
xa prepare 'a';
xa commit 'a';
# Wait till all disconnects are completed
--source include/wait_until_count_sessions.inc