diff options
author | unknown <monty@mysql.com> | 2004-08-26 18:27:33 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-08-26 18:27:33 +0300 |
commit | 717fc0b01eae7a0c0f647ff16cd5b7244fcc21e8 (patch) | |
tree | f50012bc1acc5d741fe45620f11da82773be8227 /mysql-test | |
parent | c75e4dfed14e0f96e3458e2a8764ef570bf3b744 (diff) | |
parent | 44b2807e4bb2383525c3abfd9ad896114dec0796 (diff) | |
download | mariadb-git-717fc0b01eae7a0c0f647ff16cd5b7244fcc21e8.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
libmysql/libmysql.c:
Auto merged
mysql-test/r/endspace.result:
Auto merged
strings/ctype-bin.c:
Auto merged
strings/ctype-mb.c:
Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/connect.result | 1 | ||||
-rw-r--r-- | mysql-test/r/create_select_tmp.result | 8 | ||||
-rw-r--r-- | mysql-test/r/ctype_utf8.result | 3 | ||||
-rw-r--r-- | mysql-test/r/endspace.result | 43 | ||||
-rw-r--r-- | mysql-test/r/having.result | 1 | ||||
-rw-r--r-- | mysql-test/r/type_blob.result | 20 | ||||
-rw-r--r-- | mysql-test/r/type_timestamp.result | 12 | ||||
-rw-r--r-- | mysql-test/t/connect.test | 1 | ||||
-rw-r--r-- | mysql-test/t/create_select_tmp.test | 8 | ||||
-rw-r--r-- | mysql-test/t/ctype_utf8.test | 3 | ||||
-rw-r--r-- | mysql-test/t/endspace.test | 12 | ||||
-rw-r--r-- | mysql-test/t/having.test | 1 | ||||
-rw-r--r-- | mysql-test/t/type_blob.test | 7 | ||||
-rw-r--r-- | mysql-test/t/type_timestamp.test | 10 |
14 files changed, 103 insertions, 27 deletions
diff --git a/mysql-test/r/connect.result b/mysql-test/r/connect.result index ae0def02399..edf30e7f6e4 100644 --- a/mysql-test/r/connect.result +++ b/mysql-test/r/connect.result @@ -40,6 +40,7 @@ show tables; Tables_in_test update mysql.user set password=old_password("gambling2") where user=_binary"test"; flush privileges; +set password=""; set password='gambling3'; ERROR HY000: Password hash should be a 41-digit hexadecimal number set password=old_password('gambling3'); diff --git a/mysql-test/r/create_select_tmp.result b/mysql-test/r/create_select_tmp.result index 09ffc9013c7..b99bf3e3591 100644 --- a/mysql-test/r/create_select_tmp.result +++ b/mysql-test/r/create_select_tmp.result @@ -1,19 +1,19 @@ drop table if exists t1, t2; CREATE TABLE t1 ( a int ); INSERT INTO t1 VALUES (1),(2),(1); -CREATE TABLE t2 ( PRIMARY KEY (a) ) TYPE=INNODB SELECT a FROM t1; +CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1; ERROR 23000: Duplicate entry '1' for key 1 select * from t2; ERROR 42S02: Table 'test.t2' doesn't exist -CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) TYPE=INNODB SELECT a FROM t1; +CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1; ERROR 23000: Duplicate entry '1' for key 1 select * from t2; ERROR 42S02: Table 'test.t2' doesn't exist -CREATE TABLE t2 ( PRIMARY KEY (a) ) TYPE=MYISAM SELECT a FROM t1; +CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1; ERROR 23000: Duplicate entry '1' for key 1 select * from t2; ERROR 42S02: Table 'test.t2' doesn't exist -CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) TYPE=MYISAM SELECT a FROM t1; +CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1; ERROR 23000: Duplicate entry '1' for key 1 select * from t2; ERROR 42S02: Table 'test.t2' doesn't exist diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 38fc8e17d14..f3be539251a 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -1,5 +1,4 @@ -drop table if exists t1; -drop table if exists t2; +drop table if exists t1,t2; set names utf8; select left(_utf8 0xD0B0D0B1D0B2,1); left(_utf8 0xD0B0D0B1D0B2,1) diff --git a/mysql-test/r/endspace.result b/mysql-test/r/endspace.result index 4800bbf4ecb..96210a0e16d 100644 --- a/mysql-test/r/endspace.result +++ b/mysql-test/r/endspace.result @@ -52,13 +52,13 @@ select * from t1 ignore key (key1) where text1='teststring' or text1 like 'tests text1 teststring teststring -select * from t1 where text1='teststring' or text1 like 'teststring_%'; -text1 -teststring -teststring -select * from t1 where text1='teststring' or text1 > 'teststring\t'; -text1 -teststring +select concat('|', text1, '|') from t1 where text1='teststring' or text1 like 'teststring_%'; +concat('|', text1, '|') +|teststring | +|teststring| +select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t'; +concat('|', text1, '|') +|teststring| select text1, length(text1) from t1 order by text1; text1 length(text1) nothing 7 @@ -77,7 +77,28 @@ concat('|', text1, '|') |teststring| |teststring | |teststring | +select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t'; +concat('|', text1, '|') +|teststring| +|teststring | +select concat('|', text1, '|') from t1 where text1='teststring'; +concat('|', text1, '|') +|teststring| +select concat('|', text1, '|') from t1 where text1='teststring '; +concat('|', text1, '|') +|teststring | alter table t1 modify text1 text not null, pack_keys=1; +select concat('|', text1, '|') from t1 where text1='teststring'; +concat('|', text1, '|') +|teststring| +|teststring | +select concat('|', text1, '|') from t1 where text1='teststring '; +concat('|', text1, '|') +|teststring| +|teststring | +explain select concat('|', text1, '|') from t1 where text1='teststring '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range key1 key1 22 NULL 2 Using where select * from t1 where text1 like 'teststring_%'; text1 teststring @@ -87,10 +108,10 @@ text1 teststring teststring teststring -select * from t1 where text1='teststring' or text1 > 'teststring\t'; -text1 -teststring -teststring +select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t'; +concat('|', text1, '|') +|teststring| +|teststring | select concat('|', text1, '|') from t1 order by text1; concat('|', text1, '|') |nothing| diff --git a/mysql-test/r/having.result b/mysql-test/r/having.result index f7e0bbf3e2c..218276406b1 100644 --- a/mysql-test/r/having.result +++ b/mysql-test/r/having.result @@ -127,3 +127,4 @@ having (a.description is not null) and (c=0); id description c 1 test 0 2 test2 0 +drop table t1,t2,t3; diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index 580fc9a8d0b..95bba1d4ec7 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -593,9 +593,12 @@ create table t1 (id integer primary key auto_increment, txt text, unique index t insert into t1 (txt) values ('Chevy'), ('Chevy '), (NULL); select * from t1 where txt='Chevy' or txt is NULL; id txt +3 NULL 1 Chevy 2 Chevy -3 NULL +explain select * from t1 where txt='Chevy' or txt is NULL; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range txt_index txt_index 23 NULL 2 Using where select * from t1 where txt='Chevy '; id txt 1 Chevy @@ -663,6 +666,21 @@ id txt 1 Chevy 2 Chevy 4 Ford +alter table t1 modify column txt blob; +explain select * from t1 where txt='Chevy' or txt is NULL; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref_or_null txt_index txt_index 23 const 2 Using where +select * from t1 where txt='Chevy' or txt is NULL; +id txt +1 Chevy +3 NULL +explain select * from t1 where txt='Chevy' or txt is NULL order by txt; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref_or_null txt_index txt_index 23 const 2 Using where; Using filesort +select * from t1 where txt='Chevy' or txt is NULL order by txt; +id txt +3 NULL +1 Chevy drop table t1; CREATE TABLE t1 ( i int(11) NOT NULL default '0', c text NOT NULL, PRIMARY KEY (i), KEY (c(1),c(1))); INSERT t1 VALUES (1,''),(2,''),(3,'asdfh'),(4,''); diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result index aa8c0903558..425e4a05586 100644 --- a/mysql-test/r/type_timestamp.result +++ b/mysql-test/r/type_timestamp.result @@ -365,3 +365,15 @@ select * from t1; t1 i 2004-04-01 00:00:00 10 drop table t1; +create table t1 (ts timestamp(19)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `ts` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +set TIMESTAMP=1000000000; +insert into t1 values (); +select * from t1; +ts +2001-09-09 04:46:40 +drop table t1; diff --git a/mysql-test/t/connect.test b/mysql-test/t/connect.test index c1ecf176470..4598ca5ea15 100644 --- a/mysql-test/t/connect.test +++ b/mysql-test/t/connect.test @@ -48,6 +48,7 @@ flush privileges; #connect (con1,localhost,test,gambling2,""); #show tables; connect (con1,localhost,test,gambling2,mysql); +set password=""; --error 1105 set password='gambling3'; set password=old_password('gambling3'); diff --git a/mysql-test/t/create_select_tmp.test b/mysql-test/t/create_select_tmp.test index 166d32fb17c..d81a3799d98 100644 --- a/mysql-test/t/create_select_tmp.test +++ b/mysql-test/t/create_select_tmp.test @@ -12,18 +12,18 @@ drop table if exists t1, t2; CREATE TABLE t1 ( a int ); INSERT INTO t1 VALUES (1),(2),(1); --error 1062; -CREATE TABLE t2 ( PRIMARY KEY (a) ) TYPE=INNODB SELECT a FROM t1; +CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1; --error 1146; select * from t2; --error 1062; -CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) TYPE=INNODB SELECT a FROM t1; +CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1; --error 1146; select * from t2; --error 1062; -CREATE TABLE t2 ( PRIMARY KEY (a) ) TYPE=MYISAM SELECT a FROM t1; +CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1; --error 1146; select * from t2; --error 1062; -CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) TYPE=MYISAM SELECT a FROM t1; +CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1; --error 1146; select * from t2; diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index 4624f2ec78c..2c531d4e5d2 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -3,8 +3,7 @@ # --disable_warnings -drop table if exists t1; -drop table if exists t2; +drop table if exists t1,t2; --enable_warnings set names utf8; diff --git a/mysql-test/t/endspace.test b/mysql-test/t/endspace.test index a9933ff93b5..9ee5e32967a 100644 --- a/mysql-test/t/endspace.test +++ b/mysql-test/t/endspace.test @@ -31,19 +31,25 @@ explain select * from t1 order by text1; alter table t1 modify text1 char(32) binary not null; check table t1; select * from t1 ignore key (key1) where text1='teststring' or text1 like 'teststring_%'; -select * from t1 where text1='teststring' or text1 like 'teststring_%'; -select * from t1 where text1='teststring' or text1 > 'teststring\t'; +select concat('|', text1, '|') from t1 where text1='teststring' or text1 like 'teststring_%'; +select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t'; select text1, length(text1) from t1 order by text1; select text1, length(text1) from t1 order by binary text1; alter table t1 modify text1 blob not null, drop key key1, add key key1 (text1(20)); insert into t1 values ('teststring '); select concat('|', text1, '|') from t1 order by text1; +select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t'; +select concat('|', text1, '|') from t1 where text1='teststring'; +select concat('|', text1, '|') from t1 where text1='teststring '; alter table t1 modify text1 text not null, pack_keys=1; +select concat('|', text1, '|') from t1 where text1='teststring'; +select concat('|', text1, '|') from t1 where text1='teststring '; +explain select concat('|', text1, '|') from t1 where text1='teststring '; select * from t1 where text1 like 'teststring_%'; select * from t1 where text1='teststring' or text1 like 'teststring_%'; -select * from t1 where text1='teststring' or text1 > 'teststring\t'; +select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t'; select concat('|', text1, '|') from t1 order by text1; drop table t1; diff --git a/mysql-test/t/having.test b/mysql-test/t/having.test index 870f57a4483..12a44fd75dc 100644 --- a/mysql-test/t/having.test +++ b/mysql-test/t/having.test @@ -121,3 +121,4 @@ select from t1 a left join t3 b on a.id=b.order_id group by a.id, a.description having (a.description is not null) and (c=0); +drop table t1,t2,t3; diff --git a/mysql-test/t/type_blob.test b/mysql-test/t/type_blob.test index 8c6cabd997b..bd571deff49 100644 --- a/mysql-test/t/type_blob.test +++ b/mysql-test/t/type_blob.test @@ -340,6 +340,7 @@ drop table t1; create table t1 (id integer primary key auto_increment, txt text, unique index txt_index (txt (20))); insert into t1 (txt) values ('Chevy'), ('Chevy '), (NULL); select * from t1 where txt='Chevy' or txt is NULL; +explain select * from t1 where txt='Chevy' or txt is NULL; select * from t1 where txt='Chevy '; select * from t1 where txt='Chevy ' or txt='Chevy'; select * from t1 where txt='Chevy' or txt='Chevy '; @@ -358,7 +359,13 @@ select * from t1 where txt < 'Chevy ' or txt is NULL; select * from t1 where txt <= 'Chevy'; select * from t1 where txt > 'Chevy'; select * from t1 where txt >= 'Chevy'; +alter table t1 modify column txt blob; +explain select * from t1 where txt='Chevy' or txt is NULL; +select * from t1 where txt='Chevy' or txt is NULL; +explain select * from t1 where txt='Chevy' or txt is NULL order by txt; +select * from t1 where txt='Chevy' or txt is NULL order by txt; drop table t1; + CREATE TABLE t1 ( i int(11) NOT NULL default '0', c text NOT NULL, PRIMARY KEY (i), KEY (c(1),c(1))); INSERT t1 VALUES (1,''),(2,''),(3,'asdfh'),(4,''); select max(i) from t1 where c = ''; diff --git a/mysql-test/t/type_timestamp.test b/mysql-test/t/type_timestamp.test index 9b3abc9f155..a644197f757 100644 --- a/mysql-test/t/type_timestamp.test +++ b/mysql-test/t/type_timestamp.test @@ -234,3 +234,13 @@ alter table t1 add i int default 10; select * from t1; drop table t1; + +# Test for bug #4491, TIMESTAMP(19) should be possible to create and not +# only read in 4.0 +# +create table t1 (ts timestamp(19)); +show create table t1; +set TIMESTAMP=1000000000; +insert into t1 values (); +select * from t1; +drop table t1; |