summaryrefslogtreecommitdiff
path: root/sql/field_conv.cc
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2003-01-18 03:13:37 +0200
committermonty@mashka.mysql.fi <>2003-01-18 03:13:37 +0200
commit76f146a17551e218727ee4a5544edb62d3cbe56e (patch)
treeb24bce166fd5affbcc506bbc7d70c2c7ef00f561 /sql/field_conv.cc
parent1b03f007101aa5123a7e55add3db5139a47bddc6 (diff)
parentc1d614192ee6930aed50f0cf64bf60abf6c1acb0 (diff)
downloadmariadb-git-76f146a17551e218727ee4a5544edb62d3cbe56e.tar.gz
Merge with 4.0.9
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r--sql/field_conv.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc
index 95d06176cd2..47996606638 100644
--- a/sql/field_conv.cc
+++ b/sql/field_conv.cc
@@ -118,6 +118,15 @@ set_field_to_null(Field *field)
field->reset();
return 0;
}
+ field->reset();
+ if (current_thd->count_cuted_fields)
+ {
+ current_thd->cuted_fields++; // Increment error counter
+ return 0;
+ }
+ if (!current_thd->no_errors)
+ my_printf_error(ER_BAD_NULL_ERROR,ER(ER_BAD_NULL_ERROR),MYF(0),
+ field->field_name);
return 1;
}