summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-11-30 08:16:37 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-11-30 08:16:37 +0200
commit7cb3520c0632ad912b309489ad86a90f9fc9bd0b (patch)
treeff8e6b8fdf5e9cacdfe914790e480bc3bad2ad85 /sql/item_timefunc.h
parent51b30586ea999744de6a15146257f2976825781e (diff)
parent5b697c5a23ed7322b5b746b61e3ec66b510ca134 (diff)
downloadmariadb-git-7cb3520c0632ad912b309489ad86a90f9fc9bd0b.tar.gz
Merge bb-10.2-ext into 10.3
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r--sql/item_timefunc.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index bf744cc24cd..adc7b2535a9 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -1089,6 +1089,7 @@ class Item_char_typecast :public Item_str_func
CHARSET_INFO *cast_cs, *from_cs;
bool charset_conversion;
String tmp_value;
+ bool m_suppress_warning_to_error_escalation;
bool has_explicit_length() const { return cast_length != ~0U; }
String *reuse(String *src, uint32 length);
String *copy(String *src, CHARSET_INFO *cs);
@@ -1097,14 +1098,20 @@ class Item_char_typecast :public Item_str_func
void fix_length_and_dec_internal(CHARSET_INFO *fromcs);
public:
Item_char_typecast(THD *thd, Item *a, uint length_arg, CHARSET_INFO *cs_arg):
- Item_str_func(thd, a), cast_length(length_arg), cast_cs(cs_arg) {}
+ Item_str_func(thd, a), cast_length(length_arg), cast_cs(cs_arg),
+ m_suppress_warning_to_error_escalation(false) {}
enum Functype functype() const { return CHAR_TYPECAST_FUNC; }
bool eq(const Item *item, bool binary_cmp) const;
const char *func_name() const { return "cast_as_char"; }
CHARSET_INFO *cast_charset() const { return cast_cs; }
String *val_str(String *a);
+ void fix_length_and_dec_generic();
void fix_length_and_dec_numeric();
- void fix_length_and_dec_str();
+ void fix_length_and_dec_str()
+ {
+ fix_length_and_dec_generic();
+ m_suppress_warning_to_error_escalation= true;
+ }
void fix_length_and_dec()
{
args[0]->type_handler()->Item_char_typecast_fix_length_and_dec(this);