summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/item.h b/sql/item.h
index 71d7549f72f..150d9cd215e 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -962,6 +962,10 @@ public:
#endif
} /*lint -e1509 */
void set_name(THD *thd, const char *str, size_t length, CHARSET_INFO *cs);
+ void set_name(THD *thd, String *str)
+ {
+ set_name(thd, str->ptr(), str->length(), str->charset());
+ }
void set_name(THD *thd, const LEX_CSTRING &str,
CHARSET_INFO *cs= system_charset_info)
{
@@ -4377,7 +4381,7 @@ protected:
const Metadata metadata)
{
fix_from_value(dv, metadata);
- set_name(thd, str_value.lex_cstring(), str_value.charset());
+ set_name(thd, &str_value);
}
protected:
/* Just create an item and do not fill string representation */