mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
A fix (bug #2335: Inconsistancy with handling of Years and NOW() function).
The test might fail if one runs it at 23:59:59 Dec 31
This commit is contained in:
@ -26,3 +26,9 @@ y y2
|
|||||||
2001 01
|
2001 01
|
||||||
2069 69
|
2069 69
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
create table t1 (y year);
|
||||||
|
insert into t1 values (now());
|
||||||
|
select if(y = now(), 1, 0) from t1;
|
||||||
|
if(y = now(), 1, 0)
|
||||||
|
1
|
||||||
|
drop table t1;
|
||||||
|
@ -8,3 +8,12 @@ select * from t1;
|
|||||||
select * from t1 order by y;
|
select * from t1 order by y;
|
||||||
select * from t1 order by y2;
|
select * from t1 order by y2;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug 2335
|
||||||
|
#
|
||||||
|
|
||||||
|
create table t1 (y year);
|
||||||
|
insert into t1 values (now());
|
||||||
|
select if(y = now(), 1, 0) from t1;
|
||||||
|
drop table t1;
|
||||||
|
@ -600,6 +600,7 @@ public:
|
|||||||
longlong val_int(void);
|
longlong val_int(void);
|
||||||
String *val_str(String*,String *);
|
String *val_str(String*,String *);
|
||||||
void sql_type(String &str) const;
|
void sql_type(String &str) const;
|
||||||
|
bool store_for_compare() { return 1; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user