mirror of
https://github.com/MariaDB/server.git
synced 2025-09-11 05:52:26 +03:00
WL#2360 Performance schema
Part III: mysys instrumentation
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user