summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2007-05-18 13:39:34 +0400
committerunknown <evgen@moonbone.local>2007-05-18 13:39:34 +0400
commit507ad360d785e5f0afc42f27df27b09bb7a129b8 (patch)
tree026de9b283300f9659f1a36febcb1ec74c04c3c5 /mysql-test/t
parent042b1717c497f8b1af584854bb34787e95efc937 (diff)
parentc4a4df5aa40613377f27b2a10d6b114a9ec6df9e (diff)
downloadmariadb-git-507ad360d785e5f0afc42f27df27b09bb7a129b8.tar.gz
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into moonbone.local:/mnt/gentoo64/work/28261-bug-5.0-opt-mysql
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/type_datetime.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test
index 4c2416000be..cf512aa3649 100644
--- a/mysql-test/t/type_datetime.test
+++ b/mysql-test/t/type_datetime.test
@@ -234,3 +234,15 @@ create table t1 (f1 date);
insert into t1 values (curdate());
select left(f1,10) = curdate() from t1;
drop table t1;
+
+#
+# Bug#28261: Wrong DATETIME comparison result when the GET_USER_VAR function
+# is involved.
+#
+create table t1(f1 date);
+insert into t1 values('01-01-01'),('02-02-02'),('01-01-01'),('02-02-02');
+set @bug28261='';
+select if(@bug28261 = f1, '', @bug28261:= f1) from t1;
+select if(@bug28261 = f1, '', @bug28261:= f1) from t1;
+select if(@bug28261 = f1, '', @bug28261:= f1) from t1;
+drop table t1;