summaryrefslogtreecommitdiff
path: root/sql/field_conv.cc
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2004-03-16 13:26:37 +0400
committerunknown <hf@deer.(none)>2004-03-16 13:26:37 +0400
commitb0cfa449a6f35f0f9d061d7357131a83aa8d1b91 (patch)
tree4433015d6893ad522fc4fe88f07e57c5aeae670f /sql/field_conv.cc
parent17f8d3d725f4b465a8a0dc8e96b04cd973c47fd5 (diff)
downloadmariadb-git-b0cfa449a6f35f0f9d061d7357131a83aa8d1b91.tar.gz
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
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r--sql/field_conv.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc
index 67905d35e0d..47402c32aa4 100644
--- a/sql/field_conv.cc
+++ b/sql/field_conv.cc
@@ -127,7 +127,7 @@ set_field_to_null(Field *field)
if (!current_thd->no_errors)
my_printf_error(ER_BAD_NULL_ERROR,ER(ER_BAD_NULL_ERROR),MYF(0),
field->field_name);
- return 1;
+ return -1;
}
@@ -145,7 +145,7 @@ set_field_to_null(Field *field)
RETURN VALUES
0 Field could take 0 or an automatic conversion was used
- 1 Field could not take NULL and no conversion was used.
+ -1 Field could not take NULL and no conversion was used.
If no_conversion was not set, an error message is printed
*/
@@ -159,7 +159,7 @@ set_field_to_null_with_conversions(Field *field, bool no_conversions)
return 0;
}
if (no_conversions)
- return 1;
+ return -1;
/*
Check if this is a special type, which will get a special walue
@@ -184,7 +184,7 @@ set_field_to_null_with_conversions(Field *field, bool no_conversions)
if (!current_thd->no_errors)
my_printf_error(ER_BAD_NULL_ERROR,ER(ER_BAD_NULL_ERROR),MYF(0),
field->field_name);
- return 1;
+ return -1;
}