diff options
author | unknown <monty@narttu.mysql.fi> | 2003-03-10 13:54:20 +0200 |
---|---|---|
committer | unknown <monty@narttu.mysql.fi> | 2003-03-10 13:54:20 +0200 |
commit | 5c100a6975cb50a6e20e6a0380bfb616e54eab70 (patch) | |
tree | c4dd436c27f0afcb40a0c5a50508515617f5552c /mysql-test | |
parent | 012ffb5d505cc563ae980bd8cbee9b668f517cac (diff) | |
download | mariadb-git-5c100a6975cb50a6e20e6a0380bfb616e54eab70.tar.gz |
after merge fixes
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/backup.result | 40 | ||||
-rw-r--r-- | mysql-test/r/delete.result | 15 | ||||
-rw-r--r-- | mysql-test/r/join.result | 19 | ||||
-rw-r--r-- | mysql-test/r/type_datetime.result | 6 |
4 files changed, 62 insertions, 18 deletions
diff --git a/mysql-test/r/backup.result b/mysql-test/r/backup.result index 43d57d2d4f7..0e0a87172f2 100644 --- a/mysql-test/r/backup.result +++ b/mysql-test/r/backup.result @@ -1,20 +1,24 @@ set SQL_LOG_BIN=0; -drop table if exists t1; -create table t1(n int); -backup table t1 to '../bogus'; +create table t4(n int); +backup table t4 to '../bogus'; Table Op Msg_type Msg_text -test.t1 backup error Failed copying .frm file: errno = X -test.t1 backup status Operation failed -backup table t1 to '../tmp'; +test.t4 backup error Failed copying .frm file (errno: X) +test.t4 backup status Operation failed +backup table t4 to '../tmp'; Table Op Msg_type Msg_text -test.t1 backup status OK -drop table t1; -restore table t1 from '../tmp'; +test.t4 backup status OK +backup table t4 to '../tmp'; Table Op Msg_type Msg_text -test.t1 restore status OK -select count(*) from t1; +test.t4 backup error Failed copying .frm file (errno: X) +test.t4 backup status Operation failed +drop table t4; +restore table t4 from '../tmp'; +Table Op Msg_type Msg_text +test.t4 restore status OK +select count(*) from t4; count(*) 0 +create table t1(n int); insert into t1 values (23),(45),(67); backup table t1 to '../tmp'; Table Op Msg_type Msg_text @@ -35,9 +39,8 @@ create table t2(m int not null primary key); create table t3(k int not null primary key); insert into t2 values (123),(145),(167); insert into t3 values (223),(245),(267); -backup table t1,t2,t3 to '../tmp'; +backup table t2,t3 to '../tmp'; Table Op Msg_type Msg_text -test.t1 backup status OK test.t2 backup status OK test.t3 backup status OK drop table t1,t2,t3; @@ -61,13 +64,14 @@ k 223 245 267 -drop table t1,t2,t3; +drop table t1,t2,t3,t4; restore table t1 from '../tmp'; Table Op Msg_type Msg_text test.t1 restore status OK -lock tables t1 write; -backup table t1 to '../tmp'; +rename table t1 to t5; +lock tables t5 write; +backup table t5 to '../tmp'; unlock tables; Table Op Msg_type Msg_text -test.t1 backup status OK -drop table t1; +test.t5 backup status OK +drop table t5; diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result index c2230722aa6..582ab894233 100644 --- a/mysql-test/r/delete.result +++ b/mysql-test/r/delete.result @@ -24,3 +24,18 @@ 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; +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; +bool not_null misc +NULL c 6 +NULL d 7 +delete from t1 where misc > 5 and bool is null; +select * from t1 where misc > 5 and bool is null; +bool not_null misc +drop table t1; diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result index d8c45ca09ce..9f6a8762325 100644 --- a/mysql-test/r/join.result +++ b/mysql-test/r/join.result @@ -251,7 +251,26 @@ t1_id t2_id type cost_unit min_value max_value t3_id item_id id name 22 1 Percent Cost 100 -1 6 291 1 s1 23 1 Percent Cost 100 -1 21 291 1 s1 drop table t1,t2; +CREATE TABLE t1 ( +siteid varchar(25) NOT NULL default '', +emp_id varchar(30) NOT NULL default '', +rate_code varchar(10) default NULL, +UNIQUE KEY site_emp (siteid,emp_id), +KEY siteid (siteid) +) TYPE=MyISAM; +INSERT INTO t1 VALUES ('rivercats','psmith','cust'), ('rivercats','KWalker','cust'); +CREATE TABLE t2 ( +siteid varchar(25) NOT NULL default '', +rate_code varchar(10) NOT NULL default '', +base_rate float NOT NULL default '0', +PRIMARY KEY (siteid,rate_code), +FULLTEXT KEY rate_code (rate_code) +) TYPE=MyISAM; +INSERT INTO t2 VALUES ('rivercats','cust',20); +SELECT emp.rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE emp.emp_id = 'psmith' AND lr.siteid = 'rivercats'; rate_code base_rate cust 20 +SELECT emp.rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE lr.siteid = 'rivercats' AND emp.emp_id = 'psmith'; rate_code base_rate cust 20 +drop table t1,t2; diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index 38b264b96b9..4785f790069 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -78,3 +78,9 @@ 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 (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; |