Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
a237a920
Commit
a237a920
authored
Sep 13, 2017
by
Alexey Botchkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-12877 Wrong result from JSON native function.
Set default charset for temporary paths so UDF call don't crash.
parent
80a38372
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
sql/item_jsonfunc.cc
sql/item_jsonfunc.cc
+3
-0
No files found.
sql/item_jsonfunc.cc
View file @
a237a920
...
@@ -650,6 +650,7 @@ static int alloc_tmp_paths(THD *thd, uint n_paths,
...
@@ -650,6 +650,7 @@ static int alloc_tmp_paths(THD *thd, uint n_paths,
if
(
*
tmp_paths
==
0
)
if
(
*
tmp_paths
==
0
)
{
{
MEM_ROOT
*
root
=
thd
->
stmt_arena
->
mem_root
;
MEM_ROOT
*
root
=
thd
->
stmt_arena
->
mem_root
;
*
paths
=
(
json_path_with_flags
*
)
alloc_root
(
root
,
*
paths
=
(
json_path_with_flags
*
)
alloc_root
(
root
,
sizeof
(
json_path_with_flags
)
*
n_paths
);
sizeof
(
json_path_with_flags
)
*
n_paths
);
*
tmp_paths
=
(
String
*
)
alloc_root
(
root
,
sizeof
(
String
)
*
n_paths
);
*
tmp_paths
=
(
String
*
)
alloc_root
(
root
,
sizeof
(
String
)
*
n_paths
);
...
@@ -657,6 +658,8 @@ static int alloc_tmp_paths(THD *thd, uint n_paths,
...
@@ -657,6 +658,8 @@ static int alloc_tmp_paths(THD *thd, uint n_paths,
return
1
;
return
1
;
bzero
(
*
tmp_paths
,
sizeof
(
String
)
*
n_paths
);
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
);
}
}
return
0
;
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment