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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
48d92d15
Commit
48d92d15
authored
Mar 05, 2005
by
dlenev@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/dlenev/src/mysql-5.0-sp
parents
df2b3891
e6a506c3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
12 deletions
+14
-12
sql/sp.cc
sql/sp.cc
+0
-2
sql/sp_head.cc
sql/sp_head.cc
+13
-2
sql/sql_parse.cc
sql/sql_parse.cc
+0
-4
sql/sql_prepare.cc
sql/sql_prepare.cc
+0
-2
sql/sql_trigger.cc
sql/sql_trigger.cc
+1
-2
No files found.
sql/sp.cc
View file @
48d92d15
...
...
@@ -307,8 +307,6 @@ db_find_routine(THD *thd, int type, sp_name *name, sp_head **sphp)
goto
done
;
if
(
sp
)
{
if
(
oldlex
!=
newlex
)
sp
->
restore_lex
(
thd
);
delete
sp
;
newlex
->
sphead
=
NULL
;
}
...
...
sql/sp_head.cc
View file @
48d92d15
...
...
@@ -459,11 +459,22 @@ sp_head::destroy()
delete_dynamic
(
&
m_instr
);
m_pcont
->
destroy
();
free_items
(
free_list
);
/*
If we have non-empty LEX stack then we just came out of parser with
error. Now we should delete all auxilary LEXes and restore original
THD::lex (In this case sp_head::restore_thd_mem_root() was not called
too, so m_thd points to the current thread context).
It is safe to not update LEX::ptr because further query string parsing
and execution will be stopped anyway.
*/
DBUG_ASSERT
(
m_lex
.
is_empty
()
||
m_thd
);
while
((
lex
=
(
LEX
*
)
m_lex
.
pop
()))
{
if
(
lex
!=
&
m_thd
->
main_lex
)
// We got interrupted and have lex'es left
delete
lex
;
delete
m_thd
->
lex
;
m_thd
->
lex
=
lex
;
}
hash_free
(
&
m_sptabs
);
hash_free
(
&
m_spfuns
);
hash_free
(
&
m_spprocs
);
...
...
sql/sql_parse.cc
View file @
48d92d15
...
...
@@ -5115,8 +5115,6 @@ void mysql_parse(THD *thd, char *inBuf, uint length)
{
if
(
thd
->
lex
->
sphead
)
{
if
(
lex
!=
thd
->
lex
)
thd
->
lex
->
sphead
->
restore_lex
(
thd
);
delete
thd
->
lex
->
sphead
;
thd
->
lex
->
sphead
=
NULL
;
}
...
...
@@ -5152,8 +5150,6 @@ void mysql_parse(THD *thd, char *inBuf, uint length)
if
(
thd
->
lex
->
sphead
)
{
/* Clean up after failed stored procedure/function */
if
(
lex
!=
thd
->
lex
)
thd
->
lex
->
sphead
->
restore_lex
(
thd
);
delete
thd
->
lex
->
sphead
;
thd
->
lex
->
sphead
=
NULL
;
}
...
...
sql/sql_prepare.cc
View file @
48d92d15
...
...
@@ -1771,8 +1771,6 @@ bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length,
my_pthread_setprio
(
pthread_self
(),
WAIT_PRIOR
);
if
(
error
&&
thd
->
lex
->
sphead
)
{
if
(
lex
!=
thd
->
lex
)
thd
->
lex
->
sphead
->
restore_lex
(
thd
);
delete
thd
->
lex
->
sphead
;
thd
->
lex
->
sphead
=
NULL
;
}
...
...
sql/sql_trigger.cc
View file @
48d92d15
...
...
@@ -415,9 +415,8 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
*/
if
(
lex
.
sphead
)
{
if
(
&
lex
!=
thd
->
lex
)
thd
->
lex
->
sphead
->
restore_lex
(
thd
);
delete
lex
.
sphead
;
lex
.
sphead
=
0
;
}
goto
err_with_lex_cleanup
;
}
...
...
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