summaryrefslogtreecommitdiff
path: root/mysys/charset.c
diff options
context:
space:
mode:
authorMarc Alff <marc.alff@sun.com>2009-12-09 20:19:51 -0700
committerMarc Alff <marc.alff@sun.com>2009-12-09 20:19:51 -0700
commitc082955f0676efe069f30384102ba7807b49dee6 (patch)
treecc0a038191d1969182d5dd108c891ee10a436cc0 /mysys/charset.c
parent6fd3866c6c104f8bc991d71583e627ae6fabe0ab (diff)
downloadmariadb-git-c082955f0676efe069f30384102ba7807b49dee6.tar.gz
WL#2360 Performance schema
Part III: mysys instrumentation
Diffstat (limited to 'mysys/charset.c')
-rw-r--r--mysys/charset.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mysys/charset.c b/mysys/charset.c
index 280b2ad6091..3f3f62a0ae1 100644
--- a/mysys/charset.c
+++ b/mysys/charset.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (C) 2000 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
@@ -339,10 +339,10 @@ static my_bool my_read_charset_file(const char *filename, myf myflags)
!(buf= (uchar*) my_malloc(len,myflags)))
return TRUE;
- if ((fd=my_open(filename,O_RDONLY,myflags)) < 0)
+ if ((fd= mysql_file_open(key_file_charset, filename, O_RDONLY, myflags)) < 0)
goto error;
- tmp_len=my_read(fd, buf, len, myflags);
- my_close(fd,myflags);
+ tmp_len= mysql_file_read(fd, buf, len, myflags);
+ mysql_file_close(fd, myflags);
if (tmp_len != len)
goto error;
@@ -421,7 +421,7 @@ static my_bool init_available_charsets(myf myflags)
To make things thread safe we are not allowing other threads to interfere
while we may changing the cs_info_table
*/
- pthread_mutex_lock(&THR_LOCK_charset);
+ mysql_mutex_lock(&THR_LOCK_charset);
if (!charset_initialized)
{
bzero(&all_charsets,sizeof(all_charsets));
@@ -444,7 +444,7 @@ static my_bool init_available_charsets(myf myflags)
error= my_read_charset_file(fname,myflags);
charset_initialized=1;
}
- pthread_mutex_unlock(&THR_LOCK_charset);
+ mysql_mutex_unlock(&THR_LOCK_charset);
}
return error;
}
@@ -507,7 +507,7 @@ static CHARSET_INFO *get_internal_charset(uint cs_number, myf flags)
To make things thread safe we are not allowing other threads to interfere
while we may changing the cs_info_table
*/
- pthread_mutex_lock(&THR_LOCK_charset);
+ mysql_mutex_lock(&THR_LOCK_charset);
if (!(cs->state & (MY_CS_COMPILED|MY_CS_LOADED))) /* if CS is not in memory */
{
@@ -529,7 +529,7 @@ static CHARSET_INFO *get_internal_charset(uint cs_number, myf flags)
else
cs= NULL;
- pthread_mutex_unlock(&THR_LOCK_charset);
+ mysql_mutex_unlock(&THR_LOCK_charset);
}
return cs;
}