diff options
author | unknown <tsmith/tim@siva.hindu.god> | 2006-10-16 20:15:14 -0600 |
---|---|---|
committer | unknown <tsmith/tim@siva.hindu.god> | 2006-10-16 20:15:14 -0600 |
commit | 1e8c450dea260fb3827f0d79a214c969b4abd571 (patch) | |
tree | 3f89b2096b71b6cfb47a48455bc0cdfe62f65634 /sql | |
parent | 4771fc36bca491b0e403a6f3ffe53e8973577bd8 (diff) | |
parent | 99d42667d68a6ad5c52c6a24029477687b44f45d (diff) | |
download | mariadb-git-1e8c450dea260fb3827f0d79a214c969b4abd571.tar.gz |
Merge siva.hindu.god:/usr/home/tim/m/bk/b19764/50
into siva.hindu.god:/usr/home/tim/m/bk/tmp/mrgOct16/50
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
mysql-test/r/ps.result:
Manual merge
mysql-test/t/ps.test:
Manual merge
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_parse.cc | 6 | ||||
-rw-r--r-- | sql/sql_prepare.cc | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index febe256807a..0e0436af8d5 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2159,9 +2159,11 @@ void log_slow_statement(THD *thd) if ((ulong) (thd->start_time - thd->time_after_lock) > thd->variables.long_query_time || - ((thd->server_status & + (thd->server_status & (SERVER_QUERY_NO_INDEX_USED | SERVER_QUERY_NO_GOOD_INDEX_USED)) && - (specialflag & SPECIAL_LOG_QUERIES_NOT_USING_INDEXES))) + (specialflag & SPECIAL_LOG_QUERIES_NOT_USING_INDEXES) && + /* == SQLCOM_END unless this is a SHOW command */ + thd->lex->orig_sql_command == SQLCOM_END) { thd->status_var.long_query_count++; mysql_slow_log.write(thd, thd->query, thd->query_length, start_of_query); diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 9e321411863..5a2e2f7d419 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2930,6 +2930,12 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor) stmt_backup.query_length= thd->query_length; /* + Save orig_sql_command as we use it to disable slow logging for SHOW + commands (see log_slow_statement()). + */ + stmt_backup.lex->orig_sql_command= thd->lex->orig_sql_command; + + /* At first execution of prepared statement we may perform logical transformations of the query tree. Such changes should be performed on the parse tree of current prepared statement and new items should |