diff options
author | unknown <monty@mysql.com> | 2004-08-26 18:26:38 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-08-26 18:26:38 +0300 |
commit | 44b2807e4bb2383525c3abfd9ad896114dec0796 (patch) | |
tree | c7d296d78817781f8a0bdd6d65ced41030de842c /mysql-test/t | |
parent | 92dfd1bf9a3cc1b2ae720363295acf633b1e7271 (diff) | |
download | mariadb-git-44b2807e4bb2383525c3abfd9ad896114dec0796.tar.gz |
Portability fixes
Fixed bug in end space handle for WHERE text_column="constant"
heap/hp_hash.c:
Optimzations (no change of logic)
libmysql/libmysql.c:
Added missing casts (portability fix)
myisam/mi_key.c:
Changed macro to take arguments and not depend on local variables
Simple indentation fixes ?
mysql-test/r/connect.result:
Added test for setting empty password
mysql-test/r/create_select_tmp.result:
TYPE -> ENGINE
mysql-test/r/ctype_utf8.result:
Combine drop's
mysql-test/r/endspace.result:
Added more tests to test end space behaviour
mysql-test/r/having.result:
Added missing DROP TABLE
mysql-test/r/type_blob.result:
Added more tests to ensure that fix for BLOB usage is correct
mysql-test/r/type_timestamp.result:
Add test from 4.0
mysql-test/t/connect.test:
Added test for setting empty password
mysql-test/t/create_select_tmp.test:
TYPE -> ENGINE
mysql-test/t/ctype_utf8.test:
Combine drop's
mysql-test/t/endspace.test:
Added more tests to test end space behaviour
mysql-test/t/having.test:
Added missing DROP TABLE
mysql-test/t/type_blob.test:
Added more tests to ensure that fix for BLOB usage is correct
mysql-test/t/type_timestamp.test:
Add test from 4.0
sql/field.cc:
Removed not used variable
Portability fix (cast)
Simplified Field_str::double()
Simple indentation cleanups
sql/field.h:
Removed not needed class variable
sql/item_cmpfunc.cc:
Indentation fix
sql/item_strfunc.cc:
Use on stack variable for Item_str_func::val() instead of str_value.
This makes it safe to use str_value inside the Item's val function.
Cleaned up LEFT() usage, thanks to the above change
sql/item_sum.cc:
Indentation cleanups
sql/protocol.cc:
Added missing cast
sql/sql_acl.cc:
Indentatin cleanups.
Added missing cast
Simple optimization of get_sort()
sql/sql_select.cc:
Don't use 'ref' to search on text field that is not of type BINARY (use 'range' instead).
The reson is that for 'ref' we use 'index_next_same' to read the next possible row.
For text fields, rows in a ref may not come in order, like for 'x', 'x\t' 'x ' (stored in this order) which causes a search for 'column='x ' to fail
sql/tztime.cc:
Simple cleanup
strings/ctype-bin.c:
Comment fixes
strings/ctype-mb.c:
Changed variable names for arguments
Diffstat (limited to 'mysql-test/t')
-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 |
7 files changed, 33 insertions, 9 deletions
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; |