1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Proposed fix for #615

So now for the CREATE TABLE foo (id integer NOT NULL default 9)
INSERT INTO foo VALUES (NULL); we get an error
INSERT INTO foo VALUES (1), (NULL), (2); we get one warning
          and second record is set to 9

Is that what we want?
This commit is contained in:
hf@deer.(none)
2003-06-20 18:52:40 +05:00
parent 10c81fb52d
commit eb901ea461

View File

@@ -121,6 +121,7 @@ set_field_to_null(Field *field)
field->reset();
if (current_thd->count_cuted_fields)
{
field->set_default();
current_thd->cuted_fields++; // Increment error counter
return 0;
}
@@ -175,6 +176,7 @@ set_field_to_null_with_conversions(Field *field, bool no_conversions)
return 0; // field is set in handler.cc
if (current_thd->count_cuted_fields)
{
field->set_default();
current_thd->cuted_fields++; // Increment error counter
return 0;
}