diff options
author | Marc Alff <marc.alff@sun.com> | 2010-01-06 22:42:07 -0700 |
---|---|---|
committer | Marc Alff <marc.alff@sun.com> | 2010-01-06 22:42:07 -0700 |
commit | 3d915225611a921fad03934e58bf281b48fc15b0 (patch) | |
tree | ea8cbc9d70015a17aad75df30e7d223476eaa4da /sql/des_key_file.cc | |
parent | 4b559b912f5a3aa02a226fdacddaa3b80a8ade42 (diff) | |
download | mariadb-git-3d915225611a921fad03934e58bf281b48fc15b0.tar.gz |
WL#2360 Performance schema
Part IV: sql instrumentation
Diffstat (limited to 'sql/des_key_file.cc')
-rw-r--r-- | sql/des_key_file.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/des_key_file.cc b/sql/des_key_file.cc index 87ad6ff12b0..c2b632e521b 100644 --- a/sql/des_key_file.cc +++ b/sql/des_key_file.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2003, 2005 MySQL AB +/* Copyright (C) 2001-2003, 2005 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 @@ -43,8 +43,9 @@ load_des_key_file(const char *file_name) DBUG_ENTER("load_des_key_file"); DBUG_PRINT("enter",("name: %s",file_name)); - pthread_mutex_lock(&LOCK_des_key_file); - if ((file=my_open(file_name,O_RDONLY | O_BINARY ,MYF(MY_WME))) < 0 || + mysql_mutex_lock(&LOCK_des_key_file); + if ((file= mysql_file_open(key_file_des_key_file, file_name, + O_RDONLY | O_BINARY, MYF(MY_WME))) < 0 || init_io_cache(&io, file, IO_SIZE*2, READ_CACHE, 0, 0, MYF(MY_WME))) goto error; @@ -93,10 +94,10 @@ load_des_key_file(const char *file_name) error: if (file >= 0) { - my_close(file,MYF(0)); + mysql_file_close(file, MYF(0)); end_io_cache(&io); } - pthread_mutex_unlock(&LOCK_des_key_file); + mysql_mutex_unlock(&LOCK_des_key_file); DBUG_RETURN(result); } #endif /* HAVE_OPENSSL */ |