summaryrefslogtreecommitdiff
path: root/sql/handler.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/handler.cc
parentc92b5349701ba68fa7ab97abf14933de8d6352fe (diff)
downloadmariadb-git-93527151118189fb935ade4791ad914c94fab591.tar.gz
Added per thread status variables, after review, patch v1.1.
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 9342d20ec24..86d56e14560 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -51,11 +51,7 @@
static int NEAR_F delete_file(const char *name,const char *ext,int extflag);
-ulong ha_read_count, ha_write_count, ha_delete_count, ha_update_count,
- ha_read_key_count, ha_read_next_count, ha_read_prev_count,
- ha_read_first_count, ha_read_last_count,
- ha_commit_count, ha_rollback_count,
- ha_read_rnd_count, ha_read_rnd_next_count, ha_discover_count;
+ulong ha_read_count, ha_discover_count;
static SHOW_COMP_OPTION have_yes= SHOW_OPTION_YES;
@@ -541,7 +537,7 @@ int ha_commit_trans(THD *thd, THD_TRANS* trans)
thd->variables.tx_isolation=thd->session_tx_isolation;
if (operation_done)
{
- statistic_increment(ha_commit_count,&LOCK_status);
+ statistic_increment(thd->status_var.ha_commit_count,&LOCK_status);
thd->transaction.cleanup();
}
}
@@ -630,7 +626,7 @@ int ha_rollback_trans(THD *thd, THD_TRANS *trans)
}
thd->variables.tx_isolation=thd->session_tx_isolation;
if (operation_done)
- statistic_increment(ha_rollback_count,&LOCK_status);
+ statistic_increment(thd->status_var.ha_rollback_count,&LOCK_status);
}
#endif /* USING_TRANSACTIONS */
DBUG_RETURN(error);
@@ -703,7 +699,7 @@ int ha_rollback_to_savepoint(THD *thd, char *savepoint_name)
operation_done=1;
#endif
if (operation_done)
- statistic_increment(ha_rollback_count,&LOCK_status);
+ statistic_increment(thd->status_var.ha_rollback_count,&LOCK_status);
}
#endif /* USING_TRANSACTIONS */
@@ -898,7 +894,7 @@ int handler::read_first_row(byte * buf, uint primary_key)
register int error;
DBUG_ENTER("handler::read_first_row");
- statistic_increment(ha_read_first_count,&LOCK_status);
+ statistic_increment(current_thd->status_var.ha_read_first_count,&LOCK_status);
/*
If there is very few deleted rows in the table, find the first row by