diff options
author | unknown <pem@mysql.telia.com> | 2003-10-14 12:59:28 +0200 |
---|---|---|
committer | unknown <pem@mysql.telia.com> | 2003-10-14 12:59:28 +0200 |
commit | 776784b8215044bc320af5b43a1cbd100d6b944b (patch) | |
tree | 5342ed0c4c015e0b898fea83341b508e5d1d94e4 /sql/sp_rcontext.h | |
parent | 569e72af7d67e4f556c1e05029a197f307c0518c (diff) | |
download | mariadb-git-776784b8215044bc320af5b43a1cbd100d6b944b.tar.gz |
Fix for BUG#1495: Evaluate items before setting a local variable with SELECT INTO.
Also copy and restore order_list and group_list for selects in SPs.
mysql-test/r/sp.result:
Test for BUG#1495, and an additional cursor test.
mysql-test/t/sp.test:
Test for BUG#1495, and an additional cursor test.
sql/sp_head.cc:
Fix BUG#1495: renamed eval_func_item() into sp_eval_func_item() and made it
non-static.
Also need to copy and restore order_list and group_list pointers before and
after execution of a substatement. (Which means these must always be properly
initialized for all queries.)
sql/sp_rcontext.cc:
Fix BUG#1495: Evaluate and set a local variable (for SELECT INTO).
sql/sp_rcontext.h:
Fix BUG#1495: Evaluate and set a local variable (for SELECT INTO).
sql/sql_class.cc:
Fix BUG#1495: Evaluate and set a local variable (for SELECT INTO).
sql/sql_class.h:
Fix BUG#1495: Evaluate and set a local variable (for SELECT INTO); need type for this.
sql/sql_parse.cc:
order_list and group_list must be initialized in select_lex for all queries,
to make SP sub statement execution work.
sql/sql_yacc.yy:
Type needed for setting local variables.
sql/table.h:
Need a copy of the Item* pointer when executing sub-statements in SPs. (Since
it's modified and must be restored afterwards.)
Diffstat (limited to 'sql/sp_rcontext.h')
-rw-r--r-- | sql/sp_rcontext.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sp_rcontext.h b/sql/sp_rcontext.h index 027f2f74789..e69ac9bf4b4 100644 --- a/sql/sp_rcontext.h +++ b/sql/sp_rcontext.h @@ -69,6 +69,9 @@ class sp_rcontext : public Sql_alloc m_frame[idx] = i; } + void + set_item_eval(uint idx, Item *i, enum_field_types type); + inline Item * get_item(uint idx) { |