summaryrefslogtreecommitdiff
path: root/mysql-test/t/temp_table.test
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@hfmain.(none)>2007-03-22 23:59:20 +0400
committerunknown <holyfoot/hf@hfmain.(none)>2007-03-22 23:59:20 +0400
commit2c5395eedb85105f8ad7d58c0ce1902807dc0948 (patch)
treeb10a0e80530fde746ab966228b412ab454f075eb /mysql-test/t/temp_table.test
parent3a222d57ad93f76a1a75ab459d0fe2a12be98d6c (diff)
parentb8c101df1a6d1c4f9f5a2ed1cbcf996610782844 (diff)
downloadmariadb-git-2c5395eedb85105f8ad7d58c0ce1902807dc0948.tar.gz
Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt
into mysql.com:/home/hf/work/mrg/mysql-5.1-opt mysql-test/r/insert_select.result: Auto merged mysql-test/t/insert_select.test: Auto merged sql/field.h: Auto merged sql/item.cc: Auto merged sql/item_sum.cc: Auto merged sql/sql_select.h: Auto merged mysql-test/r/create.result: merging mysql-test/r/temp_table.result: SCCS merged mysql-test/r/type_float.result: merging mysql-test/r/union.result: merging mysql-test/t/temp_table.test: merging
Diffstat (limited to 'mysql-test/t/temp_table.test')
-rw-r--r--mysql-test/t/temp_table.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/temp_table.test b/mysql-test/t/temp_table.test
index d06fde87b34..e10fd386bd3 100644
--- a/mysql-test/t/temp_table.test
+++ b/mysql-test/t/temp_table.test
@@ -164,6 +164,21 @@ DROP TABLE t1;
--echo End of 4.1 tests.
+#
+# Bug #24791: Union with AVG-groups generates wrong results
+#
+CREATE TABLE t1 ( c FLOAT( 20, 14 ) );
+INSERT INTO t1 VALUES( 12139 );
+
+CREATE TABLE t2 ( c FLOAT(30,18) );
+INSERT INTO t2 VALUES( 123456 );
+
+SELECT AVG( c ) FROM t1 UNION SELECT 1;
+SELECT 1 UNION SELECT AVG( c ) FROM t1;
+SELECT 1 UNION SELECT * FROM t2 UNION SELECT 1;
+SELECT c/1 FROM t1 UNION SELECT 1;
+
+DROP TABLE t1, t2;
#
# Test truncate with temporary tables