diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-11-30 08:16:37 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-11-30 08:16:37 +0200 |
commit | 7cb3520c0632ad912b309489ad86a90f9fc9bd0b (patch) | |
tree | ff8e6b8fdf5e9cacdfe914790e480bc3bad2ad85 /sql/item_timefunc.cc | |
parent | 51b30586ea999744de6a15146257f2976825781e (diff) | |
parent | 5b697c5a23ed7322b5b746b61e3ec66b510ca134 (diff) | |
download | mariadb-git-7cb3520c0632ad912b309489ad86a90f9fc9bd0b.tar.gz |
Merge bb-10.2-ext into 10.3
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 3a7684fe7b4..fd170a707c9 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -2434,6 +2434,8 @@ void Item_char_typecast::check_truncation_with_warn(String *src, uint dstlen) THD *thd= current_thd; char char_type[40]; ErrConvString err(src); + bool save_abort_on_warning= thd->abort_on_warning; + thd->abort_on_warning&= !m_suppress_warning_to_error_escalation; my_snprintf(char_type, sizeof(char_type), "%s(%lu)", cast_cs == &my_charset_bin ? "BINARY" : "CHAR", (ulong) cast_length); @@ -2441,6 +2443,7 @@ void Item_char_typecast::check_truncation_with_warn(String *src, uint dstlen) ER_TRUNCATED_WRONG_VALUE, ER_THD(thd, ER_TRUNCATED_WRONG_VALUE), char_type, err.ptr()); + thd->abort_on_warning= save_abort_on_warning; } } @@ -2551,7 +2554,7 @@ void Item_char_typecast::fix_length_and_dec_numeric() } -void Item_char_typecast::fix_length_and_dec_str() +void Item_char_typecast::fix_length_and_dec_generic() { fix_length_and_dec_internal(from_cs= args[0]->dynamic_result() ? 0 : |