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
01457ec2
Commit
01457ec2
authored
Mar 23, 2017
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-12347 Valgrind reports invalid read errors in Item_field_row::element_index_by_name
parent
ec19e480
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
sql/sp_rcontext.cc
sql/sp_rcontext.cc
+9
-2
No files found.
sql/sp_rcontext.cc
View file @
01457ec2
...
...
@@ -222,11 +222,18 @@ bool sp_rcontext::resolve_table_rowtype_ref(THD *thd,
{
for
(
Field
**
src
=
lex
.
query_tables
->
table
->
field
;
*
src
;
src
++
)
{
/*
Make field names on the THD memory root,
as the table will be closed and freed soon,
in the end of this method.
*/
LEX_CSTRING
tmp
=
{
src
[
0
]
->
field_name
,
strlen
(
src
[
0
]
->
field_name
)};
if
((
rc
=
check_column_grant_for_type_ref
(
thd
,
table_list
,
src
[
0
]
->
field_name
,
strlen
(
src
[
0
]
->
field_name
))))
tmp
.
str
,
tmp
.
length
))
||
(
rc
=
!
(
src
[
0
]
->
field_name
=
thd
->
strmake
(
tmp
.
str
,
tmp
.
length
))))
break
;
Spvar_definition
*
def
=
new
(
thd
->
mem_root
)
Spvar_definition
(
thd
,
*
src
);
src
[
0
]
->
field_name
=
tmp
.
str
;
// Restore field name, just in case.
def
->
flags
&=
(
uint
)
~
NOT_NULL_FLAG
;
if
((
rc
=
def
->
sp_prepare_create_field
(
thd
,
thd
->
mem_root
)))
break
;
...
...
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