summaryrefslogtreecommitdiff
path: root/sql/filesort.cc
diff options
context:
space:
mode:
authorunknown <jani@rhols221.adsl.netsonic.fi>2004-09-13 16:48:01 +0300
committerunknown <jani@rhols221.adsl.netsonic.fi>2004-09-13 16:48:01 +0300
commit93527151118189fb935ade4791ad914c94fab591 (patch)
tree485e9a69f70cbaae2501e87e055f69d6aa354c3f /sql/filesort.cc
parentc92b5349701ba68fa7ab97abf14933de8d6352fe (diff)
downloadmariadb-git-93527151118189fb935ade4791ad914c94fab591.tar.gz
Added per thread status variables, after review, patch v1.1.
Diffstat (limited to 'sql/filesort.cc')
-rw-r--r--sql/filesort.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc
index fe2b3850197..ef8148616e5 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -163,11 +163,11 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
if (select && select->quick)
{
- statistic_increment(filesort_range_count, &LOCK_status);
+ statistic_increment(thd->status_var.filesort_range_count, &LOCK_status);
}
else
{
- statistic_increment(filesort_scan_count, &LOCK_status);
+ statistic_increment(thd->status_var.filesort_scan_count, &LOCK_status);
}
#ifdef CAN_TRUST_RANGE
if (select && select->quick && select->quick->records > 0L)
@@ -280,7 +280,8 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
if (error)
my_error(ER_FILSORT_ABORT,MYF(ME_ERROR+ME_WAITTANG));
else
- statistic_add(filesort_rows, (ulong) records, &LOCK_status);
+ statistic_add(thd->status_var.filesort_rows,
+ (ulong) records, &LOCK_status);
*examined_rows= param.examined_rows;
#ifdef SKIP_DBUG_IN_FILESORT
DBUG_POP(); /* Ok to DBUG */
@@ -874,7 +875,8 @@ int merge_buffers(SORTPARAM *param, IO_CACHE *from_file,
THD::killed_state not_killable;
DBUG_ENTER("merge_buffers");
- statistic_increment(filesort_merge_passes, &LOCK_status);
+ statistic_increment(current_thd->status_var.filesort_merge_passes,
+ &LOCK_status);
if (param->not_killable)
{
killed= &not_killable;