summaryrefslogtreecommitdiff
path: root/mysql-test/r/null.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/null.result')
-rw-r--r--mysql-test/r/null.result29
1 files changed, 19 insertions, 10 deletions
diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result
index 3e233eb512a..68fb9c3a34b 100644
--- a/mysql-test/r/null.result
+++ b/mysql-test/r/null.result
@@ -97,39 +97,39 @@ Warnings:
Warning 1265 Data truncated for column 'd' at row 1
UPDATE t1 SET d=NULL;
Warnings:
-Warning 1263 Data truncated; NULL supplied to NOT NULL column 'd' at row 1
+Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'd' at row 1
INSERT INTO t1 (a) values (null);
ERROR 23000: Column 'a' cannot be null
INSERT INTO t1 (a) values (1/null);
ERROR 23000: Column 'a' cannot be null
INSERT INTO t1 (a) values (null),(null);
Warnings:
-Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
-Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 2
+Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1
+Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 2
INSERT INTO t1 (b) values (null);
ERROR 23000: Column 'b' cannot be null
INSERT INTO t1 (b) values (1/null);
ERROR 23000: Column 'b' cannot be null
INSERT INTO t1 (b) values (null),(null);
Warnings:
-Warning 1263 Data truncated; NULL supplied to NOT NULL column 'b' at row 1
-Warning 1263 Data truncated; NULL supplied to NOT NULL column 'b' at row 2
+Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 1
+Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 2
INSERT INTO t1 (c) values (null);
ERROR 23000: Column 'c' cannot be null
INSERT INTO t1 (c) values (1/null);
ERROR 23000: Column 'c' cannot be null
INSERT INTO t1 (c) values (null),(null);
Warnings:
-Warning 1263 Data truncated; NULL supplied to NOT NULL column 'c' at row 1
-Warning 1263 Data truncated; NULL supplied to NOT NULL column 'c' at row 2
+Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1
+Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 2
INSERT INTO t1 (d) values (null);
ERROR 23000: Column 'd' cannot be null
INSERT INTO t1 (d) values (1/null);
ERROR 23000: Column 'd' cannot be null
INSERT INTO t1 (d) values (null),(null);
Warnings:
-Warning 1263 Data truncated; NULL supplied to NOT NULL column 'd' at row 1
-Warning 1263 Data truncated; NULL supplied to NOT NULL column 'd' at row 2
+Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'd' at row 1
+Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'd' at row 2
select * from t1;
a b c d
0 0000-00-00 00:00:00 0
@@ -167,13 +167,22 @@ insert into t1 select i*2 from t1;
insert into t1 select i*2 from t1;
insert into t1 select i*2 from t1;
insert into t1 select i*2 from t1;
+insert into t1 values(null);
explain select * from t1 where i=2 or i is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref_or_null i i 5 const 10 Using where; Using index
+select count(*) from t1 where i=2 or i is null;
+count(*)
+10
alter table t1 change i i int not null;
+Warnings:
+Warning 1265 Data truncated for column 'i' at row 513
explain select * from t1 where i=2 or i is null;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref i i 4 const 7 Using where; Using index
+1 SIMPLE t1 ref i i 4 const 8 Using index
+select count(*) from t1 where i=2 or i is null;
+count(*)
+9
drop table t1;
set names latin2;
create table t1 select