summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc
index ba920497ec1..b52619ceee0 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -5305,7 +5305,7 @@ int Item::save_in_field(Field *field, bool no_conversions)
field->set_notnull();
error=field->store(nr, unsigned_flag);
}
- return error;
+ return error ? error : (field->table->in_use->is_error() ? 2 : 0);
}