Bug #5251 mysql changes creation time of a procedure/function when altering
Submitted: 27 Aug 2004 13:17 Modified: 27 Aug 2004 17:00
Reporter: Andrey Hristov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.2 OS:Linux (Linux 2.6.4)
Assigned to: Bugs System CPU Architecture:Any

[27 Aug 2004 13:17] Andrey Hristov
Description:
The creation time of a procedure/function looks like being changed when user ALTERs a p/f. Reproduced with changing the comment as well as name change. Also it looks strange to have modification and creation time set when a p/f is renamed (either the modification time should be NOW() or (the creation time will be NOW() and modtime will be 0000-00-00)
See examples.

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

mysql> show procedure status like 'p_';
+------+------+-----------+----------------+---------------------+---------------------+---------------+---------+
| Db   | Name | Type      | Definer        | Modified            | Created             | Security_type | Comment |
+------+------+-----------+----------------+---------------------+---------------------+---------------+---------+
| test | p1   | PROCEDURE | root@localhost | 0000-00-00 00:00:00 | 2004-08-27 13:15:43 | DEFINER       |         |
+------+------+-----------+----------------+---------------------+---------------------+---------------+---------+
1 row in set (0.01 sec)

mysql> alter procedure p1 comment "foobar";
Query OK, 0 rows affected (0.00 sec)

mysql> show procedure status like 'p_';
+------+------+-----------+----------------+---------------------+---------------------+---------------+---------+
| Db   | Name | Type      | Definer        | Modified            | Created             | Security_type | Comment |
+------+------+-----------+----------------+---------------------+---------------------+---------------+---------+
| test | p1   | PROCEDURE | root@localhost | 2004-08-27 13:15:54 | 2004-08-27 13:15:54 | DEFINER       | foobar  |
+------+------+-----------+----------------+---------------------+---------------------+---------------+---------+
1 row in set (0.00 sec)

mysql> alter procedure p1 name p3;
Query OK, 0 rows affected (0.00 sec)

mysql> show procedure status like 'p_';
+------+------+-----------+----------------+---------------------+---------------------+---------------+---------+
| Db   | Name | Type      | Definer        | Modified            | Created             | Security_type | Comment |
+------+------+-----------+----------------+---------------------+---------------------+---------------+---------+
| test | p3   | PROCEDURE | root@localhost | 2004-08-27 13:16:04 | 2004-08-27 13:16:04 | DEFINER       | foobar  |
+------+------+-----------+----------------+---------------------+---------------------+---------------+---------+
1 row in set (0.00 sec)
[27 Aug 2004 17:00] Per-Erik Martin
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html