mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
PS and SP made compatible in mechanism used for preparing query for rexecutions (Bug #2266)
mysql-test/r/sp.result: test suite for Bug #2266 mysql-test/t/sp.test: test suite for Bug #2266 sql/item_subselect.cc: made ancestor for Statement (Item_arena) sql/item_subselect.h: made ancestor for Statement (Item_arena) sql/item_sum.cc: made ancestor for Statement (Item_arena) sql/item_sum.h: made ancestor for Statement (Item_arena) sql/mysql_priv.h: reset_stmt_for_execute use PS and SP sql/sp_head.cc: sp_head use Item_arena as ancestor to be PS cleunup compatible SP use PS storing/restoring/cleanup mechanisms cleanup() of SP Items added Items created in temporary memory pool during SP execution saved for normal freeing after SP execution sql/sp_head.h: sp_head use Item_arena sql/sql_base.cc: made ancestor for Statement (Item_arena) results of wild_setup made permanent setup_conds make natural joins expanding only once and store results in PS/SP memory sql/sql_class.cc: made ancestor for Statement (Item_arena) sql/sql_class.h: made ancestor for Statement (Item_arena) method to detect PS preparation added sql/sql_delete.cc: storing where for DELETE and mark first execution sql/sql_derived.cc: use method sql/sql_insert.cc: mark first execution for INSERT sql/sql_lex.cc: flags to correctly make transformations of query and storing them in memory of PS/SP made ancestor for Statement (Item_arena) sql/sql_lex.h: reved variable od SP ol saving data flags to correctly make transformations of query and storing them in memory of PS/SP sql/sql_parse.cc: cleunup unit for any query sql/sql_prepare.cc: made ancestor for Statement (Item_arena) storing where moved to preparation changed interface of reset_stmt_for_execute to use it is SP do not restore where/order by/group by before first execution (but tables and unit can be chenged without execution and should be prepared (subqueries executes on demand)) sql/sql_select.cc: storing where for SELECT/multi-DELETE/... and mark first execution sql/sql_union.cc: made ancestor for Statement (Item_arena) sql/sql_update.cc: storing where for UPDATE and mark first execution
This commit is contained in:
@ -405,8 +405,6 @@ public:
|
||||
enum olap_type olap;
|
||||
SQL_LIST table_list, group_list; /* FROM & GROUP BY clauses */
|
||||
List<Item> item_list; /* list of fields & expressions */
|
||||
List<Item> item_list_copy; /* For SPs */
|
||||
byte *table_list_first_copy; /* For SPs */
|
||||
List<String> interval_list, use_index, *use_index_ptr,
|
||||
ignore_index, *ignore_index_ptr;
|
||||
/*
|
||||
@ -435,6 +433,11 @@ public:
|
||||
uint cond_count; /* number of arguments of and/or/xor in where/having */
|
||||
enum_parsing_place parsing_place; /* where we are parsing expression */
|
||||
bool with_sum_func; /* sum function indicator */
|
||||
/*
|
||||
PS or SP cond natural joins was alredy processed with permanent
|
||||
arena and all additional items which we need alredy stored in it
|
||||
*/
|
||||
bool conds_processed_with_permanent_arena;
|
||||
|
||||
ulong table_join_options;
|
||||
uint in_sum_expr;
|
||||
@ -445,6 +448,7 @@ public:
|
||||
bool having_fix_field;
|
||||
/* explicit LIMIT clause was used */
|
||||
bool explicit_limit;
|
||||
bool first_execution; /* first execution in SP or PS */
|
||||
|
||||
/*
|
||||
SELECT for SELECT command st_select_lex. Used to privent scaning
|
||||
|
Reference in New Issue
Block a user