diff options
author | unknown <gshchepa/uchum@host.loc> | 2008-01-11 05:06:08 +0400 |
---|---|---|
committer | unknown <gshchepa/uchum@host.loc> | 2008-01-11 05:06:08 +0400 |
commit | a114ede24abff88609e5686f0eafbaf7fc2ed0b7 (patch) | |
tree | d8feee23dcee7d250b78786ec8170e5e615d4e65 /mysql-test/r/null.result | |
parent | 34cae15606134da46ed426d4ac42f01c93992324 (diff) | |
download | mariadb-git-a114ede24abff88609e5686f0eafbaf7fc2ed0b7.tar.gz |
Bug#33699: The UPDATE statement allows NULL as new value on a NOT NULL
columns (default datatype value is assigned).
The mysql_update function has been modified to generate
an error when trying to set a NOT NULL field to NULL rather than a warning
in the set_field_to_null_with_conversions function.
mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test:
Updated test case (for bug#33699).
mysql-test/include/ps_modify.inc:
Updated test case (for bug#33699).
mysql-test/r/auto_increment.result:
Updated test case (for bug#33699).
mysql-test/r/null.result:
Updated test case (for bug#33699).
mysql-test/r/ps_2myisam.result:
Updated test case (for bug#33699).
mysql-test/r/ps_3innodb.result:
Updated test case (for bug#33699).
mysql-test/r/ps_4heap.result:
Updated test case (for bug#33699).
mysql-test/r/ps_5merge.result:
Updated test case (for bug#33699).
mysql-test/r/warnings.result:
Updated test case (for bug#33699).
mysql-test/suite/ndb/r/ps_7ndb.result:
Updated test case (for bug#33699).
mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result:
Updated test case (for bug#33699).
mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result:
Updated test case (for bug#33699).
mysql-test/suite/rpl/t/rpl_err_ignoredtable.test:
Updated test case (for bug#33699).
mysql-test/t/auto_increment.test:
Updated test case (for bug#33699).
mysql-test/t/null.test:
Updated test case (for bug#33699).
mysql-test/t/warnings.test:
Updated test case (for bug#33699).
sql/sql_update.cc:
Bug#33699: The mysql_update function has been modified to generate
an error when trying to set a NOT NULL field to NULL rather than
a warning in the set_field_to_null_with_conversions function.
tests/mysql_client_test.c:
Updated test case (for bug#33699).
Diffstat (limited to 'mysql-test/r/null.result')
-rw-r--r-- | mysql-test/r/null.result | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result index 345c9b07b98..5a2ebc37cc8 100644 --- a/mysql-test/r/null.result +++ b/mysql-test/r/null.result @@ -93,11 +93,9 @@ INSERT INTO t1 SET a = "", d= "2003-01-14 03:54:55"; Warnings: Warning 1265 Data truncated for column 'd' at row 1 UPDATE t1 SET d=1/NULL; -Warnings: -Warning 1265 Data truncated for column 'd' at row 1 +ERROR 23000: Column 'd' cannot be null UPDATE t1 SET d=NULL; -Warnings: -Warning 1048 Column 'd' cannot be null +ERROR 23000: 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); @@ -132,7 +130,7 @@ 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 + 0 0000-00-00 00:00:00 2003 0 0000-00-00 00:00:00 0 0 0000-00-00 00:00:00 0 0 0000-00-00 00:00:00 0 |