mirror of
https://github.com/MariaDB/server.git
synced 2025-07-07 06:01:31 +03:00
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.
This commit is contained in:
@ -725,9 +725,9 @@ call p_verify_status_increment(4, 4, 4, 4);
|
||||
alter table t3 add column (b int);
|
||||
call p_verify_status_increment(2, 0, 2, 0);
|
||||
alter table t3 rename t4;
|
||||
call p_verify_status_increment(2, 2, 2, 2);
|
||||
call p_verify_status_increment(1, 0, 1, 0);
|
||||
rename table t4 to t3;
|
||||
call p_verify_status_increment(2, 2, 2, 2);
|
||||
call p_verify_status_increment(1, 0, 1, 0);
|
||||
truncate table t3;
|
||||
call p_verify_status_increment(4, 4, 4, 4);
|
||||
create view v1 as select * from t2;
|
||||
|
Reference in New Issue
Block a user