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
91eccfc2
Commit
91eccfc2
authored
Apr 07, 2005
by
unknown
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-bg9566
parents
1ef9b972
188b8af6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
4 deletions
+42
-4
mysql-test/r/sp.result
mysql-test/r/sp.result
+10
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+23
-0
sql/sp.cc
sql/sp.cc
+9
-4
No files found.
mysql-test/r/sp.result
View file @
91eccfc2
...
@@ -2779,4 +2779,14 @@ a
...
@@ -2779,4 +2779,14 @@ a
3.2000
3.2000
drop procedure bug8937|
drop procedure bug8937|
delete from t1|
delete from t1|
drop procedure if exists bug9566|
create procedure bug9566()
begin
select * from t1;
end|
lock table t1 read|
call bug9566()|
ERROR HY000: Table 'proc' was not locked with LOCK TABLES
unlock tables|
drop procedure bug9566|
drop table t1,t2;
drop table t1,t2;
mysql-test/t/sp.test
View file @
91eccfc2
...
@@ -3397,6 +3397,29 @@ call bug8937()|
...
@@ -3397,6 +3397,29 @@ call bug8937()|
drop
procedure
bug8937
|
drop
procedure
bug8937
|
delete
from
t1
|
delete
from
t1
|
#
# BUG#9566: explicit LOCK TABLE and store procedures result in illegal state
#
# We should not think that mysql.proc table does not exist if we are unable
# to open it under LOCK TABLE or in prelocked mode. Probably this test
# should be removed when Monty will allow access to mysql.proc without
# locking it.
#
--
disable_warnings
drop
procedure
if
exists
bug9566
|
--
enable_warnings
create
procedure
bug9566
()
begin
select
*
from
t1
;
end
|
lock
table
t1
read
|
# This should fail because we forgot to lock mysql.proc table explicitly
--
error
1100
call
bug9566
()
|
unlock
tables
|
# This should succeed
drop
procedure
bug9566
|
#
#
# BUG#NNNN: New bug synopsis
# BUG#NNNN: New bug synopsis
...
...
sql/sp.cc
View file @
91eccfc2
...
@@ -70,9 +70,8 @@ db_find_routine_aux(THD *thd, int type, sp_name *name,
...
@@ -70,9 +70,8 @@ db_find_routine_aux(THD *thd, int type, sp_name *name,
type
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
type
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
/*
/*
Speed up things if mysql.proc doesn't exists
Speed up things if mysql.proc doesn't exists. mysql_proc_table_exists
mysql_proc_table_exists is set when on creates a stored procedure
is set when we create or read stored procedure or on flush privileges.
or on flush privileges
*/
*/
if
(
!
mysql_proc_table_exists
&&
ltype
==
TL_READ
)
if
(
!
mysql_proc_table_exists
&&
ltype
==
TL_READ
)
DBUG_RETURN
(
SP_OPEN_TABLE_FAILED
);
DBUG_RETURN
(
SP_OPEN_TABLE_FAILED
);
...
@@ -98,6 +97,12 @@ db_find_routine_aux(THD *thd, int type, sp_name *name,
...
@@ -98,6 +97,12 @@ db_find_routine_aux(THD *thd, int type, sp_name *name,
if
(
!
(
table
=
open_ltable
(
thd
,
&
tables
,
ltype
)))
if
(
!
(
table
=
open_ltable
(
thd
,
&
tables
,
ltype
)))
{
{
*
tablep
=
NULL
;
*
tablep
=
NULL
;
/*
Under explicit LOCK TABLES or in prelocked mode we should not
say that mysql.proc table does not exist if we are unable to
open it since this condition may be transient.
*/
if
(
!
(
thd
->
locked_tables
||
thd
->
prelocked_mode
))
mysql_proc_table_exists
=
0
;
mysql_proc_table_exists
=
0
;
DBUG_RETURN
(
SP_OPEN_TABLE_FAILED
);
DBUG_RETURN
(
SP_OPEN_TABLE_FAILED
);
}
}
...
...
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