diff options
author | Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com> | 2015-07-10 07:52:00 +0530 |
---|---|---|
committer | Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com> | 2015-07-10 07:52:00 +0530 |
commit | 33a2e5abd86727155b629246445d508bb2cd02c0 (patch) | |
tree | ab6748eb9bb0ef8338ba3843e3b30f93f81fceeb /sql/item_strfunc.cc | |
parent | 8f87d6cd41042fe931305a60718d6aa1015a9ccc (diff) | |
download | mariadb-git-33a2e5abd86727155b629246445d508bb2cd02c0.tar.gz |
Bug #20238729: ILLEGALLY CRAFTED UTF8 SELECT PROVIDES NO
WARNINGS
Backporting to 5.1 and 5.5
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 25473815b9c..5e6da3b1300 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -2373,7 +2373,9 @@ String *Item_func_char::val_str(String *str) } } str->realloc(str->length()); // Add end 0 (for Purify) - return check_well_formed_result(str); + return check_well_formed_result(str, + false, // send warning + true); // truncate } @@ -2773,7 +2775,9 @@ String *Item_func_conv_charset::val_str(String *str) } null_value= tmp_value.copy(arg->ptr(), arg->length(), arg->charset(), conv_charset, &dummy_errors); - return null_value ? 0 : check_well_formed_result(&tmp_value); + return null_value ? 0 : check_well_formed_result(&tmp_value, + false, // send warning + true); // truncate } void Item_func_conv_charset::fix_length_and_dec() |