diff options
author | Vladislav Vaintroub <wlad@sun.com> | 2009-12-20 21:20:11 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@sun.com> | 2009-12-20 21:20:11 +0000 |
commit | 22c65346986d63c906e1d5a57941cadc367c2a9f (patch) | |
tree | f7e692982ded683eba2bcc4170b3fd63e496449a | |
parent | 2c145a94ffa902ef2330b94a7dabc965091e9f53 (diff) | |
download | mariadb-git-22c65346986d63c906e1d5a57941cadc367c2a9f.tar.gz |
Fix inconsistently defined THR_LOCK_myisam_mmap
It was pthread_mutex_t in mi_static.c and
mysql_mutex_t in my_thr_init.c
Solaris linker complains about different size of the
symbol.
Fix : use mysql_mutex_t everywhere.
-rw-r--r-- | include/myisam.h | 2 | ||||
-rw-r--r-- | storage/myisam/mi_packrec.c | 16 | ||||
-rw-r--r-- | storage/myisam/mi_static.c | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/include/myisam.h b/include/myisam.h index e9d1e4ab43e..e6404cb5405 100644 --- a/include/myisam.h +++ b/include/myisam.h @@ -260,7 +260,7 @@ extern ulong myisam_bulk_insert_tree_size, myisam_data_pointer_size; /* which is normally forbidden */ extern int (*myisam_test_invalid_symlink)(const char *filename); extern ulonglong myisam_mmap_size, myisam_mmap_used; -extern pthread_mutex_t THR_LOCK_myisam_mmap; +extern mysql_mutex_t THR_LOCK_myisam_mmap; /* Prototypes for myisam-functions */ diff --git a/storage/myisam/mi_packrec.c b/storage/myisam/mi_packrec.c index b3a6bf78566..580c58e6ea1 100644 --- a/storage/myisam/mi_packrec.c +++ b/storage/myisam/mi_packrec.c @@ -1502,11 +1502,11 @@ my_bool _mi_memmap_file(MI_INFO *info) if (myisam_mmap_size != SIZE_T_MAX) { - pthread_mutex_lock(&THR_LOCK_myisam_mmap); + mysql_mutex_lock(&THR_LOCK_myisam_mmap); eom= data_file_length > myisam_mmap_size - myisam_mmap_used - MEMMAP_EXTRA_MARGIN; if (!eom) myisam_mmap_used+= data_file_length + MEMMAP_EXTRA_MARGIN; - pthread_mutex_unlock(&THR_LOCK_myisam_mmap); + mysql_mutex_unlock(&THR_LOCK_myisam_mmap); } else eom= data_file_length > myisam_mmap_size - MEMMAP_EXTRA_MARGIN; @@ -1522,9 +1522,9 @@ my_bool _mi_memmap_file(MI_INFO *info) DBUG_PRINT("warning",("File isn't extended for memmap")); if (myisam_mmap_size != SIZE_T_MAX) { - pthread_mutex_lock(&THR_LOCK_myisam_mmap); + mysql_mutex_lock(&THR_LOCK_myisam_mmap); myisam_mmap_used-= data_file_length + MEMMAP_EXTRA_MARGIN; - pthread_mutex_unlock(&THR_LOCK_myisam_mmap); + mysql_mutex_unlock(&THR_LOCK_myisam_mmap); } DBUG_RETURN(0); } @@ -1534,9 +1534,9 @@ my_bool _mi_memmap_file(MI_INFO *info) { if (myisam_mmap_size != SIZE_T_MAX) { - pthread_mutex_lock(&THR_LOCK_myisam_mmap); + mysql_mutex_lock(&THR_LOCK_myisam_mmap); myisam_mmap_used-= data_file_length + MEMMAP_EXTRA_MARGIN; - pthread_mutex_unlock(&THR_LOCK_myisam_mmap); + mysql_mutex_unlock(&THR_LOCK_myisam_mmap); } DBUG_RETURN(0); } @@ -1555,9 +1555,9 @@ void _mi_unmap_file(MI_INFO *info) if (myisam_mmap_size != SIZE_T_MAX) { - pthread_mutex_lock(&THR_LOCK_myisam_mmap); + mysql_mutex_lock(&THR_LOCK_myisam_mmap); myisam_mmap_used-= info->s->mmaped_length + MEMMAP_EXTRA_MARGIN; - pthread_mutex_unlock(&THR_LOCK_myisam_mmap); + mysql_mutex_unlock(&THR_LOCK_myisam_mmap); } } diff --git a/storage/myisam/mi_static.c b/storage/myisam/mi_static.c index b763308a4a9..85a3124cba9 100644 --- a/storage/myisam/mi_static.c +++ b/storage/myisam/mi_static.c @@ -41,7 +41,7 @@ my_off_t myisam_max_temp_length= MAX_FILE_SIZE; ulong myisam_bulk_insert_tree_size=8192*1024; ulong myisam_data_pointer_size=4; ulonglong myisam_mmap_size= SIZE_T_MAX, myisam_mmap_used= 0; -pthread_mutex_t THR_LOCK_myisam_mmap; +mysql_mutex_t THR_LOCK_myisam_mmap; static int always_valid(const char *filename __attribute__((unused))) { |