[MDEV-9489] Assertion `0' failed in Protocol::end_statement() on UNION ALL Created: 2016-01-29 Updated: 2016-02-21 Resolved: 2016-02-21 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Subquery |
| Affects Version/s: | 10.1 |
| Fix Version/s: | 10.1.12 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Sprint: | 10.1.12 |
| Description |
|
|
| Comments |
| Comment by Elena Stepanova [ 2016-01-30 ] | |||||||||||||||||||
|
I'm setting it to critical because the behavior on a release build is really bad. When the same set of queries is executed from a client connection, it hangs. The server remains responsive. You can connect to it, run for example show processlist, but it does not show any activity for the hanging connection, like this (connection 19 is one that is hanging on the query):
KILL QUERY does not work:
Killing the thread works. However, it's nearly impossible for a user to analyze, we will be getting weird complaints about "something hangs", or "something extremely slow", etc. Maybe we already got them, but did not recognize because of the vagueness of the problem. It needs to be fixed asap. | |||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2016-01-31 ] | |||||||||||||||||||
|
I checked, it looks like sending OK skipped. | |||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2016-02-18 ] | |||||||||||||||||||
|
It is important for reproducing to have materialized IN in the second query:
| |||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2016-02-18 ] | |||||||||||||||||||
|
The problem is that in the time of execution select_union_direct::send_eof() current SELECT_LEX is not the last select of the union of UNION, we send_eof is not send. JOIN of last select points to the other SELECT_LEX (probably it is the result of materialization) | |||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2016-02-18 ] | |||||||||||||||||||
|
revision-id: 1de168b7f354adfb5e2ee07af20b20f7e4ae9075 (mariadb-10.1.11-14-g1de168b)
Restoring currect_select fixed. | |||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2016-02-18 ] | |||||||||||||||||||
|
The bug is present in 5.5/10.0 but test suite is not repetable | |||||||||||||||||||
| Comment by Sergei Petrunia [ 2016-02-19 ] | |||||||||||||||||||
|
Ok to push. |