diff options
author | unknown <gkodinov/kgeorge@macbook.gmz> | 2006-07-21 17:59:52 +0300 |
---|---|---|
committer | unknown <gkodinov/kgeorge@macbook.gmz> | 2006-07-21 17:59:52 +0300 |
commit | 8024aabb76ffa8d1ea6105ca071b2109766ea2cb (patch) | |
tree | 9e917237916605b070fc527430ef56073e264c76 /mysql-test/t/func_group.test | |
parent | c3f0d2f6cba13bc7f7f56ba1233682ef4c3f3593 (diff) | |
download | mariadb-git-8024aabb76ffa8d1ea6105ca071b2109766ea2cb.tar.gz |
Bug #20868: Client connection is broken on SQL query error
An aggregate function reference was resolved incorrectly and
caused a crash in count_field_types.
Must use real_item() to get to the real Item instance through
the reference
mysql-test/r/func_group.result:
Bug #20868: Client connection is broken on SQL query error
* test case for the bug
mysql-test/t/func_group.test:
Bug #20868: Client connection is broken on SQL query error
* test case for the bug
sql/sql_select.cc:
Bug #20868: Client connection is broken on SQL query error
* correctly resolve aggregate function references.
Diffstat (limited to 'mysql-test/t/func_group.test')
-rw-r--r-- | mysql-test/t/func_group.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test index e8c5fa18a25..f28ce234b73 100644 --- a/mysql-test/t/func_group.test +++ b/mysql-test/t/func_group.test @@ -660,3 +660,18 @@ SELECT SUM(a) FROM t1 GROUP BY b/c; DROP TABLE t1; set div_precision_increment= @sav_dpi; +# +# Bug #20868: Client connection is broken on SQL query error +# +CREATE TABLE t1 (a INT PRIMARY KEY, b INT); +INSERT INTO t1 VALUES (1,1), (2,2); + +CREATE TABLE t2 (a INT PRIMARY KEY, b INT); +INSERT INTO t2 VALUES (1,1), (3,3); + +SELECT SQL_NO_CACHE + (SELECT SUM(c.a) FROM t1 ttt, t2 ccc + WHERE ttt.a = ccc.b AND ttt.a = t.a GROUP BY ttt.a) AS minid +FROM t1 t, t2 c WHERE t.a = c.b; + +DROP TABLE t1,t2; |