tags:

views:

24

answers:

1

If I save a statement in a text file and call it at command prompt like this...

mysql -uroot -pPassWord DB_Name < somefile.txt

The statements taking a long time do not appear in the slow query log even though all the statements do appear in the general and binary logs. Is it a bug?

+1  A: 

Is it a bug where?

For all I know, the slow query log could be disabled, or your long-running statements could run in less time, than @@long_query_time or examine less, than @@min_examined_row_limit rows.

EDIT:
Well, here is your answer then. Actually, I was never aware of the fact, that it's possible to log statements such as alter table to the slow query log. It appears, however, that it can be done.
Reference: log-slow-admin-statements.

shylent
I have checked all the 4 points mentioned by you... a) slow query log is enabled b) statement is taking more than 5 minutes c) long_query_time is 2 seconds d) It is an alter statement
shantanuo