diff options
author | unknown <svoj@may.pils.ru> | 2006-08-02 17:15:50 +0500 |
---|---|---|
committer | unknown <svoj@may.pils.ru> | 2006-08-02 17:15:50 +0500 |
commit | a1bd0bd1182d9acb6a8484e79259c2f80db042fd (patch) | |
tree | 7ba02c4b3e1d0612890461b1c5cda286ae67096e /mysql-test/r/null.result | |
parent | 9accdbe57cf70838e6b7b4779974c7afe54e3381 (diff) | |
download | mariadb-git-a1bd0bd1182d9acb6a8484e79259c2f80db042fd.tar.gz |
BUG#14770 - LOAD DATA INFILE doesn't respect default values for
columns
Fixed confusing warning.
Quoting INSERT section of the manual:
----
Inserting NULL into a column that has been declared NOT NULL. For
multiple-row INSERT statements or INSERT INTO ... SELECT statements, the
column is set to the implicit default value for the column data type. This
is 0 for numeric types, the empty string ('') for string types, and the
"zero" value for date and time types. INSERT INTO ... SELECT statements are
handled the same way as multiple-row inserts because the server does not
examine the result set from the SELECT to see whether it returns a single
row. (For a single-row INSERT, no warning occurs when NULL is inserted into
a NOT NULL column. Instead, the statement fails with an error.)
----
This is also true for LOAD DATA INFILE. For INSERT user can specify
DEFAULT keyword as a value to set column default. There is no similiar
feature available for LOAD DATA INFILE.
mysql-test/r/auto_increment.result:
Fixed confusing warning.
mysql-test/r/create.result:
Fixed confusing warning.
mysql-test/r/insert.result:
Fixed confusing warning.
mysql-test/r/insert_select.result:
Fixed confusing warning.
mysql-test/r/key.result:
Fixed confusing warning.
mysql-test/r/null.result:
Fixed confusing warning.
mysql-test/r/null_key.result:
Fixed confusing warning.
mysql-test/r/ps_2myisam.result:
Fixed confusing warning.
mysql-test/r/ps_3innodb.result:
Fixed confusing warning.
mysql-test/r/ps_4heap.result:
Fixed confusing warning.
mysql-test/r/ps_5merge.result:
Fixed confusing warning.
mysql-test/r/ps_6bdb.result:
Fixed confusing warning.
mysql-test/r/strict.result:
Fixed confusing warning.
mysql-test/r/view.result:
Fixed confusing warning.
mysql-test/r/warnings.result:
Fixed confusing warning.
sql/share/errmsg.txt:
Fixed confusing warning.
Diffstat (limited to 'mysql-test/r/null.result')
-rw-r--r-- | mysql-test/r/null.result | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result index 18eb10f0673..daedfa50b80 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 Column set to default value; NULL supplied to NOT NULL column 'd' at row 1 +Warning 1263 Column was set to data type implicit default; NULL supplied for 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 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 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1 +Warning 1263 Column was set to data type implicit default; NULL supplied for 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 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 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'b' at row 1 +Warning 1263 Column was set to data type implicit default; NULL supplied for 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 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 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c' at row 1 +Warning 1263 Column was set to data type implicit default; NULL supplied for 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 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 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'd' at row 1 +Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'd' at row 2 select * from t1; a b c d 0 0000-00-00 00:00:00 0 |