diff options
author | Mikael Ronstrom <mikael@mysql.com> | 2008-12-20 11:01:41 +0100 |
---|---|---|
committer | Mikael Ronstrom <mikael@mysql.com> | 2008-12-20 11:01:41 +0100 |
commit | 16a024c486f75b9eadc046511f48a23e566e9c4b (patch) | |
tree | 36aa1edfd94289934ffa3aa66af64b899e9a9e77 /sql/filesort.cc | |
parent | 8d162b444ab0e4396098d0a5e1f23811441917a1 (diff) | |
download | mariadb-git-16a024c486f75b9eadc046511f48a23e566e9c4b.tar.gz |
Backport of DTrace patches from 6.0
Diffstat (limited to 'sql/filesort.cc')
-rw-r--r-- | sql/filesort.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc index 2850ada1ffb..e95d1741b06 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -27,6 +27,7 @@ #endif #include <m_ctype.h> #include "sql_sort.h" +#include "probes_mysql.h" #ifndef THREAD #define SKIP_DBUG_IN_FILESORT @@ -121,6 +122,8 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length, TABLE_LIST *tab= table->pos_in_table_list; Item_subselect *subselect= tab ? tab->containing_subselect() : 0; + MYSQL_FILESORT_START(table->s->db.str, table->s->tablename.str); + /* Release InnoDB's adaptive hash index latch (if holding) before running a sort. @@ -331,6 +334,7 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length, #endif memcpy(&table->sort, &table_sort, sizeof(FILESORT_INFO)); DBUG_PRINT("exit",("records: %ld", (long) records)); + MYSQL_FILESORT_DONE(error, records); DBUG_RETURN(error ? HA_POS_ERROR : records); } /* filesort */ |