Comment 1 for bug 1388407

Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :

Able to reproduce with 5.6.21

nilnandan@Dell-XPS:~$ mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 37
Server version: 5.6.21-70.0 Percona Server (GPL), Release 70.0, Revision 688

Copyright (c) 2009-2014 Percona LLC and/or its affiliates
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
mysql> set global general_log = 1, log_output = 'TABLE';
Query OK, 0 rows affected (0.01 sec)

mysql> select @@sql_log_off;
+---------------+
| @@sql_log_off |
+---------------+
| 0 |
+---------------+
1 row in set (0.01 sec)

mysql>
mysql> truncate table mysql.general_log;
Query OK, 0 rows affected (0.03 sec)

mysql>
mysql> select 1;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.01 sec)

mysql> set statement SQL_LOG_OFF = 1 for select 2;
+---+
| 2 |
+---+
| 2 |
+---+
1 row in set (0.00 sec)

mysql> set SQL_LOG_OFF = 1;
Query OK, 0 rows affected (0.00 sec)

mysql> select 3;
+---+
| 3 |
+---+
| 3 |
+---+
1 row in set (0.00 sec)

mysql> select * from mysql.general_log;
+---------------------+---------------------------+-----------+-----------+--------------+--------------------------------------------+
| event_time | user_host | thread_id | server_id | command_type | argument |
+---------------------+---------------------------+-----------+-----------+--------------+--------------------------------------------+
| 2014-11-12 10:53:39 | root[root] @ localhost [] | 37 | 0 | Query | select 1 |
| 2014-11-12 10:53:45 | root[root] @ localhost [] | 37 | 0 | Query | set statement SQL_LOG_OFF = 1 for select 2 |
| 2014-11-12 10:53:50 | root[root] @ localhost [] | 37 | 0 | Query | set SQL_LOG_OFF = 1 |
+---------------------+---------------------------+-----------+-----------+--------------+--------------------------------------------+
3 rows in set (0.00 sec)

mysql>