Bug #10362 SHOW PROCEDURE always qualifies name with database
Submitted: 4 May 2005 16:22 Modified: 1 Sep 2005 2:10
Reporter: Anders Karlsson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.4 OS:Microsoft Windows (Windows)
Assigned to: Andrey Hristov

[4 May 2005 16:22] Anders Karlsson
Description:
SHOW PROCEDURE command always qualifies name of procedure with the name of the database the procedure belongs to, in difference to SHOW TABLE which does not do this. This is inconsistent behaviour.

How to repeat:
C:\>mysql mybug
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 23 to server version: 5.0.4-beta-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create procedure p1() begin end;
Query OK, 0 rows affected (0.00 sec)

mysql> create table t1(c1 int);
Query OK, 0 rows affected (0.14 sec)

mysql> show create procedure p1\G
*************************** 1. row ***************************
       Procedure: p1
        sql_mode:
Create Procedure: CREATE PROCEDURE `mybug`.`p1`()
begin end
1 row in set (0.01 sec)

mysql> show create table t1\G
*************************** 1. row ***************************
       Table: t1
Create Table: CREATE TABLE `t1` (
  `c1` int(11) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1 row in set (0.01 sec)

mysql>
[4 May 2005 16:28] Miguel Solorzano
Forgot to paste the version used:

c:\mysql\bin>mysqladmin -uroot create test1

c:\mysql\bin>mysql -uroot test1
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 5.0.6-beta-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create procedure p1() begin end;
Query OK, 0 rows affected (0.18 sec)

mysql> create table t1(c1 int);
Query OK, 0 rows affected (0.13 sec)

mysql> show create procedure p1\G
*************************** 1. row ***************************
       Procedure: p1
        sql_mode:
Create Procedure: CREATE PROCEDURE `test1`.`p1`()
begin end
1 row in set (0.04 sec)

mysql> show create table t1\G
*************************** 1. row ***************************
       Table: t1
Create Table: CREATE TABLE `t1` (
  `c1` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1 row in set (0.01 sec)
[9 Aug 2005 16:28] 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/28075
[27 Aug 2005 10: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/28928
[1 Sep 2005 2:10] Paul Dubois
Noted in 5.0.13 changelogs.