[MDEV-13470] DELETE IGNORE should not ignore deadlocks (again) Created: 2017-08-08 Updated: 2017-08-09 Resolved: 2017-08-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Delete, Server |
| Affects Version/s: | 10.2.8 |
| Fix Version/s: | 10.2.8 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
This is basically a duplicate or a reincarnation of It is uncertain when this test started failing. The test is nondeterministic, because there is a race condition between the concurrently executing DELETE IGNORE and DELETE statements. When a deadlock is reported for DELETE IGNORE, the SQL layer would call handler::print_error() but then proceed to the next row, as if no error had happened (which is the purpose of DELETE IGNORE). So, when it proceeded to handler::ha_rnd_next(), InnoDB would hit an assertion failure, because the transaction no longer exists, and we are not executing at the start of a statement. |
| Comments |
| Comment by Marko Mäkelä [ 2017-08-08 ] | ||||||||||||||||||||||||||||||||||
|
bb-10.2-marko contains two clean-up commits on top of the actual fix. | ||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2017-08-08 ] | ||||||||||||||||||||||||||||||||||
It first failed with the assertion failure (Assertion `prebuilt->sql_stat_start || trx->state == TRX_STATE_ACTIVE') On July 30th on bb-10.2-mariarocks, once; and has been failing on 10.2 since Aug 7th, 29ad6284918d4be81f40f05214220c42 (RocksDB merge) – 10 times as of now. While it's not 100%-reliable, 10 failures over the past 36 hours and never before is hardly a statistical error. | ||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2017-08-09 ] | ||||||||||||||||||||||||||||||||||
|
elenst, thank you for the observation. Indeed, it looks like
Note that the macro `SET_FATAL_ERROR` is assigning a local variable, and due to the `DBUG_VOID_RETURN` that local variable will no longer be examined, so the `SET_FATAL_ERROR` essentially became a no-op here.
|