[MDEV-30025] EXPLAIN for SELECT INTO OUTFILE does not report an error message Created: 2022-11-17 Updated: 2022-11-22 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11 |
| Fix Version/s: | 10.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Igor Babaev | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
If to add the statement
to the test case for the bug "Bug#5382 'explain select into outfile' crashes the server" from outfile.test
One can see that EXPLAIN just does not report an error that it should report as it the error is encountered at the prepare phase in JOIN::prepare(). This is a consequence of a serious defect of the code that processes EXPLAIN for those variants of SELECT that employ classes whose prepare virtual method differs from the method of select_result::prepare(). |
| Comments |
| Comment by Igor Babaev [ 2022-11-17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I tried the following change of the code of execute_sqlcom_select() of the current 10.11 and it worked fine for all test cases from the main test suite (except of those from outfile.test of course)
I do not provide diff in order one could play with both variants and see the difference when processing the reported query. My code processes EXPLAIN for SELECT variants in the same way as EXPLAIN is processed for multi-table UPDATE/DELETE. |