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
1ef17f0a
Commit
1ef17f0a
authored
Jan 09, 2004
by
pem@mysql.comhem.se
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix BUG#2269: Lost connect if stored procedure called before USE
(And some minor correction of cursor open)
parent
c40e51f2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
8 deletions
+13
-8
sql/sp_head.cc
sql/sp_head.cc
+6
-4
sql/sp_rcontext.cc
sql/sp_rcontext.cc
+6
-3
sql/sp_rcontext.h
sql/sp_rcontext.h
+1
-1
No files found.
sql/sp_head.cc
View file @
1ef17f0a
...
@@ -286,6 +286,7 @@ sp_head::execute(THD *thd)
...
@@ -286,6 +286,7 @@ sp_head::execute(THD *thd)
if
(
ctx
)
if
(
ctx
)
ctx
->
clear_handler
();
ctx
->
clear_handler
();
thd
->
query_error
=
0
;
do
do
{
{
sp_instr
*
i
;
sp_instr
*
i
;
...
@@ -318,10 +319,11 @@ sp_head::execute(THD *thd)
...
@@ -318,10 +319,11 @@ sp_head::execute(THD *thd)
continue
;
continue
;
}
}
}
}
}
while
(
ret
==
0
&&
!
thd
->
killed
);
}
while
(
ret
==
0
&&
!
thd
->
killed
&&
!
thd
->
query_error
);
DBUG_PRINT
(
"info"
,
(
"ret=%d killed=%d"
,
ret
,
thd
->
killed
));
DBUG_PRINT
(
"info"
,
(
"ret=%d killed=%d query_error=%d"
,
if
(
thd
->
killed
)
ret
,
thd
->
killed
,
thd
->
query_error
));
if
(
thd
->
killed
||
thd
->
query_error
)
ret
=
-
1
;
ret
=
-
1
;
/* If the DB has changed, the pointer has changed too, but the
/* If the DB has changed, the pointer has changed too, but the
original thd->db will then have been freed */
original thd->db will then have been freed */
...
@@ -1032,7 +1034,7 @@ sp_instr_copen::execute(THD *thd, uint *nextp)
...
@@ -1032,7 +1034,7 @@ sp_instr_copen::execute(THD *thd, uint *nextp)
res
=
-
1
;
res
=
-
1
;
else
else
res
=
exec_stmt
(
thd
,
lex
);
res
=
exec_stmt
(
thd
,
lex
);
c
->
post_open
(
thd
,
(
res
==
0
?
TRUE
:
FALSE
));
c
->
post_open
(
thd
,
(
lex
?
TRUE
:
FALSE
));
}
}
*
nextp
=
m_ip
+
1
;
*
nextp
=
m_ip
+
1
;
...
...
sql/sp_rcontext.cc
View file @
1ef17f0a
...
@@ -153,12 +153,15 @@ sp_cursor::pre_open(THD *thd)
...
@@ -153,12 +153,15 @@ sp_cursor::pre_open(THD *thd)
}
}
void
void
sp_cursor
::
post_open
(
THD
*
thd
,
my_bool
isopen
)
sp_cursor
::
post_open
(
THD
*
thd
,
my_bool
was_opened
)
{
{
thd
->
net
.
no_send_eof
=
m_nseof
;
// Restore the originals
thd
->
net
.
no_send_eof
=
m_nseof
;
// Restore the originals
thd
->
protocol
=
m_oprot
;
thd
->
protocol
=
m_oprot
;
m_isopen
=
isopen
;
if
(
was_opened
)
m_current_row
=
m_prot
->
data
;
{
m_isopen
=
was_opened
;
m_current_row
=
m_prot
->
data
;
}
}
}
int
int
...
...
sql/sp_rcontext.h
View file @
1ef17f0a
...
@@ -220,7 +220,7 @@ public:
...
@@ -220,7 +220,7 @@ public:
LEX
*
LEX
*
pre_open
(
THD
*
thd
);
pre_open
(
THD
*
thd
);
void
void
post_open
(
THD
*
thd
,
my_bool
isopen
);
post_open
(
THD
*
thd
,
my_bool
was_opened
);
int
int
close
(
THD
*
thd
);
close
(
THD
*
thd
);
...
...
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