mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL Message is chenged from 'ER_WARN_NULL_TO_NOTNULL' to 'ER_BAD_NULL_ERROR'
This commit is contained in:
@ -97,39 +97,39 @@ Warnings:
|
||||
Warning 1265 Data truncated for column 'd' at row 1
|
||||
UPDATE t1 SET d=NULL;
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'd' at row 1
|
||||
Warning 1048 Column 'd' cannot be null
|
||||
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 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
|
||||
Warning 1048 Column 'a' cannot be null
|
||||
Warning 1048 Column 'a' cannot be null
|
||||
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 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
|
||||
Warning 1048 Column 'b' cannot be null
|
||||
Warning 1048 Column 'b' cannot be null
|
||||
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 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
|
||||
Warning 1048 Column 'c' cannot be null
|
||||
Warning 1048 Column 'c' cannot be null
|
||||
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 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
|
||||
Warning 1048 Column 'd' cannot be null
|
||||
Warning 1048 Column 'd' cannot be null
|
||||
select * from t1;
|
||||
a b c d
|
||||
0 0000-00-00 00:00:00 0
|
||||
|
Reference in New Issue
Block a user