[MDEV-12378] Crash if a FETCH statement produces warnings Created: 2017-03-28 Updated: 2020-04-21 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Stored routines |
| Affects Version/s: | 10.2 |
| Fix Version/s: | 10.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Oleksandr Byelkin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Sprint: | 10.2.7-1 | ||||||||
| Description |
|
The script that is reported in MDEV-12377 causes a crash in 10.2.
This is a stack trace:
|
| Comments |
| Comment by Oleksandr Byelkin [ 2017-04-03 ] | |||||||||||||||||||||||||||
|
It is an attempt to send OK when error was send (or at leas diagnostic area set to error state). | |||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2017-04-03 ] | |||||||||||||||||||||||||||
|
Conversion cause error level warning, which cause set error in Diagnistics_area in THD::raise_condition(). Question is why it set ERROR when there is no real error send to client. | |||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2017-04-03 ] | |||||||||||||||||||||||||||
|
It looks like fetch do not process error state to the end in strict tables mode. | |||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2017-04-03 ] | |||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2017-04-03 ] | |||||||||||||||||||||||||||
|
10.1 return error as it should by above test suite. | |||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2017-04-03 ] | |||||||||||||||||||||||||||
|
in 10.1 thd->killed set to KILL_BAD_DATA when in 10.2 it is not | |||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2017-04-03 ] | |||||||||||||||||||||||||||
|
The assignment of KILL_BAD_DATA was removed in this cset:
| |||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2017-04-03 ] | |||||||||||||||||||||||||||
|
That assigning KILL_BAD_DATA to thd->killed was transfer of an error in this case Attempt to add error check of save_to_field of sp_eval_expr() lead to many problem and do not fix the bug. | |||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2017-09-13 ] | |||||||||||||||||||||||||||
|
How the error was transferred in 10.1:
Here is stacktrace for reference:
| |||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2017-09-13 ] | |||||||||||||||||||||||||||
|
After removing KILL_BAD_DATA set (the only set statement of it) in 10.2 above procedure do not work: we forget error first, but then check of thd->kill do not interrupt. If the idea of removing KILL_BAD_DATA was put everything on error handlers and put nothing around them why we do nothing if error handler not found but error is still exists? If assigning KILL_BAD_DATA and KILL_BAD_DATA_HARD are not presend in the code why its checks and definitions are not removed? | |||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2020-04-21 ] | |||||||||||||||||||||||||||
|
The test does not crash on current 10.2 (36bddacf6b9177587) -10.5, but returns "Data truncated for column 'res' at row 3" --MDEV-12377 |