diff options
author | Alexander Nozdrin <alik@sun.com> | 2009-12-11 12:39:38 +0300 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2009-12-11 12:39:38 +0300 |
commit | 69cfd5c8ecd20bca0e651efcbb8b5affc24c1af4 (patch) | |
tree | 965519a5b0af3f33624c7e16fd61b58d15f42372 /sql/sql_servers.cc | |
parent | 713ed2d2438dd0e5aecf8ea5138d0ca97c3bc519 (diff) | |
parent | 2757eab5444982e9375f77d9bca52992f55cc565 (diff) | |
download | mariadb-git-69cfd5c8ecd20bca0e651efcbb8b5affc24c1af4.tar.gz |
Manual merge from mysql-trunk.
Conflicts:
- client/mysqltest.cc
- mysql-test/collections/default.experimental
- mysql-test/suite/rpl/t/disabled.def
- sql/mysqld.cc
- sql/opt_range.cc
- sql/sp.cc
- sql/sql_acl.cc
- sql/sql_partition.cc
- sql/sql_table.cc
Diffstat (limited to 'sql/sql_servers.cc')
-rw-r--r-- | sql/sql_servers.cc | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/sql/sql_servers.cc b/sql/sql_servers.cc index f8a8dea18ff..e8fa3d984a7 100644 --- a/sql/sql_servers.cc +++ b/sql/sql_servers.cc @@ -120,8 +120,8 @@ bool servers_init(bool dont_read_servers_table) DBUG_RETURN(TRUE); /* initialise our servers cache */ - if (hash_init(&servers_cache, system_charset_info, 32, 0, 0, - (hash_get_key) servers_cache_get_key, 0, 0)) + if (my_hash_init(&servers_cache, system_charset_info, 32, 0, 0, + (my_hash_get_key) servers_cache_get_key, 0, 0)) { return_val= TRUE; /* we failed, out of memory? */ goto end; @@ -242,7 +242,7 @@ bool servers_reload(THD *thd) if (simple_open_n_lock_tables(thd, tables)) { sql_print_error("Can't open and lock privilege tables: %s", - thd->main_da.message()); + thd->stmt_da->message()); goto end; } @@ -646,9 +646,10 @@ delete_server_record_in_cache(LEX_SERVER_OPTIONS *server_options) server_options->server_name_length)); - if (!(server= (FOREIGN_SERVER *) hash_search(&servers_cache, - (uchar*) server_options->server_name, - server_options->server_name_length))) + if (!(server= (FOREIGN_SERVER *) + my_hash_search(&servers_cache, + (uchar*) server_options->server_name, + server_options->server_name_length))) { DBUG_PRINT("info", ("server_name %s length %d not found!", server_options->server_name, @@ -663,7 +664,7 @@ delete_server_record_in_cache(LEX_SERVER_OPTIONS *server_options) server->server_name, server->server_name_length)); - VOID(hash_delete(&servers_cache, (uchar*) server)); + VOID(my_hash_delete(&servers_cache, (uchar*) server)); error= 0; @@ -770,7 +771,7 @@ int update_server_record_in_cache(FOREIGN_SERVER *existing, /* delete the existing server struct from the server cache */ - VOID(hash_delete(&servers_cache, (uchar*)existing)); + VOID(my_hash_delete(&servers_cache, (uchar*)existing)); /* Insert the altered server struct into the server cache @@ -965,8 +966,8 @@ int create_server(THD *thd, LEX_SERVER_OPTIONS *server_options) rw_wrlock(&THR_LOCK_servers); /* hit the memory first */ - if (hash_search(&servers_cache, (uchar*) server_options->server_name, - server_options->server_name_length)) + if (my_hash_search(&servers_cache, (uchar*) server_options->server_name, + server_options->server_name_length)) goto end; @@ -1014,9 +1015,9 @@ int alter_server(THD *thd, LEX_SERVER_OPTIONS *server_options) rw_wrlock(&THR_LOCK_servers); - if (!(existing= (FOREIGN_SERVER *) hash_search(&servers_cache, - (uchar*) name.str, - name.length))) + if (!(existing= (FOREIGN_SERVER *) my_hash_search(&servers_cache, + (uchar*) name.str, + name.length))) goto end; altered= (FOREIGN_SERVER *)alloc_root(&mem, @@ -1195,7 +1196,7 @@ prepare_server_struct_for_update(LEX_SERVER_OPTIONS *server_options, void servers_free(bool end) { DBUG_ENTER("servers_free"); - if (!hash_inited(&servers_cache)) + if (!my_hash_inited(&servers_cache)) DBUG_VOID_RETURN; if (!end) { @@ -1205,7 +1206,7 @@ void servers_free(bool end) } rwlock_destroy(&THR_LOCK_servers); free_root(&mem,MYF(0)); - hash_free(&servers_cache); + my_hash_free(&servers_cache); DBUG_VOID_RETURN; } @@ -1286,9 +1287,9 @@ FOREIGN_SERVER *get_server_by_name(MEM_ROOT *mem, const char *server_name, DBUG_PRINT("info", ("locking servers_cache")); rw_rdlock(&THR_LOCK_servers); - if (!(server= (FOREIGN_SERVER *) hash_search(&servers_cache, - (uchar*) server_name, - server_name_length))) + if (!(server= (FOREIGN_SERVER *) my_hash_search(&servers_cache, + (uchar*) server_name, + server_name_length))) { DBUG_PRINT("info", ("server_name %s length %u not found!", server_name, (unsigned) server_name_length)); |