Bug #11555 Stored procedures: current SP tables locking make impossible view security
Submitted: 24 Jun 2005 20:54 Modified: 8 Dec 2005 23:26
Reporter: Oleksandr Byelkin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0 OS:
Assigned to: Dmitry Lenev CPU Architecture:Any

[24 Jun 2005 20:54] Oleksandr Byelkin
Description:
current SP opening & locking makes impossible mark tables as belonged to view, so mechanisms which hide underlying tables of view in error messages do not works

+ CREATE TABLE t1 (col1 time);
+ CREATE TABLE t3 (col1 time);
+ create function f1 () returns int return (select max(col1) from t1);
+ CREATE VIEW v1 AS SELECT f1() FROM t3;
+ DROP TABLE t1;
+ CHECK TABLE v1;
+ Table Op      Msg_type        Msg_text
+ test.v1       check   error   Table 'test.t1' doesn't exist

How to repeat:
CREATE TABLE t1 (col1 time);
CREATE TABLE t3 (col1 time);
create function f1 () returns int return (select max(col1) from t1);
CREATE VIEW v1 AS SELECT f1() FROM t3;
DROP TABLE t1;
CHECK TABLE v1;
drop view v1;
drop function f1;
drop table t3;
[26 Nov 2005 11:30] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/32735
[30 Nov 2005 8:48] Oleksandr Byelkin
OK to push after changes mentioned in the mail.
[7 Dec 2005 9:26] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/33116
[7 Dec 2005 13:54] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/33134
[7 Dec 2005 17:36] Dmitry Lenev
Fixed in 5.0.17
[8 Dec 2005 23:26] Paul Dubois
Noted in 5.0.17 changelog.