summaryrefslogtreecommitdiff
path: root/sql/ha_isam.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-11-15 19:27:06 +0100
committerunknown <serg@serg.mylan>2004-11-15 19:27:06 +0100
commit03d82a4652c82fb1930e0e515877e8fffbb0e5b0 (patch)
treef8bc0b4f9899e5b4a5f848426d4568de1213e64b /sql/ha_isam.cc
parentf3f73a48df66247e8c155fa429aeb1c42b2e7a55 (diff)
parenta59b0fbfd6b7627a4fdf2233482e732480dbe437 (diff)
downloadmariadb-git-03d82a4652c82fb1930e0e515877e8fffbb0e5b0.tar.gz
Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0 BitKeeper/etc/ignore: auto-union configure.in: Auto merged dbug/dbug.c: Auto merged include/my_dbug.h: Auto merged include/my_sys.h: Auto merged sql/filesort.cc: Auto merged sql/ha_isam.cc: Auto merged sql/ha_isammrg.cc: Auto merged sql/ha_myisam.cc: Auto merged sql/ha_myisammrg.cc: Auto merged sql/sql_select.cc: Auto merged
Diffstat (limited to 'sql/ha_isam.cc')
-rw-r--r--sql/ha_isam.cc27
1 files changed, 15 insertions, 12 deletions
diff --git a/sql/ha_isam.cc b/sql/ha_isam.cc
index 903f9c46002..e1fd17f4399 100644
--- a/sql/ha_isam.cc
+++ b/sql/ha_isam.cc
@@ -69,7 +69,7 @@ uint ha_isam::min_record_length(uint options) const
int ha_isam::write_row(byte * buf)
{
- statistic_increment(current_thd->status_var.ha_write_count, &LOCK_status);
+ statistic_increment(table->in_use->status_var.ha_write_count, &LOCK_status);
if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT)
table->timestamp_field->set_time();
if (table->next_number_field && buf == table->record[0])
@@ -79,7 +79,7 @@ int ha_isam::write_row(byte * buf)
int ha_isam::update_row(const byte * old_data, byte * new_data)
{
- statistic_increment(current_thd->status_var.ha_update_count, &LOCK_status);
+ statistic_increment(table->in_use->status_var.ha_update_count, &LOCK_status);
if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE)
table->timestamp_field->set_time();
return !nisam_update(file,old_data,new_data) ? 0 : my_errno ? my_errno : -1;
@@ -87,14 +87,15 @@ int ha_isam::update_row(const byte * old_data, byte * new_data)
int ha_isam::delete_row(const byte * buf)
{
- statistic_increment(current_thd->status_var.ha_delete_count, &LOCK_status);
+ statistic_increment(table->in_use->status_var.ha_delete_count, &LOCK_status);
return !nisam_delete(file,buf) ? 0 : my_errno ? my_errno : -1;
}
int ha_isam::index_read(byte * buf, const byte * key,
uint key_len, enum ha_rkey_function find_flag)
{
- statistic_increment(current_thd->status_var.ha_read_key_count, &LOCK_status);
+ statistic_increment(table->in_use->status_var.ha_read_key_count,
+ &LOCK_status);
int error=nisam_rkey(file, buf, active_index, key, key_len, find_flag);
table->status=error ? STATUS_NOT_FOUND: 0;
return !error ? 0 : my_errno ? my_errno : -1;
@@ -103,7 +104,8 @@ int ha_isam::index_read(byte * buf, const byte * key,
int ha_isam::index_read_idx(byte * buf, uint index, const byte * key,
uint key_len, enum ha_rkey_function find_flag)
{
- statistic_increment(current_thd->status_var.ha_read_key_count, &LOCK_status);
+ statistic_increment(table->in_use->status_var.ha_read_key_count,
+ &LOCK_status);
int error=nisam_rkey(file, buf, index, key, key_len, find_flag);
table->status=error ? STATUS_NOT_FOUND: 0;
return !error ? 0 : my_errno ? my_errno : -1;
@@ -111,7 +113,8 @@ int ha_isam::index_read_idx(byte * buf, uint index, const byte * key,
int ha_isam::index_read_last(byte * buf, const byte * key, uint key_len)
{
- statistic_increment(current_thd->status_var.ha_read_key_count, &LOCK_status);
+ statistic_increment(table->in_use->status_var.ha_read_key_count,
+ &LOCK_status);
int error=nisam_rkey(file, buf, active_index, key, key_len,
HA_READ_PREFIX_LAST);
table->status=error ? STATUS_NOT_FOUND: 0;
@@ -120,7 +123,7 @@ int ha_isam::index_read_last(byte * buf, const byte * key, uint key_len)
int ha_isam::index_next(byte * buf)
{
- statistic_increment(current_thd->status_var.ha_read_next_count,
+ statistic_increment(table->in_use->status_var.ha_read_next_count,
&LOCK_status);
int error=nisam_rnext(file,buf,active_index);
table->status=error ? STATUS_NOT_FOUND: 0;
@@ -129,7 +132,7 @@ int ha_isam::index_next(byte * buf)
int ha_isam::index_prev(byte * buf)
{
- statistic_increment(current_thd->status_var.ha_read_prev_count,
+ statistic_increment(table->in_use->status_var.ha_read_prev_count,
&LOCK_status);
int error=nisam_rprev(file,buf, active_index);
table->status=error ? STATUS_NOT_FOUND: 0;
@@ -138,7 +141,7 @@ int ha_isam::index_prev(byte * buf)
int ha_isam::index_first(byte * buf)
{
- statistic_increment(current_thd->status_var.ha_read_first_count,
+ statistic_increment(table->in_use->status_var.ha_read_first_count,
&LOCK_status);
int error=nisam_rfirst(file, buf, active_index);
table->status=error ? STATUS_NOT_FOUND: 0;
@@ -147,7 +150,7 @@ int ha_isam::index_first(byte * buf)
int ha_isam::index_last(byte * buf)
{
- statistic_increment(current_thd->status_var.ha_read_last_count,
+ statistic_increment(table->in_use->status_var.ha_read_last_count,
&LOCK_status);
int error=nisam_rlast(file, buf, active_index);
table->status=error ? STATUS_NOT_FOUND: 0;
@@ -161,7 +164,7 @@ int ha_isam::rnd_init(bool scan)
int ha_isam::rnd_next(byte *buf)
{
- statistic_increment(current_thd->status_var.ha_read_rnd_next_count,
+ statistic_increment(table->in_use->status_var.ha_read_rnd_next_count,
&LOCK_status);
int error=nisam_rrnd(file, buf, NI_POS_ERROR);
table->status=error ? STATUS_NOT_FOUND: 0;
@@ -170,7 +173,7 @@ int ha_isam::rnd_next(byte *buf)
int ha_isam::rnd_pos(byte * buf, byte *pos)
{
- statistic_increment(current_thd->status_var.ha_read_rnd_count,
+ statistic_increment(table->in_use->status_var.ha_read_rnd_count,
&LOCK_status);
int error=nisam_rrnd(file, buf, (ulong) my_get_ptr(pos,ref_length));
table->status=error ? STATUS_NOT_FOUND: 0;