summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-01-03 23:04:52 +0200
committerunknown <monty@mysql.com>2005-01-03 23:04:52 +0200
commit73c9909750c7e471a08ce90ccc130d80394b049a (patch)
tree0f73878fcf058ff862f3f7eb305aafae2ad3465d /mysql-test/r
parent57deb768672132dc7ee461ca9a1e65435f36037a (diff)
parenta75e31b3610c2fb6a16f2bae469367e4be78d1cb (diff)
downloadmariadb-git-73c9909750c7e471a08ce90ccc130d80394b049a.tar.gz
Merge with 4.1 tree to get fix for INSERT IGNORE ... ON DUPLICATE KEY
BitKeeper/etc/ignore: auto-union BitKeeper/etc/logging_ok: auto-union Makefile.am: Auto merged client/mysqltest.c: Auto merged configure.in: Auto merged innobase/log/log0recv.c: Auto merged myisam/mi_check.c: Auto merged mysql-test/r/cast.result: Auto merged mysql-test/r/drop.result: Auto merged mysql-test/r/func_time.result: Auto merged mysql-test/r/ps_2myisam.result: Auto merged mysql-test/r/ps_3innodb.result: Auto merged mysql-test/r/ps_4heap.result: Auto merged mysql-test/r/ps_5merge.result: Auto merged mysql-test/r/ps_6bdb.result: Auto merged mysql-test/r/ps_7ndb.result: Auto merged mysql-test/r/type_datetime.result: Auto merged mysql-test/t/drop.test: Auto merged mysql-test/t/func_time.test: Auto merged ndb/include/ndb_global.h.in: Auto merged ndb/src/kernel/blocks/suma/Suma.cpp: Auto merged sql/ha_ndbcluster.h: Auto merged sql/item_timefunc.h: Auto merged sql/log_event.cc: Auto merged sql/log_event.h: Auto merged sql/set_var.cc: Auto merged sql/sql_repl.cc: Auto merged sql/sql_repl.h: Auto merged sql/sql_select.cc: Auto merged sql-common/my_time.c: Auto merged sql/sql_union.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/time.cc: Auto merged innobase/row/row0upd.c: Trivial merge mysql-test/t/func_concat.test: Keep local code mysql-test/t/multi_update.test: auto merge sql/ha_ndbcluster.cc: manual merge sql/item_timefunc.cc: manual merge sql/mysql_priv.h: manual merge sql/sql_class.h: manual merge sql/sql_delete.cc: manual merge sql/sql_insert.cc: manual merge sql/sql_lex.cc: manual merge sql/sql_lex.h: manual merge sql/sql_load.cc: manual merge sql/sql_parse.cc: manual merge sql/sql_table.cc: manual merge sql/sql_update.cc: manual merge
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/cast.result9
-rw-r--r--mysql-test/r/func_concat.result6
-rw-r--r--mysql-test/r/func_time.result7
-rw-r--r--mysql-test/r/ps_2myisam.result2
-rw-r--r--mysql-test/r/ps_3innodb.result2
-rw-r--r--mysql-test/r/ps_4heap.result2
-rw-r--r--mysql-test/r/ps_5merge.result4
-rw-r--r--mysql-test/r/ps_6bdb.result2
-rw-r--r--mysql-test/r/ps_7ndb.result2
-rw-r--r--mysql-test/r/type_datetime.result10
10 files changed, 32 insertions, 14 deletions
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result
index a893e6ee4ed..10eb597fa68 100644
--- a/mysql-test/r/cast.result
+++ b/mysql-test/r/cast.result
@@ -178,3 +178,12 @@ aaa aa
aab aa
aac aa
DROP TABLE t1;
+select date_add(cast('2004-12-30 12:00:00' as date), interval 0 hour);
+date_add(cast('2004-12-30 12:00:00' as date), interval 0 hour)
+2004-12-30 00:00:00
+select timediff(cast('2004-12-30 12:00:00' as time), '12:00:00');
+timediff(cast('2004-12-30 12:00:00' as time), '12:00:00')
+00:00:00
+select timediff(cast('1 12:00:00' as time), '12:00:00');
+timediff(cast('1 12:00:00' as time), '12:00:00')
+24:00:00
diff --git a/mysql-test/r/func_concat.result b/mysql-test/r/func_concat.result
index 0bd53b32dd7..cf6fbf2da4f 100644
--- a/mysql-test/r/func_concat.result
+++ b/mysql-test/r/func_concat.result
@@ -63,8 +63,4 @@ a0
select 'a' union select concat('a', -0.0);
a
a
-a0.0
-select 'a' union select concat('a', -0.0000);
-a
-a
-a0.0000
+good
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index 32c80bb330e..b30fddb8de0 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -474,12 +474,15 @@ unix_timestamp(@a)
select unix_timestamp('1969-12-01 19:00:01');
unix_timestamp('1969-12-01 19:00:01')
0
-select from_unixtime(0);
-from_unixtime(0)
+select from_unixtime(-1);
+from_unixtime(-1)
NULL
select from_unixtime(2145916800);
from_unixtime(2145916800)
NULL
+select from_unixtime(0);
+from_unixtime(0)
+1970-01-01 03:00:00
CREATE TABLE t1 (datetime datetime, timestamp timestamp, date date, time time);
INSERT INTO t1 values ("2001-01-02 03:04:05", "2002-01-02 03:04:05", "2003-01-02", "06:07:08");
SELECT * from t1;
diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result
index 1fbdd737eba..621a7ceeab8 100644
--- a/mysql-test/r/ps_2myisam.result
+++ b/mysql-test/r/ps_2myisam.result
@@ -3026,7 +3026,7 @@ c1 c13 c14 c15 c16 c17
42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
-51 0010-00-00 0010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
+51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
60 NULL NULL 1991-01-01 01:01:01 NULL NULL
diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result
index e18f7745091..4fc3ce54810 100644
--- a/mysql-test/r/ps_3innodb.result
+++ b/mysql-test/r/ps_3innodb.result
@@ -3009,7 +3009,7 @@ c1 c13 c14 c15 c16 c17
42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
-51 0010-00-00 0010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
+51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
60 NULL NULL 1991-01-01 01:01:01 NULL NULL
diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result
index 690bee55848..5025e847f1a 100644
--- a/mysql-test/r/ps_4heap.result
+++ b/mysql-test/r/ps_4heap.result
@@ -3010,7 +3010,7 @@ c1 c13 c14 c15 c16 c17
42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
-51 0010-00-00 0010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
+51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
60 NULL NULL 1991-01-01 01:01:01 NULL NULL
diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result
index 5c71d1fc53c..3dff34e374f 100644
--- a/mysql-test/r/ps_5merge.result
+++ b/mysql-test/r/ps_5merge.result
@@ -2946,7 +2946,7 @@ c1 c13 c14 c15 c16 c17
42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
-51 0010-00-00 0010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
+51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
60 NULL NULL 1991-01-01 01:01:01 NULL NULL
@@ -5955,7 +5955,7 @@ c1 c13 c14 c15 c16 c17
42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
-51 0010-00-00 0010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
+51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
60 NULL NULL 1991-01-01 01:01:01 NULL NULL
diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result
index b6fb52c1120..6817c0000c5 100644
--- a/mysql-test/r/ps_6bdb.result
+++ b/mysql-test/r/ps_6bdb.result
@@ -3009,7 +3009,7 @@ c1 c13 c14 c15 c16 c17
42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
-51 0010-00-00 0010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
+51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
60 NULL NULL 1991-01-01 01:01:01 NULL NULL
diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result
index 8ba900334fc..399b3b5017b 100644
--- a/mysql-test/r/ps_7ndb.result
+++ b/mysql-test/r/ps_7ndb.result
@@ -3009,7 +3009,7 @@ c1 c13 c14 c15 c16 c17
42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
-51 0010-00-00 0010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
+51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
60 NULL NULL 1991-01-01 01:01:01 NULL NULL
diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result
index 586f74bee20..920c82c3e67 100644
--- a/mysql-test/r/type_datetime.result
+++ b/mysql-test/r/type_datetime.result
@@ -143,3 +143,13 @@ t
0000-00-00 00:00:00
2003-01-01 00:00:00
drop table t1;
+create table t1 (dt datetime);
+insert into t1 values ("12-00-00"), ("00-00-00 01:00:00");
+insert into t1 values ("00-00-00"), ("00-00-00 00:00:00");
+select * from t1;
+dt
+2012-00-00 00:00:00
+2000-00-00 01:00:00
+0000-00-00 00:00:00
+0000-00-00 00:00:00
+drop table t1;