[MDEV-7971] Assertion `name != __null' failed in ACL_internal_schema_registry::lookup on 2nd execution os PS with multi-table update Created: 2015-04-10 Updated: 2015-08-03 Resolved: 2015-08-03 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Update, Optimizer, Prepared Statements |
| Affects Version/s: | 10.0, 10.1 |
| Fix Version/s: | 10.0.21 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Sprint: | 10.0.20 | ||||||||
| Description |
|
The problem appeared in 10.0 tree with this commit:
|
| Comments |
| Comment by Sergei Petrunia [ 2015-06-12 ] | ||||||||||||||||||||||||||||||||
|
Analysis: The crash happens inside permission check in multi_update_precheck() call. Looking at table->next_local chain in multi_update_precheck(): PREPARE: t1->t2 "<subquery2>" is injected into next_local chain by convert_subq_to_jtbm(). | ||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2015-06-12 ] | ||||||||||||||||||||||||||||||||
|
If I make multi_update_precheck to ignore tables that are non-merged semi-joins (tbl->is_jtbm() == true), then I get similar crash in unsafe_key_update, and in multiple locations in mysql_multi_update_prepare. This is odd, SELECT handling code did not have much problem with non-merged semi-join nest being present as a base table. setup_tables has special code handling for them, but that's all what was needed for prepare phase to work. | ||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2015-07-28 ] | ||||||||||||||||||||||||||||||||
|
Followed through and made all of Multi-table update code to skip non-merged semi-join nests: http://lists.askmonty.org/pipermail/commits/2015-July/008194.html elenst, I need a test pass for this fix. | ||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-07-28 ] | ||||||||||||||||||||||||||||||||
|
The following test case appears to be another representation of
| ||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2015-07-30 ] | ||||||||||||||||||||||||||||||||
|
elenst, good catch, thanks. My patch missed one case where multi-table UPDATE could encounter a merged semi-join. Here is the updated patch: http://lists.askmonty.org/pipermail/commits/2015-July/008209.html | ||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2015-07-30 ] | ||||||||||||||||||||||||||||||||
|
elenst, the patch for Can you do another test run with the patch? | ||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-08-02 ] | ||||||||||||||||||||||||||||||||
|
My tests passed on the second patch; but they were only run for crashes, if you think the patch could have caused problems with wrong results, please let me know. | ||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2015-08-03 ] | ||||||||||||||||||||||||||||||||
|
I don't expect wrong query results from any of these fixes. Sanja has also said he doesn't see any issues in the patch. I'm going to push it, then. Thanks |