summaryrefslogtreecommitdiff
path: root/sql/sql_get_diagnostics.cc
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2014-09-28 20:43:56 -0400
committerNirbhay Choubey <nirbhay@mariadb.com>2014-09-28 20:43:56 -0400
commitc916085e271cd049537b1e07b36cd060c44750bd (patch)
tree337ddfcd033174143cf9bd08e6ba50174459d7ff /sql/sql_get_diagnostics.cc
parent023366e6eb68edca3858c32e7492788e047d927a (diff)
parentf1afc003eefe0aafd3e070c7453d9e029d8445a8 (diff)
downloadmariadb-git-c916085e271cd049537b1e07b36cd060c44750bd.tar.gz
bzr merge -rtag:mariadb-10.0.14 maria/10.0/
Diffstat (limited to 'sql/sql_get_diagnostics.cc')
-rw-r--r--sql/sql_get_diagnostics.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_get_diagnostics.cc b/sql/sql_get_diagnostics.cc
index be1e3589cc6..8b0d86aa7d1 100644
--- a/sql/sql_get_diagnostics.cc
+++ b/sql/sql_get_diagnostics.cc
@@ -267,9 +267,11 @@ Condition_information_item::make_utf8_string_item(THD *thd, const String *str)
CHARSET_INFO *to_cs= &my_charset_utf8_general_ci;
/* If a charset was not set, assume that no conversion is needed. */
CHARSET_INFO *from_cs= str->charset() ? str->charset() : to_cs;
- Item_string *item= new Item_string(str->ptr(), str->length(), from_cs);
+ String tmp(str->ptr(), str->length(), from_cs);
/* If necessary, convert the string (ignoring errors), then copy it over. */
- return item ? item->charset_converter(to_cs, false) : NULL;
+ uint conv_errors;
+ return new Item_string(&tmp, to_cs, &conv_errors,
+ DERIVATION_COERCIBLE, MY_REPERTOIRE_UNICODE30);
}