Bug #21793 Missing CF_CHANGES_DATA and CF_STATUS_COMMAND for handful of commands
Submitted: 23 Aug 2006 12:35 Modified: 6 Mar 2010 19:32
Reporter: Andrey Hristov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.0/5.1 OS:Any
Assigned to: Jon Olav Hauglid CPU Architecture:Any

[23 Aug 2006 12:35] Andrey Hristov
Description:
For the following (maybe more) commands CF_CHANGES_DATA is not counted -> thus number of queries per hour too.

SQLCOM_CREATE_USER
SQLCOM_RENAME_USER
SQLCOM_DROP_USER
SQLCOM_GRANT
SQLCOM_REVOKE
SQLCOM_ALTER_DB
SQLCOM_RENAME_DB
SQLCOM_CREATE_FUNCTION
SQLCOM_DROP_FUNCTION
SQLCOM_OPTIMIZE
SQLCOM_CREATE_PROCEDURE
SQLCOM_CREATE_SPFUNCTION
SQLCOM_DROP_PROCEDURE
SQLCOM_ALTER_PROCEDURE
SQLCOM_ALTER_FUNCTION
SQLCOM_CREATE_TRIGGER
SQLCOM_DROP_TRIGGER
SQLCOM_INSTALL_PLUGIN
SQLCOM_UNINSTALL_PLUGIN
SQLCOM_LOAD_MASTER_DATA
SQLCOM_LOAD_MASTER_TABLE

Missing CF_STATUS_COMMAND:
SQLCOM_SHOW_ENGINE_LOGS
SQLCOM_SHOW_ENGINE_STATUS
SQLCOM_SHOW_ENGINE_MUTEX
SQLCOM_SHOW_PROCESSLIST
SQLCOM_SHOW_MASTER_STAT
SQLCOM_SHOW_SLAVE_STAT
SQLCOM_SHOW_BINLOGS
SQLCOM_SHOW_SLAVE_HOSTS
SQLCOM_SHOW_BINLOG_EVENTS
SQLCOM_SHOW_NEW_MASTER
SQLCOM_SHOW_COLUMN_TYPES
SQLCOM_SHOW_STORAGE_ENGINES
SQLCOM_SHOW_PRIVILEGES
SQLCOM_SHOW_CREATE_PROC
SQLCOM_SHOW_CREATE_FUNC
SQLCOM_SHOW_PROC_CODE
SQLCOM_SHOW_FUNC_CODE
SQLCOM_SHOW_AUTHORS
SQLCOM_BINLOG_BASE64_EVENT
SQLCOM_SHOW_PLUGINS
SQLCOM_SHOW_CONTRIBUTORS

Also SQLCOM_SHOW_STATUS_PROC is listed two times.

How to repeat:
Check sql_parse.cc, function init_update_queries()
[23 Aug 2006 16:23] MySQL Verification Team
Thank you for the bug report.
[14 May 2009 12:41] Jon Olav Hauglid
The following commands do no longer exist:
SQLCOM_RENAME_DB
SQLCOM_LOAD_MASTER_DATA
SQLCOM_LOAD_MASTER_TABLE
SQLCOM_SHOW_COLUMN_TYPES

CF_STATUS_COMMAND is already added the current version of mysql-6.0-runtime to the following commands:
SQLCOM_SHOW_ENGINE_LOGS
SQLCOM_SHOW_ENGINE_STATUS
SQLCOM_SHOW_ENGINE_MUTEX
SQLCOM_SHOW_PROCESSLIST
SQLCOM_SHOW_MASTER_STAT
SQLCOM_SHOW_SLAVE_STAT
SQLCOM_SHOW_BINLOGS
SQLCOM_SHOW_SLAVE_HOSTS
SQLCOM_SHOW_BINLOG_EVENTS
SQLCOM_SHOW_NEW_MASTER
SQLCOM_SHOW_STORAGE_ENGINES
SQLCOM_SHOW_PRIVILEGES
SQLCOM_SHOW_CREATE_PROC
SQLCOM_SHOW_CREATE_FUNC
SQLCOM_SHOW_PROC_CODE
SQLCOM_SHOW_FUNC_CODE
SQLCOM_SHOW_AUTHORS
SQLCOM_SHOW_PLUGINS
SQLCOM_SHOW_CONTRIBUTORS

