summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorhf@deer.(none) <>2004-03-16 13:26:37 +0400
committerhf@deer.(none) <>2004-03-16 13:26:37 +0400
commitceaac59c42276d22b182818326cebbb2bc617b7e (patch)
tree4433015d6893ad522fc4fe88f07e57c5aeae670f /sql/item.cc
parent861bf3c8c031ea80076acb7f7466bda73b23213c (diff)
downloadmariadb-git-ceaac59c42276d22b182818326cebbb2bc617b7e.tar.gz
Fix for #233 (the second one)
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/sql/item.cc b/sql/item.cc
index bd3b89b396b..2e1935b23d4 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -639,7 +639,7 @@ int Item_param::save_in_field(Field *field, bool no_conversions)
return 0;
}
String *result=val_str(&str_value);
- return (field->store(result->ptr(),result->length(),field->charset())) ? -1 : 0;
+ return field->store(result->ptr(),result->length(),field->charset());
}
bool Item_param::get_time(TIME *res)
@@ -1236,7 +1236,7 @@ int Item::save_in_field(Field *field, bool no_conversions)
field->set_notnull();
error=field->store(nr);
}
- return (error) ? -1 : 0;
+ return error;
}
@@ -1247,8 +1247,7 @@ int Item_string::save_in_field(Field *field, bool no_conversions)
if (null_value)
return set_field_to_null(field);
field->set_notnull();
- return (field->store(result->ptr(),result->length(),collation.collation)) ?
- -1 : 0;
+ return field->store(result->ptr(),result->length(),collation.collation);
}
int Item_uint::save_in_field(Field *field, bool no_conversions)
@@ -1267,7 +1266,7 @@ int Item_int::save_in_field(Field *field, bool no_conversions)
if (null_value)
return set_field_to_null(field);
field->set_notnull();
- return (field->store(nr)) ? -1 : 0;
+ return field->store(nr);
}
@@ -1277,7 +1276,7 @@ int Item_real::save_in_field(Field *field, bool no_conversions)
if (null_value)
return set_field_to_null(field);
field->set_notnull();
- return (field->store(nr)) ? -1 : 0;
+ return field->store(nr);
}
/****************************************************************************
@@ -1339,7 +1338,7 @@ int Item_varbinary::save_in_field(Field *field, bool no_conversions)
longlong nr=val_int();
error=field->store(nr);
}
- return (error) ? -1 : 0;
+ return error;
}