1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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.
This commit is contained in:
gshchepa/uchum@host.loc
2008-01-11 05:06:08 +04:00
parent 5b9e61b282
commit 32d13ab23d
18 changed files with 40 additions and 53 deletions

View File

@ -15674,7 +15674,7 @@ static void test_mysql_insert_id()
myquery(rc);
res= mysql_insert_id(mysql);
DIE_UNLESS(res == 0);
rc= mysql_query(mysql, "update t2 set f1=NULL where f1=14");
rc= mysql_query(mysql, "update t2 set f1=0 where f1=14");
myquery(rc);
res= mysql_insert_id(mysql);
DIE_UNLESS(res == 0);