|
|
|
@ -6325,43 +6325,6 @@ int spider_db_init( |
|
|
|
memset(&spider_alloc_mem_count, 0, sizeof(spider_alloc_mem_count)); |
|
|
|
memset(&spider_free_mem_count, 0, sizeof(spider_free_mem_count)); |
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
HMODULE current_module = GetModuleHandle(NULL); |
|
|
|
spd_db_att_thread_id = (ulong *) |
|
|
|
GetProcAddress(current_module, "?thread_id@@3KA"); |
|
|
|
#ifdef SPIDER_XID_USES_xid_cache_iterate
|
|
|
|
#else
|
|
|
|
#ifdef XID_CACHE_IS_SPLITTED
|
|
|
|
spd_db_att_xid_cache_split_num = (uint *) |
|
|
|
GetProcAddress(current_module, |
|
|
|
"?opt_xid_cache_split_num@@3IA"); |
|
|
|
spd_db_att_LOCK_xid_cache = *((pthread_mutex_t **) |
|
|
|
GetProcAddress(current_module, |
|
|
|
"?LOCK_xid_cache@@3PAUst_mysql_mutex@@A")); |
|
|
|
spd_db_att_xid_cache = *((HASH **) |
|
|
|
GetProcAddress(current_module, "?xid_cache@@3PAUst_hash@@A")); |
|
|
|
#else
|
|
|
|
spd_db_att_LOCK_xid_cache = (pthread_mutex_t *) |
|
|
|
#if MYSQL_VERSION_ID < 50500
|
|
|
|
GetProcAddress(current_module, |
|
|
|
"?LOCK_xid_cache@@3U_RTL_CRITICAL_SECTION@@A"); |
|
|
|
#else
|
|
|
|
GetProcAddress(current_module, |
|
|
|
"?LOCK_xid_cache@@3Ust_mysql_mutex@@A"); |
|
|
|
#endif
|
|
|
|
spd_db_att_xid_cache = (HASH *) |
|
|
|
GetProcAddress(current_module, "?xid_cache@@3Ust_hash@@A"); |
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
spd_charset_utf8_bin = (struct charset_info_st *) |
|
|
|
GetProcAddress(current_module, "my_charset_utf8_bin"); |
|
|
|
spd_defaults_extra_file = (const char **) |
|
|
|
GetProcAddress(current_module, "my_defaults_extra_file"); |
|
|
|
spd_defaults_file = (const char **) |
|
|
|
GetProcAddress(current_module, "my_defaults_file"); |
|
|
|
spd_abort_loop = (bool volatile *) |
|
|
|
GetProcAddress(current_module, "?abort_loop@@3_NC"); |
|
|
|
#else
|
|
|
|
spd_db_att_thread_id = &thread_id; |
|
|
|
#ifdef SPIDER_XID_USES_xid_cache_iterate
|
|
|
|
#else
|
|
|
|
@ -6378,7 +6341,6 @@ int spider_db_init( |
|
|
|
spd_defaults_extra_file = &my_defaults_extra_file; |
|
|
|
spd_defaults_file = &my_defaults_file; |
|
|
|
spd_abort_loop = &abort_loop; |
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_PSI_INTERFACE
|
|
|
|
init_spider_psi_keys(); |
|
|
|
|