summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/item.h b/sql/item.h
index a4c0f4b7393..629f9afa241 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -1214,7 +1214,9 @@ public:
}
virtual Field::geometry_type get_geometry_type() const
{ return Field::GEOM_GEOMETRY; };
- String *check_well_formed_result(String *str, bool send_error= 0);
+ String *check_well_formed_result(String *str,
+ bool send_error,
+ bool truncate);
bool eq_by_collation(Item *item, bool binary_cmp, CHARSET_INFO *cs);
uint32 max_char_length() const
{ return max_length / collation.collation->mbmaxlen; }
@@ -2193,6 +2195,11 @@ public:
decimals=NOT_FIXED_DEC;
// it is constant => can be used without fix_fields (and frequently used)
fixed= 1;
+ /*
+ Check if the string has any character that can't be
+ interpreted using the relevant charset.
+ */
+ check_well_formed_result(&str_value, false, false);
}
/* Just create an item and do not fill string representation */
Item_string(CHARSET_INFO *cs, Derivation dv= DERIVATION_COERCIBLE)