summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorgshchepa/uchum@gleb.loc <>2007-07-08 11:46:52 +0500
committergshchepa/uchum@gleb.loc <>2007-07-08 11:46:52 +0500
commitb1d230e09f9868bf1358eff29cae369563fc2e9d (patch)
treecb415d77f61a115e2b2142965a236c5ed47cddde /mysql-test
parent6aa9e3a4fc2ced8ce3d584916edb4026e231921d (diff)
parente1eababbbac09749ea807a50644b10c70f3d9b7c (diff)
downloadmariadb-git-b1d230e09f9868bf1358eff29cae369563fc2e9d.tar.gz
Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into gleb.loc:/home/uchum/work/bk/5.0-opt
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/type_newdecimal.result8
-rw-r--r--mysql-test/t/type_newdecimal.test12
2 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result
index d858c3cbdd6..75d9582a23c 100644
--- a/mysql-test/r/type_newdecimal.result
+++ b/mysql-test/r/type_newdecimal.result
@@ -1491,4 +1491,12 @@ aa SUM(b)
SELECT a+CAST(1 AS decimal(65,31)) AS aa, SUM(b) FROM t1 GROUP BY aa;
ERROR 42000: Too big scale 31 specified for column '1'. Maximum is 30.
DROP TABLE t1;
+CREATE TABLE t1 (a int DEFAULT NULL, b int DEFAULT NULL);
+INSERT INTO t1 VALUES (3,30), (1,10), (2,10);
+SET @a= CAST(1 AS decimal);
+SELECT 1 FROM t1 GROUP BY @b := @a, @b;
+1
+1
+1
+DROP TABLE t1;
End of 5.0 tests
diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test
index 73142eb41c0..5a631b6163e 100644
--- a/mysql-test/t/type_newdecimal.test
+++ b/mysql-test/t/type_newdecimal.test
@@ -1183,6 +1183,18 @@ SELECT a+CAST(1 AS decimal(65,31)) AS aa, SUM(b) FROM t1 GROUP BY aa;
DROP TABLE t1;
+#
+# Bug #29417: assertion abort for a grouping query with decimal user variable
+#
+
+CREATE TABLE t1 (a int DEFAULT NULL, b int DEFAULT NULL);
+INSERT INTO t1 VALUES (3,30), (1,10), (2,10);
+
+SET @a= CAST(1 AS decimal);
+SELECT 1 FROM t1 GROUP BY @b := @a, @b;
+
+DROP TABLE t1;
+
--echo End of 5.0 tests