1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Fix for #233 (the second one)

sql/field.cc:
  Field_geom::store() returns -1 as a sign of fatal error
sql/field_conv.cc:
  set_field_to_null* return -1 now as the fatal error
sql/item.cc:
  no sign inversions needed
sql/opt_range.cc:
  -1 is the sign of fatal error now
sql/sql_base.cc:
  -1 is the fatal error
This commit is contained in:
unknown
2004-03-16 13:26:37 +04:00
parent 17f8d3d725
commit b0cfa449a6
5 changed files with 15 additions and 16 deletions

View File

@ -2424,7 +2424,7 @@ fill_record(List<Item> &fields,List<Item> &values, bool ignore_errors)
TABLE *table= rfield->table;
if (rfield == table->next_number_field)
table->auto_increment_field_not_null= true;
if (value->save_in_field(rfield, 0) > 0 && !ignore_errors)
if ((value->save_in_field(rfield, 0) < 0) && !ignore_errors)
DBUG_RETURN(1);
}
DBUG_RETURN(0);
@ -2445,7 +2445,7 @@ fill_record(Field **ptr,List<Item> &values, bool ignore_errors)
TABLE *table= field->table;
if (field == table->next_number_field)
table->auto_increment_field_not_null= true;
if (value->save_in_field(field, 0) == 1 && !ignore_errors)
if ((value->save_in_field(field, 0) < 0) && !ignore_errors)
DBUG_RETURN(1);
}
DBUG_RETURN(0);