mirror of
https://github.com/MariaDB/server.git
synced 2025-05-10 02:01:19 +03:00
Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt
into mysql.com:/home/hf/work/mrg/mysql-5.1-opt
This commit is contained in:
commit
655d2a6bcc
@ -168,6 +168,9 @@ dt
|
|||||||
0000-00-00 00:00:00
|
0000-00-00 00:00:00
|
||||||
0000-00-00 00:00:00
|
0000-00-00 00:00:00
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
select cast('2006-12-05 22:10:10' as datetime) + 0;
|
||||||
|
cast('2006-12-05 22:10:10' as datetime) + 0
|
||||||
|
20061205221010.000000
|
||||||
CREATE TABLE t1(a DATETIME NOT NULL);
|
CREATE TABLE t1(a DATETIME NOT NULL);
|
||||||
INSERT INTO t1 VALUES ('20060606155555');
|
INSERT INTO t1 VALUES ('20060606155555');
|
||||||
SELECT a FROM t1 WHERE a=(SELECT MAX(a) FROM t1) AND (a="20060606155555");
|
SELECT a FROM t1 WHERE a=(SELECT MAX(a) FROM t1) AND (a="20060606155555");
|
||||||
|
@ -113,6 +113,12 @@ insert into t1 values ("00-00-00"), ("00-00-00 00:00:00");
|
|||||||
select * from t1;
|
select * from t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug #16546 DATETIME+0 not always coerced the same way
|
||||||
|
#
|
||||||
|
select cast('2006-12-05 22:10:10' as datetime) + 0;
|
||||||
|
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -856,8 +856,14 @@ public:
|
|||||||
{
|
{
|
||||||
return tmp_table_field_from_field_type(table, 0);
|
return tmp_table_field_from_field_type(table, 0);
|
||||||
}
|
}
|
||||||
|
void fix_length_and_dec()
|
||||||
|
{
|
||||||
|
Item_typecast_maybe_null::fix_length_and_dec();
|
||||||
|
decimals= DATETIME_DEC;
|
||||||
|
}
|
||||||
bool result_as_longlong() { return TRUE; }
|
bool result_as_longlong() { return TRUE; }
|
||||||
longlong val_int();
|
longlong val_int();
|
||||||
|
double val() { return (double) val_int(); }
|
||||||
my_decimal *val_decimal(my_decimal *decimal_value)
|
my_decimal *val_decimal(my_decimal *decimal_value)
|
||||||
{
|
{
|
||||||
DBUG_ASSERT(fixed == 1);
|
DBUG_ASSERT(fixed == 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user