Commit b23c82fe authored by Michael Widenius's avatar Michael Widenius

MDEV-18078 Assertion `trnman_has_locked_tables(trn) > 0' failed

Problem was that in case of implicit rollback for alter table
Aria did try to run commit twice.

The test case for this is tricky to do in 10.2, so it will
be added to 10.4 as part of BACKUP STAGE testing.
parent 71eea0c3
......@@ -2743,7 +2743,8 @@ int ha_maria::external_lock(THD *thd, int lock_type)
}
else
{
TRN *trn= (file->trn != &dummy_transaction_object ? file->trn : 0);
/* We have to test for THD_TRN to protect against implicit commits */
TRN *trn= (file->trn != &dummy_transaction_object && THD_TRN ? file->trn : 0);
/* End of transaction */
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment