mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/merge-4.1
This commit is contained in:
commit
52a1639b0e
21 changed files with 244 additions and 163 deletions
|
|
@ -71,6 +71,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
|
||||
|
|
|
|||
|
|
@ -352,6 +352,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 "1900-01-01 00:00:00" + INTERVAL 2147483648 SECOND;
|
||||
"1900-01-01 00:00:00" + INTERVAL 2147483648 SECOND
|
||||
1968-01-20 03:14:08
|
||||
|
|
|
|||
|
|
@ -661,3 +661,13 @@ 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)
|
||||
drop table t1;
|
||||
|
|
|
|||
|
|
@ -326,6 +326,16 @@ alter table t1 add key (c1,c1,c2);
|
|||
ERROR 42S21: Duplicate column name 'c1'
|
||||
drop table t1;
|
||||
create table t1 (
|
||||
i1 INT NOT NULL,
|
||||
i2 INT NOT NULL,
|
||||
UNIQUE i1idx (i1),
|
||||
UNIQUE i2idx (i2));
|
||||
desc t1;
|
||||
Field Type Null Key Default Extra
|
||||
i1 int(11) UNI 0
|
||||
i2 int(11) UNI 0
|
||||
drop table t1;
|
||||
create table t1 (
|
||||
c1 int,
|
||||
c2 varchar(20) not null,
|
||||
primary key (c1),
|
||||
|
|
|
|||
|
|
@ -65,18 +65,24 @@ t9 CREATE TABLE `t9` (
|
|||
) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/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 default '0'
|
||||
) 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 default '0',
|
||||
`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` (
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ select weekofyear("1997-11-31 23:59:59.000001");
|
|||
|
||||
select makedate(1997,1);
|
||||
select makedate(1997,0);
|
||||
select makedate(9999,365);
|
||||
select makedate(9999,366);
|
||||
|
||||
#Time functions
|
||||
|
||||
|
|
|
|||
|
|
@ -139,6 +139,12 @@ select extract(MINUTE_SECOND FROM "10:11:12");
|
|||
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 big intervals (Bug #3498)
|
||||
#
|
||||
|
|
|
|||
|
|
@ -364,3 +364,10 @@ select (asWKT(geomfromwkb((0x000000000140240000000000004024000000000000))));
|
|||
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
|
||||
drop table t1;
|
||||
|
|
|
|||
|
|
@ -321,6 +321,17 @@ alter table t1 add key (c1,c2,c1);
|
|||
alter table t1 add key (c1,c1,c2);
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#11228: DESC shows arbitrary column as "PRI"
|
||||
#
|
||||
create table t1 (
|
||||
i1 INT NOT NULL,
|
||||
i2 INT NOT NULL,
|
||||
UNIQUE i1idx (i1),
|
||||
UNIQUE i2idx (i2));
|
||||
desc t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#12565 - ERROR 1034 when running simple UPDATE or DELETE
|
||||
# on large MyISAM table
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue