summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-08-16 22:22:52 +0200
committerSergei Golubchik <serg@mariadb.org>2015-09-04 10:32:03 +0200
commite238d6c51319b6074dfe4a0a605e12ba6bee71f2 (patch)
tree379b6ca3de8cbfd399f7ba6fc04adf6f8cb4220e /sql/item_strfunc.cc
parent4569a895f9b978a94c805ee2f2ae66bfb9a2ee70 (diff)
downloadmariadb-git-e238d6c51319b6074dfe4a0a605e12ba6bee71f2.tar.gz
String::release and String::reset methods
Rename reassociate to reset and create an inverse method release. Method names are chosen to match std::unique_ptr methods.
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r--sql/item_strfunc.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 0be51de16d8..7dfe8605b63 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -4583,8 +4583,7 @@ String *Item_func_dyncol_create::val_str(String *str)
char *ptr;
size_t length, alloc_length;
dynstr_reassociate(&col, &ptr, &length, &alloc_length);
- str_value.reassociate(ptr, (uint32) length, (uint32) alloc_length,
- &my_charset_bin);
+ str_value.reset(ptr, length, alloc_length, &my_charset_bin);
res= &str_value;
null_value= FALSE;
}
@@ -4676,8 +4675,7 @@ String *Item_func_dyncol_json::val_str(String *str)
char *ptr;
size_t length, alloc_length;
dynstr_reassociate(&json, &ptr, &length, &alloc_length);
- str->reassociate(ptr, (uint32) length, (uint32) alloc_length,
- &my_charset_utf8_general_ci);
+ str->reset(ptr, length, alloc_length, &my_charset_utf8_general_ci);
null_value= FALSE;
}
return str;
@@ -4725,8 +4723,7 @@ String *Item_func_dyncol_add::val_str(String *str)
char *ptr;
size_t length, alloc_length;
dynstr_reassociate(&col, &ptr, &length, &alloc_length);
- str->reassociate(ptr, (uint32) length, (uint32) alloc_length,
- &my_charset_bin);
+ str->reset(ptr, length, alloc_length, &my_charset_bin);
null_value= FALSE;
}