Do not consider SHOW commands slow queries, just because they don't use proper indexes.
This bug fix is not needed in 5.1, and the code changes will be null merged. However, the test cases will be propogated up to 5.1.
mysql-test/t/show_check-master.opt:
Rename: BitKeeper/deleted/.del-show_check-master.opt -> mysql-test/t/show_check-master.opt
mysql-test/r/ps.result:
Add test case for bug 19764
mysql-test/r/show_check.result:
Add test case for bug 19764
mysql-test/r/union.result:
Adjust test case results based on bug #19764 changes
mysql-test/t/ps.test:
Add test case for bug 19764
mysql-test/t/show_check.test:
Add test case for bug 19764
sql/sql_parse.cc:
Do not log SHOW commands as slow queries just because they don't use indexes.
sql/sql_prepare.cc:
Save stmt_backup.lex->orig_sql_command for use in log_slow_statement()
mysql-test/t/ps-master.opt:
Add log-slow-queries and --log-queries-not-using indexes, to test bug #19764
Set a flag when a SHOW command is parsed, and check it in log_slow_statement(). SHOW commands are not counted as slow queries, even if they use table scans.
mysql-test/t/show_check-master.opt:
BitKeeper file /usr/home/tim/m/bk/b19764/50/mysql-test/t/show_check-master.opt
mysql-test/r/show_check.result:
Add test for bug #19764
mysql-test/t/show_check.test:
Add test for bug #19764
sql/sql_lex.cc:
Set lex->is_show_command= FALSE in lex_start
sql/sql_lex.h:
Add LEX->is_slow_command flag to prevent SHOW commands from being written to the slow queries log
sql/sql_parse.cc:
Don't log slow statement if it is a SHOW command
sql/sql_yacc.yy:
Set lex->is_show_command for all SHOW commands