Bug #10708 SP's can use INFORMATION_SCHEMA as ROUTINE_SCHEMA
Submitted: 18 May 2005 13:36 Modified: 15 Sep 2005 18:35
Reporter: Georg Richter Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.6 OS:Any (all)
Assigned to: Sergei Glukhov CPU Architecture:Any

[18 May 2005 13:36] Georg Richter
Description:
It should not be allowed to use INFORMATION_SCHEMA as ROUTINE_SCHEMA (see how to repeat).

select routine_catalog, routine_schema, routine_name from information_schema.routines where routine_schema='information_schema'  returns:
+-----------------+--------------------+--------------+
| routine_catalog | routine_schema     | routine_name |
+-----------------+--------------------+--------------+
| NULL            | information_schema | p1           |
+-----------------+--------------------+--------------+

How to repeat:
\d |

# this should return an error:
# ERROR 1049 (42000): Unknown database 'information_schema'
CREATE PROCEDURE information_schema.p1 ()
BEGIN
  SELECT 'foo' FROM DUAL;
END |

#but this works
USE information_schema |
CREATE PROCEDURE p1 ()
BEGIN
  SELECT 'foo' FROM DUAL;
END |
[8 Jun 2005 9:49] 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/25747
[29 Jun 2005 11:21] 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/26518
[13 Sep 2005 11:06] 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/29725
[14 Sep 2005 8:32] Sergei Glukhov
Fixed in 5.0.13
[15 Sep 2005 18:35] Paul DuBois
Noted in 5.0.13 changelog.