[MDEV-31073] Server crash, assertion `table != 0 && view->field_translation != 0' failure with ROWNUM and view Created: 2023-04-18 Updated: 2023-04-28 Resolved: 2023-04-28 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Views |
| Affects Version/s: | 10.6, 10.7, 10.8, 10.9, 10.10 |
| Fix Version/s: | 10.11.3, 11.0.2, 10.6.13, 10.8.8, 10.9.6, 10.10.4 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Elena Stepanova | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | regression | ||
| Issue Links: |
|
||||||||
| Description |
|
Reproducible with MyISAM, Aria, InnoDB on 10.6+, debug and non-debug as shown below. The failure started happening on 10.6 after this merge:
I couldn't isolate the exact guilty commit from it (couldn't built with them rolled back individually), but it's a very small merge, there can't be many suspects.
|
| Comments |
| Comment by Elena Stepanova [ 2023-04-18 ] | |||||||||||
|
Apparently can also represent as a crash in ha_maria::info or ha_maria::extra. | |||||||||||
| Comment by Elena Stepanova [ 2023-04-18 ] | |||||||||||
|
Another assertion which belongs here:
| |||||||||||
| Comment by Elena Stepanova [ 2023-04-18 ] | |||||||||||
|
I won't be adding any more stack traces, they seem to be all over the place. Until this bug is fixed, crashes involving ROWNUM will be assumed to be related to it. | |||||||||||
| Comment by Oleksandr Byelkin [ 2023-04-20 ] | |||||||||||
|
It looks like incorrect merge by above mentioned merge of this ccec9b1de95a66b7597bc30e0a60bd61866f225d
(at least it is suspiciouse) | |||||||||||
| Comment by Oleksandr Byelkin [ 2023-04-20 ] | |||||||||||
|
So, here matherialisation decided due to rownum() presence and later no one expected to update "matherialized" view. Also the question is how rownum() supposed to work over a view in update... | |||||||||||
| Comment by Oleksandr Byelkin [ 2023-04-21 ] | |||||||||||
|
ccec9b1de95a66b7597bc30e0a60bd61866f225d reverted condition that is why the condition now aplicable to views.
questions are: 1) why it was inverted not removed if we make it the same for derived and views 2) now call of thd->lex->can_not_use_merged(1) with parameter true probably is nt correct | |||||||||||
| Comment by Oleksandr Byelkin [ 2023-04-26 ] | |||||||||||
|
the problem was too relaxed condition for special case of SELECT * FROM (<limited select>) WHERE rownum() <=nnn | |||||||||||
| Comment by Oleksandr Byelkin [ 2023-04-26 ] | |||||||||||
|
| |||||||||||
| Comment by Igor Babaev [ 2023-04-28 ] | |||||||||||
|
Ok to push after replacing the method SELECT::LEX::is_query_topmost_select() with the method
and fixing the comment for the patch. |