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
b5098f3d
Commit
b5098f3d
authored
Aug 15, 2017
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-13533 Remove the THD parameter from sp_head::init_sp_name()
parent
3f7f0c6a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
sql/sp_head.cc
sql/sp_head.cc
+3
-3
sql/sp_head.h
sql/sp_head.h
+1
-1
sql/sql_class.h
sql/sql_class.h
+2
-2
sql/sql_lex.cc
sql/sql_lex.cc
+1
-1
No files found.
sql/sp_head.cc
View file @
b5098f3d
...
@@ -610,7 +610,7 @@ sp_head::init(LEX *lex)
...
@@ -610,7 +610,7 @@ sp_head::init(LEX *lex)
void
void
sp_head
::
init_sp_name
(
THD
*
thd
,
const
sp_name
*
spname
)
sp_head
::
init_sp_name
(
const
sp_name
*
spname
)
{
{
DBUG_ENTER
(
"sp_head::init_sp_name"
);
DBUG_ENTER
(
"sp_head::init_sp_name"
);
...
@@ -619,10 +619,10 @@ sp_head::init_sp_name(THD *thd, const sp_name *spname)
...
@@ -619,10 +619,10 @@ sp_head::init_sp_name(THD *thd, const sp_name *spname)
DBUG_ASSERT
(
spname
&&
spname
->
m_db
.
str
&&
spname
->
m_db
.
length
);
DBUG_ASSERT
(
spname
&&
spname
->
m_db
.
str
&&
spname
->
m_db
.
length
);
/* We have to copy strings to get them into the right memroot. */
/* We have to copy strings to get them into the right memroot. */
Database_qualified_name
::
copy
(
mem_root
,
spname
->
m_db
,
spname
->
m_name
);
Database_qualified_name
::
copy
(
&
main_
mem_root
,
spname
->
m_db
,
spname
->
m_name
);
m_explicit_name
=
spname
->
m_explicit_name
;
m_explicit_name
=
spname
->
m_explicit_name
;
spname
->
make_qname
(
thd
,
&
m_qname
);
spname
->
make_qname
(
&
main_mem_root
,
&
m_qname
);
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
...
...
sql/sp_head.h
View file @
b5098f3d
...
@@ -320,7 +320,7 @@ class sp_head :private Query_arena,
...
@@ -320,7 +320,7 @@ class sp_head :private Query_arena,
/** Copy sp name from parser. */
/** Copy sp name from parser. */
void
void
init_sp_name
(
THD
*
thd
,
const
sp_name
*
spname
);
init_sp_name
(
const
sp_name
*
spname
);
/** Set the body-definition start position. */
/** Set the body-definition start position. */
void
void
...
...
sql/sql_class.h
View file @
b5098f3d
...
@@ -5984,13 +5984,13 @@ class Database_qualified_name
...
@@ -5984,13 +5984,13 @@ class Database_qualified_name
(
int
)
m_name
.
length
,
m_name
.
str
);
(
int
)
m_name
.
length
,
m_name
.
str
);
}
}
// Export db and name as a qualified name string, allocate on mem_root.
// Export db and name as a qualified name string, allocate on mem_root.
bool
make_qname
(
THD
*
thd
,
LEX_CSTRING
*
dst
)
const
bool
make_qname
(
MEM_ROOT
*
mem_root
,
LEX_CSTRING
*
dst
)
const
{
{
const
uint
dot
=
!!
m_db
.
length
;
const
uint
dot
=
!!
m_db
.
length
;
char
*
tmp
;
char
*
tmp
;
/* format: [database + dot] + name + '\0' */
/* format: [database + dot] + name + '\0' */
dst
->
length
=
m_db
.
length
+
dot
+
m_name
.
length
;
dst
->
length
=
m_db
.
length
+
dot
+
m_name
.
length
;
if
(
!
(
dst
->
str
=
tmp
=
(
char
*
)
thd
->
alloc
(
dst
->
length
+
1
)))
if
(
!
(
dst
->
str
=
tmp
=
(
char
*
)
alloc_root
(
mem_root
,
dst
->
length
+
1
)))
return
true
;
return
true
;
sprintf
(
tmp
,
"%.*s%.*s%.*s"
,
sprintf
(
tmp
,
"%.*s%.*s%.*s"
,
(
int
)
m_db
.
length
,
(
m_db
.
length
?
m_db
.
str
:
""
),
(
int
)
m_db
.
length
,
(
m_db
.
length
?
m_db
.
str
:
""
),
...
...
sql/sql_lex.cc
View file @
b5098f3d
...
@@ -5845,7 +5845,7 @@ sp_head *LEX::make_sp_head(THD *thd, const sp_name *name,
...
@@ -5845,7 +5845,7 @@ sp_head *LEX::make_sp_head(THD *thd, const sp_name *name,
sp
->
reset_thd_mem_root
(
thd
);
sp
->
reset_thd_mem_root
(
thd
);
sp
->
init
(
this
);
sp
->
init
(
this
);
if
(
name
)
if
(
name
)
sp
->
init_sp_name
(
thd
,
name
);
sp
->
init_sp_name
(
name
);
sphead
=
sp
;
sphead
=
sp
;
}
}
sp_chistics
.
init
();
sp_chistics
.
init
();
...
...
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