diff options
Diffstat (limited to 'mysql-test/r/strict.result')
-rw-r--r-- | mysql-test/r/strict.result | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index 99ea0d577da..5e1768a207e 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -1029,7 +1029,11 @@ Warnings: Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col1' at row 1 Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1 INSERT IGNORE INTO t1 (col1) values (3); +Warnings: +Warning 1364 Field 'col2' doesn't have a default value INSERT IGNORE INTO t1 () values (); +Warnings: +Warning 1364 Field 'col2' doesn't have a default value SELECT * FROM t1; col1 col2 1 hello @@ -1038,6 +1042,47 @@ col1 col2 3 99 DROP TABLE t1; +SET @@sql_mode = 'traditional'; +CREATE TABLE t1 (i int not null); +INSERT INTO t1 VALUES (); +ERROR HY000: Field 'i' doesn't have a default value +INSERT INTO t1 VALUES (DEFAULT); +ERROR HY000: Field 'i' doesn't have a default value +INSERT INTO t1 VALUES (DEFAULT(i)); +ERROR HY000: Field 'i' doesn't have a default value +ALTER TABLE t1 ADD j int; +INSERT INTO t1 SET j = 1; +ERROR HY000: Field 'i' doesn't have a default value +INSERT INTO t1 SET j = 1, i = DEFAULT; +ERROR HY000: Field 'i' doesn't have a default value +INSERT INTO t1 SET j = 1, i = DEFAULT(i); +ERROR HY000: Field 'i' doesn't have a default value +INSERT INTO t1 VALUES (DEFAULT,1); +ERROR HY000: Field 'i' doesn't have a default value +DROP TABLE t1; +SET @@sql_mode = ''; +CREATE TABLE t1 (i int not null); +INSERT INTO t1 VALUES (); +Warnings: +Warning 1364 Field 'i' doesn't have a default value +INSERT INTO t1 VALUES (DEFAULT); +Warnings: +Warning 1364 Field 'i' doesn't have a default value +INSERT INTO t1 VALUES (DEFAULT(i)); +ERROR HY000: Field 'i' doesn't have a default value +ALTER TABLE t1 ADD j int; +INSERT INTO t1 SET j = 1; +Warnings: +Warning 1364 Field 'i' doesn't have a default value +INSERT INTO t1 SET j = 1, i = DEFAULT; +Warnings: +Warning 1364 Field 'i' doesn't have a default value +INSERT INTO t1 SET j = 1, i = DEFAULT(i); +ERROR HY000: Field 'i' doesn't have a default value +INSERT INTO t1 VALUES (DEFAULT,1); +Warnings: +Warning 1364 Field 'i' doesn't have a default value +DROP TABLE t1; set sql_mode='traditional'; create table t1 (charcol char(255), varcharcol varchar(255), binarycol binary(255), varbinarycol varbinary(255), tinytextcol tinytext, |