Commit 7077636a authored by Sergei Golubchik's avatar Sergei Golubchik

compilation and test failures

parent 172b631c
...@@ -139,6 +139,7 @@ int pthread_cancel(pthread_t thread); ...@@ -139,6 +139,7 @@ int pthread_cancel(pthread_t thread);
#define pthread_mutex_destroy(A) (DeleteCriticalSection(A), 0) #define pthread_mutex_destroy(A) (DeleteCriticalSection(A), 0)
#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH) #define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH)
/* Dummy defines for easier code */ /* Dummy defines for easier code */
#define pthread_attr_setdetachstate(A,B) pthread_dummy(0) #define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
#define pthread_attr_setscope(A,B) #define pthread_attr_setscope(A,B)
...@@ -368,7 +369,6 @@ int my_pthread_mutex_trylock(pthread_mutex_t *mutex); ...@@ -368,7 +369,6 @@ int my_pthread_mutex_trylock(pthread_mutex_t *mutex);
for calculating an absolute time at which for calculating an absolute time at which
pthread_cond_timedwait should timeout pthread_cond_timedwait should timeout
*/ */
#define set_timespec(ABSTIME,SEC) set_timespec_nsec((ABSTIME),(SEC)*1000000000ULL) #define set_timespec(ABSTIME,SEC) set_timespec_nsec((ABSTIME),(SEC)*1000000000ULL)
#ifndef set_timespec_nsec #ifndef set_timespec_nsec
...@@ -473,24 +473,6 @@ void safe_mutex_free_deadlock_data(safe_mutex_t *mp); ...@@ -473,24 +473,6 @@ void safe_mutex_free_deadlock_data(safe_mutex_t *mp);
#define MYF_NO_DEADLOCK_DETECTION 2 #define MYF_NO_DEADLOCK_DETECTION 2
#ifdef SAFE_MUTEX #ifdef SAFE_MUTEX
#undef pthread_mutex_init
#undef pthread_mutex_lock
#undef pthread_mutex_unlock
#undef pthread_mutex_destroy
#undef pthread_mutex_wait
#undef pthread_mutex_timedwait
#undef pthread_mutex_t
#undef pthread_cond_wait
#undef pthread_cond_timedwait
#undef pthread_mutex_trylock
#define pthread_mutex_init(A,B) safe_mutex_init((A),(B),#A,__FILE__,__LINE__)
#define pthread_mutex_lock(A) safe_mutex_lock((A),0,__FILE__, __LINE__)
#define pthread_mutex_unlock(A) safe_mutex_unlock((A),__FILE__,__LINE__)
#define pthread_mutex_destroy(A) safe_mutex_destroy((A),__FILE__,__LINE__)
#define pthread_cond_wait(A,B) safe_cond_wait((A),(B),__FILE__,__LINE__)
#define pthread_cond_timedwait(A,B,C) safe_cond_timedwait((A),(B),(C),__FILE__,__LINE__)
#define pthread_mutex_trylock(A) safe_mutex_lock((A), MYF_TRY_LOCK, __FILE__, __LINE__)
#define pthread_mutex_t safe_mutex_t
#define safe_mutex_assert_owner(mp) \ #define safe_mutex_assert_owner(mp) \
DBUG_ASSERT((mp)->count > 0 && \ DBUG_ASSERT((mp)->count > 0 && \
pthread_equal(pthread_self(), (mp)->thread)) pthread_equal(pthread_self(), (mp)->thread))
...@@ -528,24 +510,6 @@ int my_pthread_fastmutex_init(my_pthread_fastmutex_t *mp, ...@@ -528,24 +510,6 @@ int my_pthread_fastmutex_init(my_pthread_fastmutex_t *mp,
const pthread_mutexattr_t *attr); const pthread_mutexattr_t *attr);
int my_pthread_fastmutex_lock(my_pthread_fastmutex_t *mp); int my_pthread_fastmutex_lock(my_pthread_fastmutex_t *mp);
#undef pthread_mutex_init
#undef pthread_mutex_lock
#undef pthread_mutex_unlock
#undef pthread_mutex_destroy
#undef pthread_mutex_wait
#undef pthread_mutex_timedwait
#undef pthread_mutex_t
#undef pthread_cond_wait
#undef pthread_cond_timedwait
#undef pthread_mutex_trylock
#define pthread_mutex_init(A,B) my_pthread_fastmutex_init((A),(B))
#define pthread_mutex_lock(A) my_pthread_fastmutex_lock(A)
#define pthread_mutex_unlock(A) pthread_mutex_unlock(&(A)->mutex)
#define pthread_mutex_destroy(A) pthread_mutex_destroy(&(A)->mutex)
#define pthread_cond_wait(A,B) pthread_cond_wait((A),&(B)->mutex)
#define pthread_cond_timedwait(A,B,C) pthread_cond_timedwait((A),&(B)->mutex,(C))
#define pthread_mutex_trylock(A) pthread_mutex_trylock(&(A)->mutex)
#define pthread_mutex_t my_pthread_fastmutex_t
#endif /* defined(MY_PTHREAD_FASTMUTEX) && !defined(SAFE_MUTEX) */ #endif /* defined(MY_PTHREAD_FASTMUTEX) && !defined(SAFE_MUTEX) */
/* READ-WRITE thread locking */ /* READ-WRITE thread locking */
......
...@@ -9,6 +9,7 @@ SET @orig = @@global.innodb_buffer_pool_filename; ...@@ -9,6 +9,7 @@ SET @orig = @@global.innodb_buffer_pool_filename;
SELECT @orig; SELECT @orig;
let $old_val=query_get_value(SHOW STATUS LIKE 'innodb_buffer_pool_dump_status', Value, 1); let $old_val=query_get_value(SHOW STATUS LIKE 'innodb_buffer_pool_dump_status', Value, 1);
sleep 1; # to ensure that the previous and the next dumps are at least a second apart
# Try with a non-default filename # Try with a non-default filename
......
...@@ -96,8 +96,6 @@ void *sf_malloc(size_t size) ...@@ -96,8 +96,6 @@ void *sf_malloc(size_t size)
if (!init_done) if (!init_done)
{ {
pthread_mutex_init(&sf_mutex, NULL); pthread_mutex_init(&sf_mutex, NULL);
/* disable deadlock detector, because it calls my_malloc() */
safe_mutex_setflags(&sf_mutex, MYF_NO_DEADLOCK_DETECTION);
atexit(sf_terminate); atexit(sf_terminate);
init_done= 1; init_done= 1;
} }
......
...@@ -70,7 +70,7 @@ static uint plugin_version[MYSQL_CLIENT_MAX_PLUGINS]= ...@@ -70,7 +70,7 @@ static uint plugin_version[MYSQL_CLIENT_MAX_PLUGINS]=
loading the same plugin twice in parallel. loading the same plugin twice in parallel.
*/ */
struct st_client_plugin_int *plugin_list[MYSQL_CLIENT_MAX_PLUGINS]; struct st_client_plugin_int *plugin_list[MYSQL_CLIENT_MAX_PLUGINS];
static pthread_mutex_t LOCK_load_client_plugin; static mysql_mutex_t LOCK_load_client_plugin;
static int is_not_initialized(MYSQL *mysql, const char *name) static int is_not_initialized(MYSQL *mysql, const char *name)
{ {
...@@ -170,7 +170,7 @@ add_plugin(MYSQL *mysql, struct st_mysql_client_plugin *plugin, void *dlhandle, ...@@ -170,7 +170,7 @@ add_plugin(MYSQL *mysql, struct st_mysql_client_plugin *plugin, void *dlhandle,
goto err2; goto err2;
} }
safe_mutex_assert_owner(&LOCK_load_client_plugin); mysql_mutex_assert_owner(&LOCK_load_client_plugin);
p->next= plugin_list[plugin->type]; p->next= plugin_list[plugin->type];
plugin_list[plugin->type]= p; plugin_list[plugin->type]= p;
...@@ -250,19 +250,19 @@ int mysql_client_plugin_init() ...@@ -250,19 +250,19 @@ int mysql_client_plugin_init()
bzero(&mysql, sizeof(mysql)); /* dummy mysql for set_mysql_extended_error */ bzero(&mysql, sizeof(mysql)); /* dummy mysql for set_mysql_extended_error */
pthread_mutex_init(&LOCK_load_client_plugin, MY_MUTEX_INIT_SLOW); mysql_mutex_init(0, &LOCK_load_client_plugin, MY_MUTEX_INIT_SLOW);
init_alloc_root(&mem_root, 128, 128); init_alloc_root(&mem_root, 128, 128);
bzero(&plugin_list, sizeof(plugin_list)); bzero(&plugin_list, sizeof(plugin_list));
initialized= 1; initialized= 1;
pthread_mutex_lock(&LOCK_load_client_plugin); mysql_mutex_lock(&LOCK_load_client_plugin);
for (builtin= mysql_client_builtins; *builtin; builtin++) for (builtin= mysql_client_builtins; *builtin; builtin++)
add_plugin(&mysql, *builtin, 0, 0, unused); add_plugin(&mysql, *builtin, 0, 0, unused);
pthread_mutex_unlock(&LOCK_load_client_plugin); mysql_mutex_unlock(&LOCK_load_client_plugin);
load_env_plugins(&mysql); load_env_plugins(&mysql);
...@@ -295,7 +295,7 @@ void mysql_client_plugin_deinit() ...@@ -295,7 +295,7 @@ void mysql_client_plugin_deinit()
bzero(&plugin_list, sizeof(plugin_list)); bzero(&plugin_list, sizeof(plugin_list));
initialized= 0; initialized= 0;
free_root(&mem_root, MYF(0)); free_root(&mem_root, MYF(0));
pthread_mutex_destroy(&LOCK_load_client_plugin); mysql_mutex_destroy(&LOCK_load_client_plugin);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
...@@ -313,7 +313,7 @@ mysql_client_register_plugin(MYSQL *mysql, ...@@ -313,7 +313,7 @@ mysql_client_register_plugin(MYSQL *mysql,
if (is_not_initialized(mysql, plugin->name)) if (is_not_initialized(mysql, plugin->name))
DBUG_RETURN(NULL); DBUG_RETURN(NULL);
pthread_mutex_lock(&LOCK_load_client_plugin); mysql_mutex_lock(&LOCK_load_client_plugin);
/* make sure the plugin wasn't loaded meanwhile */ /* make sure the plugin wasn't loaded meanwhile */
if (find_plugin(plugin->name, plugin->type)) if (find_plugin(plugin->name, plugin->type))
...@@ -326,7 +326,7 @@ mysql_client_register_plugin(MYSQL *mysql, ...@@ -326,7 +326,7 @@ mysql_client_register_plugin(MYSQL *mysql,
else else
plugin= add_plugin(mysql, plugin, 0, 0, unused); plugin= add_plugin(mysql, plugin, 0, 0, unused);
pthread_mutex_unlock(&LOCK_load_client_plugin); mysql_mutex_unlock(&LOCK_load_client_plugin);
DBUG_RETURN(plugin); DBUG_RETURN(plugin);
} }
...@@ -348,7 +348,7 @@ mysql_load_plugin_v(MYSQL *mysql, const char *name, int type, ...@@ -348,7 +348,7 @@ mysql_load_plugin_v(MYSQL *mysql, const char *name, int type,
DBUG_RETURN (NULL); DBUG_RETURN (NULL);
} }
pthread_mutex_lock(&LOCK_load_client_plugin); mysql_mutex_lock(&LOCK_load_client_plugin);
/* make sure the plugin wasn't loaded meanwhile */ /* make sure the plugin wasn't loaded meanwhile */
if (type >= 0 && find_plugin(name, type)) if (type >= 0 && find_plugin(name, type))
...@@ -401,13 +401,13 @@ mysql_load_plugin_v(MYSQL *mysql, const char *name, int type, ...@@ -401,13 +401,13 @@ mysql_load_plugin_v(MYSQL *mysql, const char *name, int type,
plugin= add_plugin(mysql, plugin, dlhandle, argc, args); plugin= add_plugin(mysql, plugin, dlhandle, argc, args);
pthread_mutex_unlock(&LOCK_load_client_plugin); mysql_mutex_unlock(&LOCK_load_client_plugin);
DBUG_PRINT ("leave", ("plugin loaded ok")); DBUG_PRINT ("leave", ("plugin loaded ok"));
DBUG_RETURN (plugin); DBUG_RETURN (plugin);
err: err:
pthread_mutex_unlock(&LOCK_load_client_plugin); mysql_mutex_unlock(&LOCK_load_client_plugin);
DBUG_PRINT ("leave", ("plugin load error : %s", errmsg)); DBUG_PRINT ("leave", ("plugin load error : %s", errmsg));
set_mysql_extended_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD, unknown_sqlstate, set_mysql_extended_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD, unknown_sqlstate,
ER(CR_AUTH_PLUGIN_CANNOT_LOAD), name, errmsg); ER(CR_AUTH_PLUGIN_CANNOT_LOAD), name, errmsg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment