summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <ingo@mysql.com>2006-07-05 11:20:10 +0200
committerunknown <ingo@mysql.com>2006-07-05 11:20:10 +0200
commitfef31470d5f2114f374ba181e7937d728526cbaf (patch)
tree4c78c2445fa863be62cde1c40ae6490a1ad3ec23 /mysql-test
parent516fdb7197a27822e0a7623843fdb326473777e9 (diff)
parent752b826e0d890b2c3b28146089611c1982b459ed (diff)
downloadmariadb-git-fef31470d5f2114f374ba181e7937d728526cbaf.tar.gz
Merge mysql.com:/home/mydev/mysql-4.1-bug14400
into mysql.com:/home/mydev/mysql-5.0-ateam libmysqld/libmysqld.c: Auto merged myisam/mi_rkey.c: Auto merged mysql-test/r/func_sapdb.result: Auto merged mysql-test/r/symlink.result: Auto merged mysql-test/t/func_sapdb.test: Auto merged scripts/make_binary_distribution.sh: Auto merged sql/item_geofunc.h: Auto merged sql/item_timefunc.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_parse.cc: Auto merged libmysqld/lib_sql.cc: Manual merge mysql-test/r/func_time.result: Manual merge mysql-test/r/gis.result: Manual merge mysql-test/t/func_time.test: Manual merge mysql-test/t/gis.test: Manual merge sql-common/client.c: Manual merge
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_sapdb.result6
-rw-r--r--mysql-test/r/func_time.result6
-rw-r--r--mysql-test/r/gis.result9
-rw-r--r--mysql-test/r/symlink.result6
-rw-r--r--mysql-test/t/func_sapdb.test2
-rw-r--r--mysql-test/t/func_time.test4
-rw-r--r--mysql-test/t/gis.test5
7 files changed, 38 insertions, 0 deletions
diff --git a/mysql-test/r/func_sapdb.result b/mysql-test/r/func_sapdb.result
index d984eee80fa..64eb6eefd1a 100644
--- a/mysql-test/r/func_sapdb.result
+++ b/mysql-test/r/func_sapdb.result
@@ -81,6 +81,12 @@ makedate(1997,1)
select makedate(1997,0);
makedate(1997,0)
NULL
+select makedate(9999,365);
+makedate(9999,365)
+9999-12-31
+select makedate(9999,366);
+makedate(9999,366)
+NULL
select addtime("1997-12-31 23:59:59.999999", "1 1:1:1.000002");
addtime("1997-12-31 23:59:59.999999", "1 1:1:1.000002")
1998-01-02 01:01:01.000001
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index 593ce7b26c8..95acfacebf2 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -360,6 +360,12 @@ extract(SECOND FROM "1999-01-02 10:11:12")
select extract(MONTH FROM "2001-02-00");
extract(MONTH FROM "2001-02-00")
2
+SELECT DATE_SUB(str_to_date('9999-12-31 00:01:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE);
+DATE_SUB(str_to_date('9999-12-31 00:01:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE)
+9999-12-31 00:00:00
+SELECT DATE_ADD(str_to_date('9999-12-30 23:59:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE);
+DATE_ADD(str_to_date('9999-12-30 23:59:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE)
+9999-12-31 00:00:00
SELECT EXTRACT(QUARTER FROM '2004-01-15') AS quarter;
quarter
1
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index 13e2d56d83e..4140e13da12 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -671,6 +671,15 @@ POINT(10 10)
select (asWKT(geomfromwkb((0x010100000000000000000024400000000000002440))));
(asWKT(geomfromwkb((0x010100000000000000000024400000000000002440))))
POINT(10 10)
+create table t1 (g GEOMETRY);
+select * from t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def test t1 t1 g g 255 4294967295 0 Y 144 0 63
+g
+select asbinary(g) from t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def asbinary(g) 252 8192 0 Y 128 0 63
+asbinary(g)
create table t1 (s1 geometry not null,s2 char(100));
create trigger t1_bu before update on t1 for each row set new.s1 = null;
insert into t1 values (null,null);
diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result
index 3ce7cc0c835..272836c450a 100644
--- a/mysql-test/r/symlink.result
+++ b/mysql-test/r/symlink.result
@@ -74,18 +74,24 @@ t9 CREATE TABLE `t9` (
) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
drop database mysqltest;
create table t1 (a int not null) engine=myisam;
+Warnings:
+Warning 0 DATA DIRECTORY option ignored
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 add b int;
+Warnings:
+Warning 0 DATA DIRECTORY option ignored
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Warnings:
+Warning 0 INDEX DIRECTORY option ignored
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/t/func_sapdb.test b/mysql-test/t/func_sapdb.test
index 6189712b5fe..97101fba615 100644
--- a/mysql-test/t/func_sapdb.test
+++ b/mysql-test/t/func_sapdb.test
@@ -43,6 +43,8 @@ select weekofyear("1997-11-30 23:59:59.000001");
select makedate(1997,1);
select makedate(1997,0);
+select makedate(9999,365);
+select makedate(9999,366);
#Time functions
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index d817d016881..04aa36149a6 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -140,6 +140,10 @@ select extract(SECOND FROM "1999-01-02 10:11:12");
select extract(MONTH FROM "2001-02-00");
#
+# MySQL Bugs: #12356: DATE_SUB or DATE_ADD incorrectly returns null
+#
+SELECT DATE_SUB(str_to_date('9999-12-31 00:01:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE);
+SELECT DATE_ADD(str_to_date('9999-12-30 23:59:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE);
# test EXTRACT QUARTER (Bug #18100)
#
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index bb3f621d194..b25faddc1e8 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -377,6 +377,11 @@ select (asWKT(geomfromwkb((0x010100000000000000000024400000000000002440))));
# End of 4.1 tests
+--enable_metadata
+create table t1 (g GEOMETRY);
+select * from t1;
+select asbinary(g) from t1;
+--disable_metadata
#
# Bug #12281 (Geometry: crash in trigger)
#