MDEV-25663 Double free of transaction during truncate operation
- Patch addresses the problem to fix double free of transaction if it is own transaction.
This commit is contained in:
parent
349d77ecdd
commit
5c75ba9cad
@ -13155,10 +13155,6 @@ ha_innobase::create(
|
|||||||
innobase_commit_low(trx);
|
innobase_commit_low(trx);
|
||||||
row_mysql_unlock_data_dictionary(trx);
|
row_mysql_unlock_data_dictionary(trx);
|
||||||
|
|
||||||
if (own_trx) {
|
|
||||||
trx_free_for_mysql(trx);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Flush the log to reduce probability that the .frm files and
|
/* Flush the log to reduce probability that the .frm files and
|
||||||
the InnoDB data dictionary get out-of-sync if the user runs
|
the InnoDB data dictionary get out-of-sync if the user runs
|
||||||
with innodb_flush_log_at_trx_commit = 0 */
|
with innodb_flush_log_at_trx_commit = 0 */
|
||||||
@ -13168,10 +13164,8 @@ ha_innobase::create(
|
|||||||
|
|
||||||
error = info.create_table_update_dict();
|
error = info.create_table_update_dict();
|
||||||
|
|
||||||
/* In case of error, free the transaction only if
|
if (own_trx) {
|
||||||
it is newly created transaction in ha_innobase::create() */
|
trx_free_for_mysql(trx);
|
||||||
if (own_trx && error) {
|
|
||||||
trx_free_for_mysql(info.trx());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tell the InnoDB server that there might be work for
|
/* Tell the InnoDB server that there might be work for
|
||||||
|
Loading…
x
Reference in New Issue
Block a user