[MDEV-10702] Crash in SET STATEMENT FOR EXECUTE Created: 2016-08-30 Updated: 2018-08-31 Resolved: 2016-09-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Prepared Statements |
| Affects Version/s: | 10.1, 10.2 |
| Fix Version/s: | 10.1.18, 10.2.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Compatibility | ||
| Issue Links: |
|
||||||||
| Description |
|
I create a table and insert some data using PREPARE followed by SET STATEMENT..EXECUTE
Now I add a trigger on the table and re-execute the same SET STATEMENT..EXECUTE:
It crashes on assert:
There is a problem in Prepared_statement::execute_loop: 1. The call for Prepared_statement::execute() notices that t1's metadata has changed and returns an error. Before returning, it calls Prepared_statement::cleanup_stmt(), which includes a call for thd->cleanup_after_query() which calls Query_arena::free_items(). Therefore, all items created while parsing in the variable initialization part of SET STATEMENT, e.g. Item_int corresponding to 2048, are freed and thd->free_list changes to NULL.
|
| Comments |
| Comment by Michael Widenius [ 2016-09-08 ] |
|
Review done. Found some small issues that was fixed and reviewed again. |