diff options
author | gkodinov/kgeorge@macbook.gmz <> | 2006-07-21 17:59:52 +0300 |
---|---|---|
committer | gkodinov/kgeorge@macbook.gmz <> | 2006-07-21 17:59:52 +0300 |
commit | 3ef086d2633d0af915f19c25faff3e5f887b2ca9 (patch) | |
tree | 9e917237916605b070fc527430ef56073e264c76 /mysql-test/t/func_group.test | |
parent | 31a7bdfcf6de51eb87b7b9a347294395fe143828 (diff) | |
download | mariadb-git-3ef086d2633d0af915f19c25faff3e5f887b2ca9.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
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; |