summaryrefslogtreecommitdiff
path: root/sql/item_jsonfunc.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-03-15 15:03:26 +0100
committerSergei Golubchik <serg@mariadb.org>2019-03-15 21:00:50 +0100
commitf1134d567695990dc7d62b6c25e4b9aa8de439e0 (patch)
tree10b60521eb410aeb5139b89248d76acf4dff86cc /sql/item_jsonfunc.cc
parent0508d327aef520d3131ff8a85ed610337149fffc (diff)
downloadmariadb-git-f1134d567695990dc7d62b6c25e4b9aa8de439e0.tar.gz
post-merge: gcc 8 warnings
note: Inherit String from Sql_alloc, to get operators new and new[] in sync in rocksdb gcc was complaining that non-lvalue was cast to const.
Diffstat (limited to 'sql/item_jsonfunc.cc')
-rw-r--r--sql/item_jsonfunc.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item_jsonfunc.cc b/sql/item_jsonfunc.cc
index 78eb58506ff..e236010c459 100644
--- a/sql/item_jsonfunc.cc
+++ b/sql/item_jsonfunc.cc
@@ -680,11 +680,11 @@ static int alloc_tmp_paths(THD *thd, uint n_paths,
*paths= (json_path_with_flags *) alloc_root(root,
sizeof(json_path_with_flags) * n_paths);
- *tmp_paths= (String *) alloc_root(root, sizeof(String) * n_paths);
+
+ *tmp_paths= new (root) String[n_paths];
if (*paths == 0 || *tmp_paths == 0)
return 1;
- bzero(*tmp_paths, sizeof(String) * n_paths);
for (uint c_path=0; c_path < n_paths; c_path++)
(*tmp_paths)[c_path].set_charset(&my_charset_utf8_general_ci);
}