summaryrefslogtreecommitdiff
path: root/sql/des_key_file.cc
diff options
context:
space:
mode:
authorunknown <monty@mishka.local>2005-07-19 19:25:05 +0300
committerunknown <monty@mishka.local>2005-07-19 19:25:05 +0300
commit3a31f7b91f9aea5c6bab45157c3a661252720174 (patch)
tree98d1121d654b01cf2306965326d1355704fc1218 /sql/des_key_file.cc
parentddc3586495aa82f310b0e5c2127b77f28c711c27 (diff)
downloadmariadb-git-3a31f7b91f9aea5c6bab45157c3a661252720174.tar.gz
Simple fixes during review of new code
include/my_global.h: Added floatget() to read unaligned flaot mysql-test/r/select.result: Added test for found_rows() mysql-test/t/select.test: Added test for found_rows() sql/des_key_file.cc: Moved initalization of LOCK_des_key_file to mysqld to make simpler code and avoid theoretical race condition sql/field_conv.cc: Added optimizzed varsion of do_cut_string (for simple character sets) sql/item_func.cc: Simplify code (and ensure DBUG_ENTER is excuted before main code) sql/item_strfunc.cc: Safe calculation of max_length This was needed as max_length can now be 1<<32-1 (after konstantins recent patch to fix BLOB_LENGTH) Remove init_des_key_file() as this is not initialized in mysqld.cc sql/item_timefunc.cc: Safe calculation of max_length This was needed as max_length can now be 1<<32-1 (after konstantins recent patch to fix BLOB_LENGTH) sql/log_event.cc: Simplify code sql/mysql_priv.h: Moved initalization of LOCK_des_key_file to mysqld to make simpler code and avoid theoretical race condition sql/mysqld.cc: Moved initalization of LOCK_des_key_file to mysqld to make simpler code and avoid theoretical race condition Revert wrong patch of calling close_connection() in first close_connections() loop. (Bug #7403) Instead we now print a warning for closed connections only if mysqld is sarted with --warnings Added comments to make the close_connections() logic clearer sql/sql_prepare.cc: Use floatget() and doubleget() to protect against unaligned data sql/sql_select.cc: Fixed some cases unlikely cases where found_rows() would return wrong for queries that would return 0 or 1 rows
Diffstat (limited to 'sql/des_key_file.cc')
-rw-r--r--sql/des_key_file.cc25
1 files changed, 0 insertions, 25 deletions
diff --git a/sql/des_key_file.cc b/sql/des_key_file.cc
index 558e3f16ad2..342939ad8ba 100644
--- a/sql/des_key_file.cc
+++ b/sql/des_key_file.cc
@@ -21,18 +21,6 @@
struct st_des_keyschedule des_keyschedule[10];
uint des_default_key;
-pthread_mutex_t LOCK_des_key_file;
-static int initialized= 0;
-
-void
-init_des_key_file()
-{
- if (!initialized)
- {
- initialized=1;
- pthread_mutex_init(&LOCK_des_key_file,MY_MUTEX_INIT_FAST);
- }
-}
/*
Function which loads DES keys from plaintext file into memory on MySQL
@@ -55,8 +43,6 @@ load_des_key_file(const char *file_name)
DBUG_ENTER("load_des_key_file");
DBUG_PRINT("enter",("name: %s",file_name));
- init_des_key_file();
-
VOID(pthread_mutex_lock(&LOCK_des_key_file));
if ((file=my_open(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)))
@@ -113,15 +99,4 @@ error:
VOID(pthread_mutex_unlock(&LOCK_des_key_file));
DBUG_RETURN(result);
}
-
-
-void free_des_key_file()
-{
- if (initialized)
- {
- initialized= 01;
- pthread_mutex_destroy(&LOCK_des_key_file);
- }
-}
-
#endif /* HAVE_OPENSSL */