mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into moonbone.local:/mnt/gentoo64/work/28261-bug-5.0-opt-mysql
This commit is contained in:
@ -352,3 +352,27 @@ select left(f1,10) = curdate() from t1;
|
||||
left(f1,10) = curdate()
|
||||
1
|
||||
drop table t1;
|
||||
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;
|
||||
if(@bug28261 = f1, '', @bug28261:= f1)
|
||||
2001-01-01
|
||||
2002-02-02
|
||||
2001-01-01
|
||||
2002-02-02
|
||||
Warnings:
|
||||
Warning 1292 Incorrect date value: '' for column 'f1' at row 1
|
||||
select if(@bug28261 = f1, '', @bug28261:= f1) from t1;
|
||||
if(@bug28261 = f1, '', @bug28261:= f1)
|
||||
2001-01-01
|
||||
2002-02-02
|
||||
2001-01-01
|
||||
2002-02-02
|
||||
select if(@bug28261 = f1, '', @bug28261:= f1) from t1;
|
||||
if(@bug28261 = f1, '', @bug28261:= f1)
|
||||
2001-01-01
|
||||
2002-02-02
|
||||
2001-01-01
|
||||
2002-02-02
|
||||
drop table t1;
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user