mariadb/storage
Sujatha Sivakumar 627e7334ec Bug#16513588:"PREPARE_COMMIT_MUTEX" IS NOT FREED DURING
TRANSACTION ROLLBACK

Problem:
=======
"prepare_commit_mutex" is acquired during "innobase_xa_prepare"
and it is freed only in "innobase_commit". After prepare,
if the commit operation fails the transaction is rolled back
but the mutex is not released.

Analysis:
========
During transaction commit process transaction is prepared and
the "prepare_commit_mutex" is acquired to preserve the order
of commit. After prepare write to binlog is initiated.

File: sql/handler.cc
      if (error || (is_real_trans && xid &&
----->             (error= !(cookie= tc_log->log_xid(thd, xid)))))
      {
        ha_rollback_trans(thd, all);

In the above code "tc_log->log_xid" operation fails.

When the write to binlog fails the transaction is rolled back
with out freeing the mutex. A subsequent "INSERT" operation
tries to acquire the same mutex during its commit process
and the server aborts.

Fix:
===
"prepare_commit_mutex" is freed during "innobase_rollback".
2013-05-07 13:30:25 +05:30
..
archive Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
blackhole Merge 5.5.24 back into main 5.5. 2012-05-07 22:20:42 +02:00
csv Updated/added copyright headers 2012-02-16 10:48:16 +01:00
example Bug#11815557 60269: MYSQL SHOULD REJECT ATTEMPTS TO CREATE SYSTEM 2012-04-11 15:53:17 +05:30
federated Updated/added copyright headers. 2013-02-25 15:26:00 +01:00
heap Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 15:53:48 +01:00
innobase Bug#16513588:"PREPARE_COMMIT_MUTEX" IS NOT FREED DURING 2013-05-07 13:30:25 +05:30
myisam Correcting the permissions of the executable files. 2013-03-20 17:50:15 +01:00
myisammrg Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 15:53:48 +01:00
ndb Correcting the permissions of the executable files. 2013-03-20 17:50:15 +01:00
perfschema Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 15:53:48 +01:00