[MDEV-7906] InnoDB: Failing assertion: prebuilt->sql_stat_start || trx->state == 1 on concurrent multi-table update Created: 2015-04-05 Updated: 2015-06-07 Resolved: 2015-06-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 5.5, 10.0, 10.1 |
| Fix Version/s: | 5.5.44 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | verified | ||
| Sprint: | 5.5.44 |
| Description |
|
|
| Comments |
| Comment by Jan Lindström (Inactive) [ 2015-04-05 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Easily repeatable (every time) with XtraDB and commit 26920cc6a006b4fe74ab0092b2d394199fe51977, could not repeat with Oracle MySQL 5.5.42 and Percona MySQL Version:5.5.42-37.1 (two tries). Do not know how to test with innodb_plugin, following does not seem to work:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-04-05 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
You've missed "dash-dash" before plugin_dir. Otherwise the command line is fine. Anyway, it's just as easily repeatable with InnoDB plugin. And I had the same results as you with Percona and MySQL – also couldn't repeat it there. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2015-04-23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The query that causes the crash for me is always the UPDATE ... LEFT JOIN query: Query (0x7ff4780051c8): UPDATE `C` AS alias1 LEFT JOIN `D` AS alias2 ON ( alias2.`col_date_key` <= alias1.`col_date_key` ) SET alias2.`pk` = -16143 WHERE alias2.`col_varchar_nokey` NOT IN ( SELECT `col_varchar_nokey` FROM `DD` ) Query (0x7f11cc0051c8): UPDATE `C` AS alias1 LEFT JOIN `D` AS alias2 ON ( alias2.`col_date_key` <= alias1.`col_date_key` ) SET alias2.`pk` = -16143 WHERE alias2.`col_varchar_nokey` NOT IN ( SELECT `col_varchar_nokey` FROM `DD` ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2015-04-23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
jplindst found the stack trace where SQL layer continues execution despite having gotten an error from the storage engine:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2015-04-23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
A [crude] patch that seems to make the crash go away: https://gist.github.com/spetrunia/ae442eba2ffe4a72f149 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2015-04-23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Reassigning to Sergei as he has found the actual problem. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2015-04-23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Regression testing was not fully successful with suggested fix: Failing test(s): main.select_pkeycache main.join_cache main.join_outer main.join main.join_nested main.table_elim main.view main.select | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2015-04-23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Ok, there was a trivial typo in the patch, which now is fixed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2015-06-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Only sql_class.cc needs review: http://lists.askmonty.org/pipermail/commits/2015-June/007995.html | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2015-06-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
as discussed on irc:
|