diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2018-03-08 12:25:01 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2018-03-08 12:25:01 +0200 |
commit | aec4734f615cb13c3687b205782020259ea5a743 (patch) | |
tree | c9aca455ce6536da106194e4bed34abdd6143ff0 | |
parent | a050189773c911e0b9689aa212c44aaa0cea7b66 (diff) | |
download | mariadb-git-bb-10.2-MDEV-13935.tar.gz |
MDEV-13935: INSERT INTO stuck at state "Unlocking tables"bb-10.2-MDEV-13935
There were some differences on MariaDB compared with MySQL.
Fix these differences.
-rw-r--r-- | storage/innobase/include/trx0trx.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index 674eee572ed..412a35a14f4 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -1489,8 +1489,12 @@ private: } /* Avoid excessive mutex acquire/release */ - if (trx->in_depth++) { - /* The transaction is already inside InnoDB. */ + ++trx->in_depth; + + /* If trx->in_depth is greater than 1 then + transaction is already in InnoDB. */ + if (trx->in_depth > 1) { + return; } @@ -1518,7 +1522,10 @@ private: ut_ad(trx->in_depth > 0); - if (--trx->in_depth) { + --trx->in_depth; + + if (trx->in_depth > 0) { + return; } |