diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-02-28 11:46:35 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-02-28 11:46:35 +0100 |
commit | 027e34e13b8d0baed51e26be8d4ffd86d9b3b041 (patch) | |
tree | 7257aa27850993e0f549fa77184038c77fb25a88 /mysql-test/r/user_var.result | |
parent | 6a2d730a7f89726f30dc2eb3a02a9aaa94da6c3c (diff) | |
download | mariadb-git-027e34e13b8d0baed51e26be8d4ffd86d9b3b041.tar.gz |
a simpler fix for
MySQL Bug #12408412: GROUP_CONCAT + ORDER BY + INPUT/OUTPUT SAME USER VARIABLE = CRASH
and
MySQL Bug#14664077 SEVERE PERFORMANCE DEGRADATION IN SOME CASES WHEN USER VARIABLES ARE USED
sql/item_func.cc:
don't use anything from Item_func_set_user_var::fix_fields()
in Item_func_set_user_var::save_item_result()
sql/sql_class.cc:
Call suv->save_item_result(item) *before* doing suv->fix_fields(), because
the former evaluates the item (and caches its value), while the latter marks
the user variable as non-const. The problem is that the item was fix_field'ed
when the user variable was const, and it doesn't expect it to change to non-const
in the middle of the execution.
Diffstat (limited to 'mysql-test/r/user_var.result')
-rw-r--r-- | mysql-test/r/user_var.result | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index 374520ff610..21bd3c62e1b 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -456,4 +456,6 @@ SELECT (@v:=a) <> (@v:=1) FROM t1; (@v:=a) <> (@v:=1) 1 DROP TABLE t1; +SET @bug12408412=1; +SELECT GROUP_CONCAT(@bug12408412 ORDER BY 1) INTO @bug12408412; End of 5.1 tests |