diff options
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/group_by.result | 14 | ||||
-rw-r--r-- | mysql-test/r/merge.result | 4 | ||||
-rw-r--r-- | mysql-test/r/null.result | 36 | ||||
-rw-r--r-- | mysql-test/r/rpl_loaddata.result | 13 |
4 files changed, 65 insertions, 2 deletions
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index aa3de48c09e..a63054da88b 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -468,3 +468,17 @@ NOT NULL); max(value) 4 drop table t1,t2,t3; +create table t1 (a blob null); +insert into t1 values (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(""),(""),(""),("b"); +select a,count(*) from t1 group by a; +a count(*) +NULL 9 + 3 +b 1 +set option sql_big_tables=1; +select a,count(*) from t1 group by a; +a count(*) +NULL 9 + 3 +b 1 +drop table t1; diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 9199f291c08..b28607218d1 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -260,7 +260,7 @@ t3 CREATE TABLE `t3` ( `othr` int(11) NOT NULL default '0' ) TYPE=MRG_MyISAM CHARSET=latin1 UNION=(t1,t2) drop table t3,t2,t1; -create table t1 (a int not null) type=merge; +create table t1 (a int not null, key(a)) type=merge; select * from t1; a drop table t1; @@ -536,7 +536,7 @@ INSERT INTO t2 VALUES (1,2), (2,2); CREATE TABLE t3 ( a int(11) NOT NULL default '0', b int(11) NOT NULL default '0', KEY a (a,b)) TYPE=MRG_MyISAM UNION=(t1,t2); select max(b) from t3 where a = 2; max(b) -NULL +2 select max(b) from t1 where a = 2; max(b) 1 diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result index 91af34b6681..08612fa191f 100644 --- a/mysql-test/r/null.result +++ b/mysql-test/r/null.result @@ -73,3 +73,39 @@ b ifnull(t2.b,"this is null") NULL this is null NULL this is null drop table t1; +CREATE TABLE t1 (a varchar(16) NOT NULL, b smallint(6) NOT NULL, c datetime NOT NULL, d smallint(6) NOT NULL); +INSERT INTO t1 SET a = "", d= "2003-01-14 03:54:55"; +UPDATE t1 SET d=1/NULL; +UPDATE t1 SET d=NULL; +INSERT INTO t1 (a) values (null); +Column 'a' cannot be null +INSERT INTO t1 (a) values (1/null); +Column 'a' cannot be null +INSERT INTO t1 (a) values (null),(null); +INSERT INTO t1 (b) values (null); +Column 'b' cannot be null +INSERT INTO t1 (b) values (1/null); +Column 'b' cannot be null +INSERT INTO t1 (b) values (null),(null); +INSERT INTO t1 (c) values (null); +Column 'c' cannot be null +INSERT INTO t1 (c) values (1/null); +Column 'c' cannot be null +INSERT INTO t1 (c) values (null),(null); +INSERT INTO t1 (d) values (null); +Column 'd' cannot be null +INSERT INTO t1 (d) values (1/null); +Column 'd' cannot be null +INSERT INTO t1 (d) values (null),(null); +select * from t1; +a b c d + 0 0000-00-00 00:00:00 0 + 0 0000-00-00 00:00:00 0 + 0 0000-00-00 00:00:00 0 + 0 0000-00-00 00:00:00 0 + 0 0000-00-00 00:00:00 0 + 0 0000-00-00 00:00:00 0 + 0 0000-00-00 00:00:00 0 + 0 0000-00-00 00:00:00 0 + 0 0000-00-00 00:00:00 0 +drop table t1; diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result new file mode 100644 index 00000000000..27f3d185f63 --- /dev/null +++ b/mysql-test/r/rpl_loaddata.result @@ -0,0 +1,13 @@ +slave stop; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +slave start; +create table t1(a int not null auto_increment, b int, primary key(a) ); +load data infile '../../std_data/rpl_loaddata.dat' into table t1; +select * from t1; +a b +1 10 +2 15 +drop table t1; |