Bug #35297 SHOW CREATE EVENT does not show the DEFINER
Submitted: 14 Mar 2008 16:12 Modified: 12 Nov 2009 20:52
Reporter: Paul DuBois Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.1.24/6.0 OS:Any
Assigned to: Alexander Nozdrin CPU Architecture:Any

[14 Mar 2008 16:12] Paul DuBois
Description:
SHOW CREATE EVENT output does not include the DEFINER clause, even if is specified in the CREATE EVENT statement.

How to repeat:
Test script:

DROP EVENT IF EXISTS myevent;
CREATE DEFINER = CURRENT_USER EVENT myevent
ON SCHEDULE EVERY 15 SECOND DO SET @x = 1;
SHOW CREATE EVENT myevent\G
SELECT * FROM mysql.event WHERE name = 'myevent'\G

Result of running script:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 80
Server version: 5.1.24-rc-debug-log 

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

mysql> DROP EVENT IF EXISTS myevent;
Query OK, 0 rows affected (0.01 sec)

mysql> CREATE DEFINER = CURRENT_USER EVENT myevent
    -> ON SCHEDULE EVERY 15 SECOND DO SET @x = 1;
Query OK, 0 rows affected (0.02 sec)

mysql> SHOW CREATE EVENT myevent\G
*************************** 1. row ***************************
               Event: myevent
            sql_mode: 
           time_zone: SYSTEM
        Create Event: CREATE EVENT `myevent` ON SCHEDULE EVERY 15 SECOND STARTS '2008-03-14 11:11:18' ON COMPLETION NOT PRESERVE ENABLE DO SET @x = 1
character_set_client: latin1
collation_connection: latin1_swedish_ci
  Database Collation: latin1_swedish_ci
1 row in set (0.00 sec)

mysql> SELECT * FROM mysql.event WHERE name = 'myevent'\G
*************************** 1. row ***************************
                  db: test
                name: myevent
                body: SET @x = 1
             definer: paul@localhost
          execute_at: NULL
      interval_value: 15
      interval_field: SECOND
             created: 2008-03-14 11:11:18
            modified: 2008-03-14 11:11:18
       last_executed: 2008-03-14 16:11:18
              starts: 2008-03-14 16:11:18
                ends: NULL
              status: ENABLED
       on_completion: DROP
            sql_mode: 
             comment: 
          originator: 1
           time_zone: SYSTEM
character_set_client: latin1
collation_connection: latin1_swedish_ci
        db_collation: latin1_swedish_ci
           body_utf8: SET @x = 1
1 row in set (0.01 sec)

Note that the event table does include the definer, so the information is available.
[14 Mar 2008 17:16] MySQL Verification Team
Thank you for the bug report.
[26 Mar 2009 6:15] 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/commits/70468
[26 Mar 2009 9:08] Alexander Nozdrin
Pushed into 6.0-runtime.
[28 Mar 2009 10:18] 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/commits/70757

2756 Konstantin Osipov	2009-03-28
      Bug#35297 SHOW CREATE EVENT does not show the DEFINER:
      update test result after a merge from now.
      modified:
        mysql-test/suite/backup/r/backup_client.result
        mysql-test/suite/backup/r/backup_objects_dependency.result
[31 Mar 2009 14:22] Bugs System
Pushed into 6.0.11-alpha (revid:davi.arnaut@sun.com-20090331130058-yonsevjt1833wt5o) (version source revid:kostja@sun.com-20090328084255-sz9v2o9kmpfe7g17) (merge vers: 6.0.11-alpha) (pib:6)
[1 Apr 2009 9:43] Sveta Smirnova
Bug #44011 was marked as duplicate of this one.
[3 Apr 2009 2:38] Paul DuBois
Noted in 6.0.11 changelog.

SHOW CREATE EVENT output did not include the DEFINER clause.
[31 Oct 2009 8:20] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091031081410-qkxmjsdzjmj840aq) (version source revid:guilhem@mysql.com-20091010123356-qfouds7ucvkvbczt) (merge vers: 6.0.14-alpha) (pib:13)
[31 Oct 2009 17:44] Paul DuBois
Already fixed in earlier 6.0.x.

Setting report to NDI pending push to 5.5.x.
[12 Nov 2009 8:19] Bugs System
Pushed into 5.5.0-beta (revid:alik@sun.com-20091110093229-0bh5hix780cyeicl) (version source revid:mikael@mysql.com-20091102100915-a2nbfxaqprpgptfw) (merge vers: 5.5.0-beta) (pib:13)
[12 Nov 2009 20:52] Paul DuBois
Noted in 5.5.0 changelog.