summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2005-06-08 20:35:37 +0500
committerunknown <hf@deer.(none)>2005-06-08 20:35:37 +0500
commit2fded7d5c4b371f100368c833faba425a845a8fc (patch)
tree519742a623eae1df25ea536bcb3e84d39e69e9d7 /mysql-test/t
parente595b7ee9db2e1aecadc68a11d821b65c42de1a1 (diff)
downloadmariadb-git-2fded7d5c4b371f100368c833faba425a845a8fc.tar.gz
Fix for bug #9764 (DISTINCT IFNULL truncates data)
mysql-test/r/create.result: test result fixed mysql-test/r/distinct.result: test result fixed mysql-test/t/distinct.test: test case added sql/item_cmpfunc.cc: max_length should be calculated differently for DECIMAL_RESULT and others
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/distinct.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test
index a3862786cc3..057c9bd9239 100644
--- a/mysql-test/t/distinct.test
+++ b/mysql-test/t/distinct.test
@@ -332,3 +332,11 @@ CREATE TABLE t1 (
INSERT INTO t1 VALUES ('1',1,0);
SELECT DISTINCT html,SUM(rout)/(SUM(rin)+1) as 'prod' FROM t1 GROUP BY rin;
drop table t1;
+
+#
+# Bug 9784 DISTINCT IFNULL truncates data
+#
+create table t1 (id int, dsc varchar(50));
+insert into t1 values (1, "line number one"), (2, "line number two"), (3, "line number three");
+select distinct id, IFNULL(dsc, '-') from t1;
+drop table t1;