Closed bc-m closed 3 years ago
With the debug log enabled, you can see that RESET statement is sent first before the COMMIT statement.
==> conn:1105470 Reset(0,5)
+--------------------------------------------------+
| 0 1 2 3 4 5 6 7 8 9 a b c d e f |
+--------------------------------------------------+------------------+
| 01 00 00 00 1F | ..... |
+--------------------------------------------------+------------------+
==> conn:1105470 Query(0,11)
+--------------------------------------------------+
| 0 1 2 3 4 5 6 7 8 9 a b c d e f |
+--------------------------------------------------+------------------+
| 07 00 00 00 03 43 4F 4D 4D 49 54 | .....COMMIT |
+--------------------------------------------------+------------------+
Handled in Jira by MariaDB, see https://jira.mariadb.org/browse/CONJS-171?focusedCommentId=199581&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-199581. That's why I'm closing the ticket here.
In our application, we get a connection from the pool, start a transaction, add a few records and commit them. After the commit, we release the connection. It looks like releasing the connection sporadically undoes the commit.
Our script (reduced to interactions with mariadb):
If we run this multiple times we missed about 1 of 5 transactions. How is that possible?
If we set
noControlAfterUse
in the pool configuration, all transactions are committed correctly.Setup: MariaDB Database: 10.5 MariaDB Package: 2.5.4 NodeJS: 14 and 15