mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +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:
@@ -526,7 +526,9 @@ int mysql_update(THD *thd,
|
||||
init_read_record(&info,thd,table,select,0,1);
|
||||
|
||||
updated= found= 0;
|
||||
thd->count_cuted_fields= CHECK_FIELD_WARN; /* calc cuted fields */
|
||||
/* Generate an error when trying to set a NOT NULL field to NULL. */
|
||||
thd->count_cuted_fields= ignore ? CHECK_FIELD_WARN
|
||||
: CHECK_FIELD_ERROR_FOR_NULL;
|
||||
thd->cuted_fields=0L;
|
||||
thd->proc_info="Updating";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user