[MDEV-29083] MariaDB produce different results for INSERT statement when using transaction Created: 2022-07-11 Updated: 2023-11-28 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Insert |
| Affects Version/s: | 10.8.3 |
| Fix Version/s: | 10.11 |
| Type: | Bug | Priority: | Major |
| Reporter: | Zuming Jiang | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 20.04 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
I used my fuzzing tool to test MariaDB and found a transaction-related bug that make server produce different results. Mariadb installation Setup the environment Reproduce bug Testcase 1 /usr/local/mysql/bin/mysql -uroot -Dtestdb # set up 2 transactions T0 and T1 Testcase 2 /usr/local/mysql/bin/mysql -uroot -Dtestdb Testcase 1 and Testcase 2 should produce the same results. However, The INSERT statement in Testcase 1 succeeds, and the last SELECT statement output one row (91, 167000, 2, 96, 71.64 , 1c08ld), while the INSERT statement in Testcase 2 fails, and the last SELECT statement output empty. |
| Comments |
| Comment by Elena Stepanova [ 2022-07-12 ] | ||||||||||||||
|
DML, concurrency and transactions are irrelevant, the ultimately void delete is just the means of collecting statistics. You could achieve the same by running ANALYZE on the table and executing only inner select, like
So, different plans, in one case the select in WHERE clause can be successfully resolved, in other case it can't. |