summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <vva@eagle.mysql.r18.ru>2004-01-21 02:18:51 +0400
committerunknown <vva@eagle.mysql.r18.ru>2004-01-21 02:18:51 +0400
commit24ca1e1edb1ddbd7609c88cf648447afb67f3098 (patch)
tree699c2742fd01d0460be8f03a8029066a29cc9fd7 /mysql-test
parentafa55213dcd1b146ff6dc987fad68081017d81ae (diff)
downloadmariadb-git-24ca1e1edb1ddbd7609c88cf648447afb67f3098.tar.gz
added test for bug #2290 "output truncated with ELT when using DISTINCT"
sql/item_strfunc.cc: fixed bug #2290 "output truncated with ELT when using DISTINCT"
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_str.result7
-rw-r--r--mysql-test/t/func_str.test9
2 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index 35a5ba70e86..7d2668c8cf6 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -266,3 +266,10 @@ CONCAT("</a>",RPAD("",(55 - LENGTH(title)),"."))
NULL
</a>..........................
DROP TABLE t1;
+CREATE TABLE t1 (i int, j int);
+INSERT INTO t1 VALUES (1,1),(2,2);
+SELECT DISTINCT i, ELT(j, '345', '34') FROM t1;
+i ELT(j, '345', '34')
+1 345
+2 34
+DROP TABLE t1;
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index 33d89b3ca37..2fecf26d7c3 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -154,3 +154,12 @@ INSERT INTO t1 VALUES ('House passes the CAREERS bill');
SELECT CONCAT("</a>",RPAD("",(55 - LENGTH(title)),".")) from t1;
DROP TABLE t1;
+
+#
+# test for Bug #2290 "output truncated with ELT when using DISTINCT"
+#
+
+CREATE TABLE t1 (i int, j int);
+INSERT INTO t1 VALUES (1,1),(2,2);
+SELECT DISTINCT i, ELT(j, '345', '34') FROM t1;
+DROP TABLE t1; \ No newline at end of file