mariadb/mysql-test/suite
Davi Arnaut b0035c76d4 Bug#54453: Failing assertion: trx->active_trans when renaming a
table with active trx

Essentially, the problem is that InnoDB does a implicit commit
when a cursor (table handler) is unlocked/closed, creating
a dissonance between the transaction state within the server
layer and the storage engine layer. Theoretically, a statement
transaction can encompass several table instances in a similar
manner to a multiple statement transaction, hence it does not
make sense to limit a statement transaction to the lifetime of
the table instances (cursors) used within it.

Since this particular instance of the problem is only triggerable
on 5.1 and is masked on 5.5 due 2PC being skipped (assertion is in
the prepare phase of a 2PC), the solution (which is less risky) is
to explicitly end the transaction before the cached table is unlock
on rename table.

The patch is to be null merged into trunk.

mysql-test/include/commit.inc:
  Fix counters, the binlog engine does not get involved anymore.
mysql-test/suite/innodb_plugin/r/innodb_bug54453.result:
  Add test case result for Bug#54453
mysql-test/suite/innodb_plugin/t/innodb_bug54453.test:
  Add test case for Bug#54453
sql/sql_table.cc:
  End transaction as otherwise InnoDB will end it behind our backs.
2010-07-20 14:36:15 -03:00
..
binlog merge mysql-5.1-bugteam (local) --> mysql-5.1-bugteam 2010-06-27 18:31:42 +01:00
bugs Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
engines Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
federated Fix for bug#32426: "FEDERATED query returns corrupt results 2010-03-05 14:51:37 +04:00
funcs_1 Addendum to bug #53814 : test results updates 2010-07-16 16:56:33 +03:00
funcs_2 merge 5.0-> 5.1 2009-04-24 13:00:17 -04:00
ibmdb2i Bug#49329 example (and other) engines use wrong collation for open tables hash 2009-12-11 12:31:16 +05:30
im Move instance manager tests to it's own suite 2007-08-29 19:02:33 +02:00
innodb Merge mysql-5.1-innodb -> mysql-5.1-security 2010-07-04 10:12:44 +03:00
innodb_plugin Bug#54453: Failing assertion: trx->active_trans when renaming a 2010-07-20 14:36:15 -03:00
jp Bug #45159 : some tests in suite "jp" fail in embedded server (use LOAD DATA) 2009-09-11 15:52:08 +03:00
large_tests Bug#27029 alter table ... enable keys crashes mysqld on large table 2007-06-21 12:45:56 -04:00
manual Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
ndb Bug #49132 Replication failure on temporary table + DDL 2010-01-22 17:38:21 +08:00
ndb_team Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
parts Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl The following statements support the CURRENT_USER() where a user is needed. 2010-07-04 12:02:49 +08:00
rpl_ndb Postfix BUG#49741 2010-05-25 11:39:45 +08:00
stress Merge trift2.:/MySQL/M51/mysql-5.1 2008-02-22 16:14:27 +01:00
sys_vars Bug#53191 Lock_time in slow log is negative when logging stored routines 2010-06-08 10:58:19 +02:00