diff options
author | Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com> | 2015-07-10 07:54:55 +0530 |
---|---|---|
committer | Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com> | 2015-07-10 07:54:55 +0530 |
commit | c773b320ffce5fa51782b26c979bda23dd8dbc03 (patch) | |
tree | 43664139b8bc731b83082285ee1d5738dbf38a8e /sql/item_strfunc.cc | |
parent | 7255ae6ceb20c67d09fd153558d9a14372142f8b (diff) | |
parent | 33a2e5abd86727155b629246445d508bb2cd02c0 (diff) | |
download | mariadb-git-c773b320ffce5fa51782b26c979bda23dd8dbc03.tar.gz |
Merge branch 'mysql-5.1' into mysql-5.5
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index eab8b4ddb00..7496b4f3cf4 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2014, 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 @@ -2652,7 +2652,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 } @@ -2818,7 +2820,9 @@ String *Item_func_rpad::val_str(String *str) if (use_mb(rpad->charset())) { // This will chop off any trailing illegal characters from rpad. - String *well_formed_pad= args[2]->check_well_formed_result(rpad, false); + String *well_formed_pad= args[2]->check_well_formed_result(rpad, + false, //send warning + true); //truncate if (!well_formed_pad) goto err; } @@ -2931,7 +2935,9 @@ String *Item_func_lpad::val_str(String *str) if (use_mb(pad->charset())) { // This will chop off any trailing illegal characters from pad. - String *well_formed_pad= args[2]->check_well_formed_result(pad, false); + String *well_formed_pad= args[2]->check_well_formed_result(pad, + false, // send warning + true); // truncate if (!well_formed_pad) goto err; } @@ -3047,7 +3053,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() |