summaryrefslogtreecommitdiff
path: root/sql/sql_cursor.h
diff options
context:
space:
mode:
authorunknown <timour@askmonty.org>2011-08-23 15:39:15 +0300
committerunknown <timour@askmonty.org>2011-08-23 15:39:15 +0300
commitc1a6dbe5b26946fd40a73dfd4b72c3f6f6f6ae5f (patch)
treee26d75d70d6a0199e64ab57f7c081f52cb71fcf0 /sql/sql_cursor.h
parent9e60b55fd0ff37527ca83e590d1c5386dfa788d6 (diff)
downloadmariadb-git-c1a6dbe5b26946fd40a73dfd4b72c3f6f6f6ae5f.tar.gz
Fixed bug lp:825018
Analysis: During the first execution of the query through the stored procedure, the optimization phase calls substitute_for_best_equal_field(), which calls Item_in_optimizer::transform(). The latter replaces Item_in_subselect::left_expr with args[0] via assignment. In this test case args[0] is an Item_outer_ref which is created/deallocated for each re-execution. As a result, during the second execution Item_in_subselect::left_expr pointed to freed memory, which resulted in a crash. Solution: The solution is to use change_item_tree(), so that the origianal left expression is restored after each execution.
Diffstat (limited to 'sql/sql_cursor.h')
0 files changed, 0 insertions, 0 deletions