// 5.6.29 - not affected rm -rf 80467 scripts/mysql_install_db --basedir=/export/umesh/server/binaries/mysql-5.6.29 --datadir=/export/umesh/server/binaries/mysql-5.6.29/80467 bin/mysqld --slow_query_log --general-log --log-queries-not-using-indexes --log_output=TABLE --basedir=/export/umesh/server/binaries/mysql-5.6.29 --datadir=/export/umesh/server/binaries/mysql-5.6.29/80467 --core-file --socket=/tmp/mysql_ushastry.sock --port=3306 --log-error=/export/umesh/server/binaries/mysql-5.6.29/80467/log.err 2>&1 & UPDATE performance_schema.setup_consumers SET ENABLED = 'YES' WHERE NAME LIKE '%statements_history'; -- [umshastr@hod03]/export/umesh/server/binaries/mysql-5.6.29: bin/mysql -uroot -S /tmp/mysql_ushastry.sock test Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.6.29-log MySQL Community Server (GPL) Copyright (c) 2000, 2016, 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> select @@slow_query_log,@@general_log,@@log_queries_not_using_indexes,@@log_output,@@slow_launch_time; +------------------+---------------+---------------------------------+--------------+--------------------+ | @@slow_query_log | @@general_log | @@log_queries_not_using_indexes | @@log_output | @@slow_launch_time | +------------------+---------------+---------------------------------+--------------+--------------------+ | 1 | 1 | 1 | TABLE | 0 | +------------------+---------------+---------------------------------+--------------+--------------------+ 1 row in set (0.00 sec) mysql> CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; Query OK, 0 rows affected (0.01 sec) mysql> load data local infile '/export/umesh/server/binaries/mysql-5.6.29/1.txt' into table t1 fields terminated by ','; Query OK, 101 rows affected (0.00 sec) Records: 101 Deleted: 0 Skipped: 0 Warnings: 0 mysql> UPDATE performance_schema.setup_consumers SET ENABLED = 'YES' WHERE NAME LIKE '%statements_history'; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> SELECT 1 = 1 from test.t1; +-------+ | 1 = 1 | +-------+ | 1 | . | 1 | +-------+ 101 rows in set (0.00 sec) mysql> select rows_sent,rows_examined,sql_text from mysql.slow_log where sql_text ='SELECT 1 = 1 from test.t1'; +-----------+---------------+---------------------------+ | rows_sent | rows_examined | sql_text | +-----------+---------------+---------------------------+ | 101 | 101 | SELECT 1 = 1 from test.t1 | +-----------+---------------+---------------------------+ 1 row in set (0.00 sec) mysql> EXPLAIN SELECT 1 = 1 from test.t1; +----+-------------+-------+-------+---------------+---------+---------+------+------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+-------+---------------+---------+---------+------+------+-------------+ | 1 | SIMPLE | t1 | index | NULL | PRIMARY | 4 | NULL | 101 | Using index | +----+-------------+-------+-------+---------------+---------+---------+------+------+-------------+ 1 row in set (0.01 sec) mysql> SELECT EVENT_ID,SQL_TEXT,ROWS_SENT,ROWS_EXAMINED,NO_INDEX_USED FROM performance_schema.events_statements_history; +----------+---------------------------------------------------------------------------------------------------------+-----------+---------------+---------------+ | EVENT_ID | SQL_TEXT | ROWS_SENT | ROWS_EXAMINED | NO_INDEX_USED | +----------+---------------------------------------------------------------------------------------------------------+-----------+---------------+---------------+ . | 8 | SELECT 1 = 1 from test.t1 | 101 | 101 | 1 | . +----------+---------------------------------------------------------------------------------------------------------+-----------+---------------+---------------+ 4 rows in set (0.00 sec) mysql> // 5.7.9 - affected rm -rf 80467 bin/mysqld --initialize-insecure --basedir=/export/umesh/server/binaries/mysql-advanced-5.7.9 --datadir=/export/umesh/server/binaries/mysql-advanced-5.7.9/80467 -v bin/mysqld --slow_query_log --general-log --log-queries-not-using-indexes --log_output=TABLE --basedir=/export/umesh/server/binaries/mysql-advanced-5.7.9 --datadir=/export/umesh/server/binaries/mysql-advanced-5.7.9/80467 --core-file --socket=/tmp/mysql_ushastry.sock --port=15000 --log-error=/export/umesh/server/binaries/mysql-advanced-5.7.9/80467/log.err 2>&1 & [umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.9: bin/mysql -uroot -S /tmp/mysql_ushastry.sock test Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.7.9-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial) Copyright (c) 2000, 2015, 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> select @@slow_query_log,@@general_log,@@log_queries_not_using_indexes,@@log_output,@@slow_launch_time; +------------------+---------------+---------------------------------+--------------+--------------------+ | @@slow_query_log | @@general_log | @@log_queries_not_using_indexes | @@log_output | @@slow_launch_time | +------------------+---------------+---------------------------------+--------------+--------------------+ | 1 | 1 | 1 | TABLE | 0 | +------------------+---------------+---------------------------------+--------------+--------------------+ 1 row in set (0.00 sec) mysql> CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; Query OK, 0 rows affected (0.00 sec) mysql> load data local infile '/export/umesh/server/binaries/mysql-5.6.29/1.txt' into table t1 fields terminated by ','; Query OK, 101 rows affected (0.01 sec) Records: 101 Deleted: 0 Skipped: 0 Warnings: 0 mysql> UPDATE performance_schema.setup_consumers SET ENABLED = 'YES' WHERE NAME LIKE '%statements_history'; Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0 mysql> SELECT 1 = 1 from test.t1; +-------+ | 1 = 1 | +-------+ | 1 | . | 1 | +-------+ 101 rows in set (0.00 sec) mysql> select rows_sent,rows_examined,sql_text from mysql.slow_log where sql_text ='SELECT 1 = 1 from test.t1'; Empty set (0.00 sec) mysql> EXPLAIN SELECT 1 = 1 from test.t1; +----+-------------+-------+------------+-------+---------------+---------+---------+------+------+----------+-------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +----+-------------+-------+------------+-------+---------------+---------+---------+------+------+----------+-------------+ | 1 | SIMPLE | t1 | NULL | index | NULL | PRIMARY | 4 | NULL | 101 | 100.00 | Using index | +----+-------------+-------+------------+-------+---------------+---------+---------+------+------+----------+-------------+ 1 row in set, 1 warning (0.00 sec) mysql> SELECT EVENT_ID,SQL_TEXT,ROWS_SENT,ROWS_EXAMINED,NO_INDEX_USED FROM performance_schema.events_statements_history; +----------+------------------------------------------------------------------------------------------------------------------+-----------+---------------+---------------+ | EVENT_ID | SQL_TEXT | ROWS_SENT | ROWS_EXAMINED | NO_INDEX_USED | +----------+------------------------------------------------------------------------------------------------------------------+-----------+---------------+---------------+ | 8 | SELECT 1 = 1 from test.t1 | 101 | 101 | 0 | +----------+------------------------------------------------------------------------------------------------------------------+-----------+---------------+---------------+ 10 rows in set (0.00 sec) mysql> // 5.7.11 - affected rm -rf 80467 bin/mysqld --initialize-insecure --basedir=/export/umesh/server/binaries/mysql-5.7.11 --datadir=/export/umesh/server/binaries/mysql-5.7.11/80467 -v bin/mysqld --slow_query_log --general-log --log-queries-not-using-indexes --log_output=TABLE --basedir=/export/umesh/server/binaries/mysql-5.7.11 --datadir=/export/umesh/server/binaries/mysql-5.7.11/80467 --core-file --socket=/tmp/mysql_ushastry.sock --port=15000 --log-error=/export/umesh/server/binaries/mysql-5.7.11/80467/log.err 2>&1 & [umshastr@hod03]/export/umesh/server/binaries/mysql-5.7.11: bin/mysql -uroot -S /tmp/mysql_ushastry.sock test Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.7.11-log MySQL Community Server (GPL) Copyright (c) 2000, 2016, 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> select @@slow_query_log,@@general_log,@@log_queries_not_using_indexes,@@log_output,@@slow_launch_time; +------------------+---------------+---------------------------------+--------------+--------------------+ | @@slow_query_log | @@general_log | @@log_queries_not_using_indexes | @@log_output | @@slow_launch_time | +------------------+---------------+---------------------------------+--------------+--------------------+ | 1 | 1 | 1 | TABLE | 0 | +------------------+---------------+---------------------------------+--------------+--------------------+ 1 row in set (0.00 sec) mysql> CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; Query OK, 0 rows affected (0.00 sec) mysql> load data local infile '/export/umesh/server/binaries/mysql-5.6.29/1.txt' into table t1 fields terminated by ','; Query OK, 101 rows affected (0.00 sec) Records: 101 Deleted: 0 Skipped: 0 Warnings: 0 mysql> UPDATE performance_schema.setup_consumers SET ENABLED = 'YES' WHERE NAME LIKE '%statements_history'; Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0 mysql> SELECT 1 = 1 from test.t1; +-------+ | 1 = 1 | +-------+ | 1 | | 1 | +-------+ 101 rows in set (0.00 sec) mysql> select rows_sent,rows_examined,sql_text from mysql.slow_log where sql_text ='SELECT 1 = 1 from test.t1'; Empty set (0.00 sec) mysql> EXPLAIN SELECT 1 = 1 from test.t1; +----+-------------+-------+------------+-------+---------------+---------+---------+------+------+----------+-------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +----+-------------+-------+------------+-------+---------------+---------+---------+------+------+----------+-------------+ | 1 | SIMPLE | t1 | NULL | index | NULL | PRIMARY | 4 | NULL | 101 | 100.00 | Using index | +----+-------------+-------+------------+-------+---------------+---------+---------+------+------+----------+-------------+ 1 row in set, 1 warning (0.01 sec) mysql> SELECT EVENT_ID,SQL_TEXT,ROWS_SENT,ROWS_EXAMINED,NO_INDEX_USED FROM performance_schema.events_statements_history; +----------+------------------------------------------------------------------------------------------------------------------+-----------+---------------+---------------+ | EVENT_ID | SQL_TEXT | ROWS_SENT | ROWS_EXAMINED | NO_INDEX_USED | +----------+------------------------------------------------------------------------------------------------------------------+-----------+---------------+---------------+ . | 8 | SELECT 1 = 1 from test.t1 | 101 | 101 | 0 | . +----------+------------------------------------------------------------------------------------------------------------------+-----------+---------------+---------------+ 10 rows in set (0.00 sec) mysql>