diff options
-rw-r--r-- | Docs/manual.texi | 2 | ||||
-rw-r--r-- | sql/log.cc | 2 | ||||
-rw-r--r-- | sql/sql_select.cc | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi index 7c103f06a3b..a6e1f737750 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -46843,6 +46843,8 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.44 @itemize @bullet @item +Fixed @code{Rows_examined} count in slow query log. +@item Fixed bug when using a reference to a @code{AVG()} column in @code{HAVING}. @item Fixed that date functions that require correct dates, like diff --git a/sql/log.cc b/sql/log.cc index 0417f7eb06b..1b236d342f5 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -858,7 +858,7 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length, { /* For slow query log */ if (my_b_printf(&log_file, - "# Time: %lu Lock_time: %lu Rows_sent: %lu Rows_examined: %lu\n", + "# Query_time: %lu Lock_time: %lu Rows_sent: %lu Rows_examined: %lu\n", (ulong) (current_time - query_start), (ulong) (thd->time_after_lock - query_start), (ulong) thd->sent_row_count, diff --git a/sql/sql_select.cc b/sql/sql_select.cc index c4cd4421f98..431674a58e2 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -4121,7 +4121,6 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) bool not_used_in_distinct=join_tab->not_used_in_distinct; ha_rows found_records=join->found_records; READ_RECORD *info= &join_tab->read_record; - join->examined_rows++; do { @@ -4130,6 +4129,7 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) my_error(ER_SERVER_SHUTDOWN,MYF(0)); /* purecov: inspected */ return -2; /* purecov: inspected */ } + join->examined_rows++; if (!on_expr || on_expr->val_int()) { found=1; |