From 61359576dcc9231e35d3c8c77351f65ddd63dda7 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 23 Nov 2010 20:43:34 +0200 Subject: Fix of LP BUG#675248. Registration of pointer change if we assign it to other pointer which should be identical after statement execution (PS/SP). mysql-test/r/subselect.result: Test suite. mysql-test/t/subselect.test: Test suite. sql/sql_class.cc: The procedure of the pointer registration. sql/sql_class.h: The procedure of the pointer registration. sql/sql_lex.cc: Registration of pointer change if we assign it to other pointer which should be identical after statement execution (PS/SP). --- sql/sql_lex.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sql/sql_lex.cc') diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 028ab18bc36..d7e359ece8e 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -2890,7 +2890,7 @@ static void fix_prepare_info_in_table_list(THD *thd, TABLE_LIST *tbl) { if (tbl->on_expr) { - tbl->prep_on_expr= tbl->on_expr; + thd->check_and_register_item_tree(&tbl->prep_on_expr, &tbl->on_expr); tbl->on_expr= tbl->on_expr->copy_andor_structure(thd); } fix_prepare_info_in_table_list(thd, tbl->merge_underlying_list); @@ -2924,12 +2924,12 @@ void st_select_lex::fix_prepare_information(THD *thd, Item **conds, first_execution= 0; if (*conds) { - prep_where= *conds; + thd->check_and_register_item_tree(&prep_where, conds); *conds= where= prep_where->copy_andor_structure(thd); } if (*having_conds) { - prep_having= *having_conds; + thd->check_and_register_item_tree(&prep_having, having_conds); *having_conds= having= prep_having->copy_andor_structure(thd); } fix_prepare_info_in_table_list(thd, table_list.first); -- cgit v1.2.1