diff options
author | unknown <monty@mashka.mysql.fi> | 2003-03-07 01:20:56 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-03-07 01:20:56 +0200 |
commit | 81f368cc549ebd0078ef64b61bd92332edb5d319 (patch) | |
tree | 473a02ad21d3dcb150966988c72ab2d2a3dd7601 /mysql-test | |
parent | 7ae420a4a17fab1b45ee56dc5cac2f8d9063baa5 (diff) | |
parent | 5861dc5b8b39b3f822a8968963a4783541d59b77 (diff) | |
download | mariadb-git-81f368cc549ebd0078ef64b61bd92332edb5d319.tar.gz |
Merge to get fix for LOCK TABLES + DROP TABLE in another thread
BitKeeper/etc/ignore:
auto-union
BitKeeper/deleted/.del-delete.result:
Delete: mysql-test/r/delete.result
client/mysqlbinlog.cc:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/t/delete.test:
Auto merged
mysql-test/t/type_datetime.test:
Auto merged
sql/field.h:
Auto merged
sql/lock.cc:
Auto merged
sql/share/polish/errmsg.txt:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/type_datetime.result:
Update results after merge
sql/log_event.h:
Use local version
sql/mysql_priv.h:
Use local version
sql/mysqld.cc:
Use local version
sql/sql_repl.h:
Use local version
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/type_datetime.result | 21 | ||||
-rw-r--r-- | mysql-test/t/delete.test | 20 | ||||
-rw-r--r-- | mysql-test/t/type_datetime.test | 5 |
3 files changed, 46 insertions, 0 deletions
diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index 38b264b96b9..b71884f8563 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -78,3 +78,24 @@ EXPLAIN SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00'; table type possible_keys key key_len ref rows Extra t1 ref expedition expedition 8 const 1 Using where drop table t1; +CREATE TABLE `t1` ( + `date` datetime NOT NULL default '0000-00-00 00:00:00', + `numfacture` int(6) unsigned NOT NULL default '0', + `expedition` datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (`numfacture`), + KEY `date` (`date`), + KEY `expedition` (`expedition`) +) TYPE=MyISAM; + +INSERT INTO t1 (expedition) VALUES ('0001-00-00 00:00:00'); +SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00'; +INSERT INTO t1 (numfacture,expedition) VALUES ('1212','0001-00-00 00:00:00'); +SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00'; +EXPLAIN SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00'; +drop table t1; +create table t1 (a datetime not null, b datetime not null); +insert into t1 values (now(), now()); +insert into t1 values (now(), now()); +select * from t1 where a is null or b is null; +a b +drop table t1; diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test index 953e22cdd55..13fa617b3cf 100644 --- a/mysql-test/t/delete.test +++ b/mysql-test/t/delete.test @@ -35,3 +35,23 @@ create table t1 (a bigint not null, primary key (a,a,a,a,a,a,a,a,a,a)); insert into t1 values (2),(4),(6),(8),(10),(12),(14),(16),(18),(20),(22),(24),(26),(23),(27); delete from t1 where a=27; drop table t1; + +# +# CHAR(0) bug - not actually DELETE bug, but anyway... +# + +CREATE TABLE t1 ( + bool char(0) default NULL, + not_null varchar(20) binary NOT NULL default '', + misc integer not null, + PRIMARY KEY (not_null) +) TYPE=MyISAM; + +INSERT INTO t1 VALUES (NULL,'a',4), (NULL,'b',5), (NULL,'c',6), (NULL,'d',7); + +select * from t1 where misc > 5 and bool is null; +delete from t1 where misc > 5 and bool is null; +select * from t1 where misc > 5 and bool is null; + +drop table t1; + diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test index a516bc89f99..f5103958979 100644 --- a/mysql-test/t/type_datetime.test +++ b/mysql-test/t/type_datetime.test @@ -59,3 +59,8 @@ INSERT INTO t1 (numfacture,expedition) VALUES ('1212','0001-00-00 00:00:00'); SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00'; EXPLAIN SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00'; drop table t1; +create table t1 (a datetime not null, b datetime not null); +insert into t1 values (now(), now()); +insert into t1 values (now(), now()); +select * from t1 where a is null or b is null; +drop table t1; |