Finally, SQLCOM_SHOW_STATUS_PROC is now only listed once.
[14 May 2009 13:08] 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/74048

2775 Jon Olav Hauglid	2009-05-14
      Bug #21793 Missing CF_CHANGES_DATA and CF_STATUS_COMMAND for 
      handful of commands
            
      CF_CHANGES_DATA and CF_STATUS_COMMAND flags added to the 
      commands mentioned in the bug description. With the following
      two exceptions: 
      
      1) 4 commands do not exist: 
      SQLCOM_RENAME_DB
      SQLCOM_LOAD_MASTER_DATA
      SQLCOM_LOAD_MASTER_TABLE
      SQLCOM_SHOW_COLUMN_TYPES
      
      2) All SQLCOM_SHOW_* commands already had CF_STATUS_COMMAND,
      leaving only SQLCOM_BINLOG_BASE64_EVENT.
      
      Further, check_prepared_statement() in sql_prepare.cc has been
      simplified by taking advantage of the CF_STATUS_COMMAND flag.
      
      Note that no test case has been added.
[14 May 2009 14:27] 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/74073

2775 Jon Olav Hauglid	2009-05-14
      Bug #21793 Missing CF_CHANGES_DATA and CF_STATUS_COMMAND for 
      handful of commands
            
      CF_CHANGES_DATA and CF_STATUS_COMMAND flags added to the 
      commands mentioned in the bug description. With the following
      two exceptions: 
      
      1) 4 commands do not exist: 
      SQLCOM_RENAME_DB
      SQLCOM_LOAD_MASTER_DATA
      SQLCOM_LOAD_MASTER_TABLE
      SQLCOM_SHOW_COLUMN_TYPES
      
      2) All SQLCOM_SHOW_* commands already had CF_STATUS_COMMAND,
      leaving only SQLCOM_BINLOG_BASE64_EVENT.
      
      Further, check_prepared_statement() in sql_prepare.cc has been
      simplified by taking advantage of the CF_STATUS_COMMAND flag.
      
      Note that no test case has been added.
[17 May 2009 17:43] Bugs System
Pushed into 6.0.12-alpha (revid:alik@sun.com-20090516083658-bo81fcfqxpqoocvb) (version source revid:jon.hauglid@sun.com-20090514142703-kz7exactvbzhvmub) (merge vers: 6.0.12-alpha) (pib:6)
[21 May 2009 2:16] Paul Dubois
Noted in 6.0.12 changelog.

Several data-modification statements were not being counted toward
the MAX_UPDATES_PER_HOUR user resource limit.
[9 Dec 2009 13:24] Jon Olav Hauglid
Pushed to mysql-next-4284 (5.6.0-beta).
[16 Feb 2010 16:46] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100216101445-2ofzkh48aq2e0e8o) (version source revid:kostja@sun.com-20091211154405-c9yhiewr9o5d20rq) (merge vers: 6.0.14-alpha) (pib:16)
[16 Feb 2010 16:55] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100216101208-33qkfwdr0tep3pf2) (version source revid:kostja@sun.com-20091210084103-l4f8u62u4evoy3dc) (pib:16)
[17 Feb 2010 0:19] Paul Dubois
Setting report to Need Merge pending push of Celosia into release tree.
[6 Mar 2010 11:07] Bugs System
Pushed into 5.5.3-m3 (revid:alik@sun.com-20100306103849-hha31z2enhh7jwt3) (version source revid:vvaintroub@mysql.com-20100216221947-luyhph0txl2c5tc8) (merge vers: 5.5.99-m3) (pib:16)
[6 Mar 2010 19:32] Paul Dubois
Noted in 5.5.3 changelog.