diff options
author | Ramil Kalimullin <ramil@mysql.com> | 2009-02-24 18:47:12 +0400 |
---|---|---|
committer | Ramil Kalimullin <ramil@mysql.com> | 2009-02-24 18:47:12 +0400 |
commit | 71943e3628e0750b630b97022f78bf81c0ed6b00 (patch) | |
tree | 098b599994037a5e7609851889db9e3952582d54 /sql/item_func.h | |
parent | eecf716a833990408e14b3aff13509e11dd80cac (diff) | |
download | mariadb-git-71943e3628e0750b630b97022f78bf81c0ed6b00.tar.gz |
Fix for bug#42009: SELECT into variable gives different results to direct SELECT
Problem: storing "SELECT ... INTO @var ..." results in variables we used val_xxx()
methods which returned results of the current row.
So, in some cases (e.g. SELECT DISTINCT, GROUP BY or HAVING) we got data
from the first row of a new group (where we evaluate a clause) instead of
data from the last row of the previous group.
Fix: use val_xxx_result() counterparts to get proper results.
Diffstat (limited to 'sql/item_func.h')
-rw-r--r-- | sql/item_func.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index 7e15a536cf2..33aeddfe6e6 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1308,6 +1308,7 @@ public: bool send(Protocol *protocol, String *str_arg); void make_field(Send_field *tmp_field); bool check(bool use_result_field); + void save_item_result(Item *item); bool update(); enum Item_result result_type () const { return cached_result_type; } bool fix_fields(THD *thd, Item **ref); |