diff options
author | unknown <iggy@rolltop.ignatz42.dyndns.org> | 2006-11-28 17:21:39 -0500 |
---|---|---|
committer | unknown <iggy@rolltop.ignatz42.dyndns.org> | 2006-11-28 17:21:39 -0500 |
commit | b4aab152723c629fb23322da4988b404ed68986d (patch) | |
tree | 86e85a3fac3c607b12e1e0b2925aeea5f12a1244 /sql/sql_class.h | |
parent | 870b2e0a2b4a66c6b4b4f15792d72a7415190650 (diff) | |
download | mariadb-git-b4aab152723c629fb23322da4988b404ed68986d.tar.gz |
Bug#20836 Selecting into variables results in wrong results being returned
This error is displayed anytime the SELECT statement needs a temp table to
return correct results because the object (select_dumpvar) that represents
variables named in the INTO clause stored the results before the temp
table was considered. The problem was fixed by creating the necessary
Item_func_set_user_var objects once the correct data is ready.
mysql-test/r/distinct.result:
Bug#20836 Selecting into variables results in wrong results being returned
- Added results
mysql-test/t/distinct.test:
Bug#20836 Selecting into variables results in wrong results being returned
- Added various Selects that use the INTO statement and a temp table.
- Added Select Into Outfile variant tests also.
sql/sql_class.cc:
Bug#20836 Selecting into variables results in wrong results being returned
- The select_dumpvar variable created a Item_func_set_user_var too early
and once set, it was not possible to change. The Item_func_set_user_var
is now created once the final results are available.
sql/sql_class.h:
Bug#20836 Selecting into variables results in wrong results being returned
- Removed unnecessary object members.
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 7cf0b474ed7..b61403e4b0a 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1573,8 +1573,7 @@ class select_dumpvar :public select_result_interceptor { ha_rows row_count; public: List<LEX_STRING> var_list; - List<Item_func_set_user_var> vars; - select_dumpvar(void) { var_list.empty(); vars.empty(); row_count=0;} + select_dumpvar() { var_list.empty(); row_count= 0;} ~select_dumpvar() {} int prepare(List<Item> &list, SELECT_LEX_UNIT *u); bool send_data(List<Item> &items); |