mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Add warnings for single line inserts. To do this I had to convert count_cuted_fields to an enum (to be able to detect setting a NOT NULL field to NULL)
This commit is contained in:
@ -3218,9 +3218,9 @@ store_val_in_field(Field *field,Item *item)
|
||||
bool error;
|
||||
THD *thd=current_thd;
|
||||
ha_rows cuted_fields=thd->cuted_fields;
|
||||
thd->count_cuted_fields=1;
|
||||
thd->count_cuted_fields= CHECK_FIELD_WARN;
|
||||
error= item->save_in_field(field, 1);
|
||||
thd->count_cuted_fields=0;
|
||||
thd->count_cuted_fields= CHECK_FIELD_IGNORE;
|
||||
return error || cuted_fields != thd->cuted_fields;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user