summaryrefslogtreecommitdiff
path: root/storage/myisam/mi_close.c
diff options
context:
space:
mode:
authorMarc Alff <marc.alff@sun.com>2009-12-04 18:26:15 -0700
committerMarc Alff <marc.alff@sun.com>2009-12-04 18:26:15 -0700
commit04fe40393d9d0ef81cc6a770bda67ab67fe4154e (patch)
tree9ca152d7f2ac50cfd8b7fca83f87cb06148d97a0 /storage/myisam/mi_close.c
parent560e76c567c3551f5a4320acfc954200e8330ad8 (diff)
downloadmariadb-git-04fe40393d9d0ef81cc6a770bda67ab67fe4154e.tar.gz
WL#2360 Performance schema
Part II, engines instrumentation
Diffstat (limited to 'storage/myisam/mi_close.c')
-rw-r--r--storage/myisam/mi_close.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/storage/myisam/mi_close.c b/storage/myisam/mi_close.c
index f94c8f3558d..8ec0bf14e0a 100644
--- a/storage/myisam/mi_close.c
+++ b/storage/myisam/mi_close.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2004 MySQL AB
+/* Copyright (C) 2000-2004 MySQL AB, 2008-2009 Sun Microsystems, Inc
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ int mi_close(register MI_INFO *info)
(long) info, (uint) share->reopen,
(uint) share->tot_locks));
- pthread_mutex_lock(&THR_LOCK_myisam);
+ mysql_mutex_lock(&THR_LOCK_myisam);
if (info->lock_type == F_EXTRA_LCK)
info->lock_type=F_UNLCK; /* HA_EXTRA_NO_USER_CHANGE */
@@ -40,7 +40,7 @@ int mi_close(register MI_INFO *info)
if (mi_lock_database(info,F_UNLCK))
error=my_errno;
}
- pthread_mutex_lock(&share->intern_lock);
+ mysql_mutex_lock(&share->intern_lock);
if (share->options & HA_OPTION_READ_ONLY_DATA)
{
@@ -55,7 +55,7 @@ int mi_close(register MI_INFO *info)
}
flag= !--share->reopen;
myisam_open_list=list_delete(myisam_open_list,&info->open_list);
- pthread_mutex_unlock(&share->intern_lock);
+ mysql_mutex_unlock(&share->intern_lock);
my_free(mi_get_rec_buff_ptr(info, info->rec_buff), MYF(MY_ALLOW_ZERO_PTR));
if (flag)
@@ -79,7 +79,7 @@ int mi_close(register MI_INFO *info)
mi_state_info_write(share->kfile, &share->state, 1);
/* Decrement open count must be last I/O on this file. */
_mi_decrement_open_count(info);
- if (my_close(share->kfile,MYF(0)))
+ if (mysql_file_close(share->kfile, MYF(0)))
error = my_errno;
}
#ifdef HAVE_MMAP
@@ -93,25 +93,25 @@ int mi_close(register MI_INFO *info)
}
#ifdef THREAD
thr_lock_delete(&share->lock);
- pthread_mutex_destroy(&share->intern_lock);
+ mysql_mutex_destroy(&share->intern_lock);
{
int i,keys;
keys = share->state.header.keys;
- (void) rwlock_destroy(&share->mmap_lock);
+ mysql_rwlock_destroy(&share->mmap_lock);
for(i=0; i<keys; i++) {
- (void) rwlock_destroy(&share->key_root_lock[i]);
+ mysql_rwlock_destroy(&share->key_root_lock[i]);
}
}
#endif
my_free((uchar*) info->s,MYF(0));
}
- pthread_mutex_unlock(&THR_LOCK_myisam);
+ mysql_mutex_unlock(&THR_LOCK_myisam);
if (info->ftparser_param)
{
my_free((uchar*)info->ftparser_param, MYF(0));
info->ftparser_param= 0;
}
- if (info->dfile >= 0 && my_close(info->dfile,MYF(0)))
+ if (info->dfile >= 0 && mysql_file_close(info->dfile, MYF(0)))
error = my_errno;
myisam_log_command(MI_LOG_CLOSE,info,NULL,0,error);