Bug #77442 Modify(or add) policy --value=QUERIES sample for mysqlauditadmin
Submitted: 23 Jun 2015 1:54 Modified: 30 Jun 2015 23:42
Reporter: Meiji Kimura Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Utilities Severity:S3 (Non-critical)
Version:1.5, 1.5.4 OS:Any
Assigned to: CPU Architecture:Any

[23 Jun 2015 1:54] Meiji Kimura
Description:
http://dev.mysql.com/doc/mysql-utilities/1.5/en/mysqlauditadmin.html

shows sample for policy --value=QUERIES

starting 'To change the audit log policy to log only query events, and show the system variables before and after the execution of the policy command, use the following command: '

But it's result based on MySQL 5.6.19 or before. so Add Note before a sample.

[MySQL 5.6.19 or before]
shell> mysqlauditadmin --show-options --server=root@localhost:3310 policy \
       --value=QUERIES

How to repeat:
See 
http://dev.mysql.com/doc/mysql-utilities/1.5/en/mysqlauditadmin.html

Suggested fix:
(1) Add Note to existed sample, like below.

[MySQL 5.6.19 or before]
shell> mysqlauditadmin --show-options --server=root@localhost:3310 policy \
       --value=QUERIES

(2) And should add sample on new environment, like below.

[MySQL 5.6.20 or later]
shell> mysqlauditadmin --show-options --server=root@localhost:3310 policy \
       --value=QUERIES

  #
  # Showing options before command.
  #
  # Audit Log Variables and Options
  #
+-----------------------------+--------------+
| Variable_name               | Value        |
+-----------------------------+--------------+
| audit_log_buffer_size       | 1048576      |
| audit_log_connection_policy | ALL          |
| audit_log_current_session   | OFF          |
| audit_log_exclude_accounts  |              |
| audit_log_file              | audit.log    |
| audit_log_flush             | OFF          |
| audit_log_format            | OLD          |
| audit_log_include_accounts  |              |
| audit_log_policy            | ALL          |
| audit_log_rotate_on_size    | 0            |
| audit_log_statement_policy  | ALL          |
| audit_log_strategy          | ASYNCHRONOUS |
+-----------------------------+--------------+
  
  #
  # Executing POLICY command.
  #
  
  #
  # Showing options after command.
  #
  # Audit Log Variables and Options
  #
+-----------------------------+--------------+
| Variable_name               | Value        |
+-----------------------------+--------------+
| audit_log_buffer_size       | 1048576      |
| audit_log_connection_policy | NONE         |<-Changed
| audit_log_current_session   | OFF          |
| audit_log_exclude_accounts  |              |
| audit_log_file              | audit.log    |
| audit_log_flush             | OFF          |
| audit_log_format            | OLD          |
| audit_log_include_accounts  |              |
| audit_log_policy            | ALL          |<-Not changed (READ ONLY)
| audit_log_rotate_on_size    | 0            |
| audit_log_statement_policy  | ALL          |
| audit_log_strategy          | ASYNCHRONOUS |
+-----------------------------+--------------+
[23 Jun 2015 8:27] MySQL Verification Team
Hello Meiji-San,

Thank you for the report.

Thanks,
Umesh
[30 Jun 2015 23:42] Philip Olson
These and related changes are now visible online, and a note was added that
the output might differ depending on the Audit Log version. Thank you for the
bug report.