mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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).
This commit is contained in:
@ -98,8 +98,7 @@ Warning 1265 Data truncated for column 'c' at row 1
|
||||
Warning 1265 Data truncated for column 'c' at row 2
|
||||
alter table t1 add d char(2);
|
||||
update t1 set a=NULL where a=10;
|
||||
Warnings:
|
||||
Warning 1048 Column 'a' cannot be null
|
||||
ERROR 23000: Column 'a' cannot be null
|
||||
update t1 set c='mysql ab' where c='test';
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c' at row 4
|
||||
|
Reference in New Issue
Block a user