mysql-test/t/ndb_dd_basic.test
fixed the test sql/ha_ndbcluster.cc LOCK_plugin is used in ha_ndbcluster.cc sql/sql_plugin.cc LOCK_plugin is used in ha_ndbcluster.cc
This commit is contained in:
parent
1901fe6e3a
commit
f49eb3fde8
@ -25,7 +25,6 @@ INITIAL_SIZE 16M
|
||||
UNDO_BUFFER_SIZE = 1M
|
||||
ENGINE=MYISAM;
|
||||
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
ALTER LOGFILE GROUP lg1
|
||||
ADD UNDOFILE 'undofile02.dat'
|
||||
INITIAL_SIZE = 4M
|
||||
|
@ -6851,6 +6851,7 @@ static int connect_callback()
|
||||
}
|
||||
|
||||
extern int ndb_dictionary_is_mysqld;
|
||||
extern pthread_mutex_t LOCK_plugin;
|
||||
|
||||
static int ndbcluster_init(void *p)
|
||||
{
|
||||
@ -6860,6 +6861,13 @@ static int ndbcluster_init(void *p)
|
||||
if (ndbcluster_inited)
|
||||
DBUG_RETURN(FALSE);
|
||||
|
||||
/*
|
||||
Below we create new THD's. They'll need LOCK_plugin, but it's taken now by
|
||||
plugin initialization code. Release it to avoid deadlocks. It's safe, as
|
||||
there're no threads that may concurrently access plugin control structures.
|
||||
*/
|
||||
pthread_mutex_unlock(&LOCK_plugin);
|
||||
|
||||
pthread_mutex_init(&ndbcluster_mutex,MY_MUTEX_INIT_FAST);
|
||||
pthread_mutex_init(&LOCK_ndb_util_thread, MY_MUTEX_INIT_FAST);
|
||||
pthread_cond_init(&COND_ndb_util_thread, NULL);
|
||||
@ -6998,6 +7006,8 @@ static int ndbcluster_init(void *p)
|
||||
goto ndbcluster_init_error;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&LOCK_plugin);
|
||||
|
||||
ndbcluster_inited= 1;
|
||||
DBUG_RETURN(FALSE);
|
||||
|
||||
@ -7010,6 +7020,8 @@ ndbcluster_init_error:
|
||||
g_ndb_cluster_connection= NULL;
|
||||
ndbcluster_hton->state= SHOW_OPTION_DISABLED; // If we couldn't use handler
|
||||
|
||||
pthread_mutex_lock(&LOCK_plugin);
|
||||
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ static bool initialized= 0;
|
||||
following variables/structures.
|
||||
We are always manipulating ref count, so a rwlock here is unneccessary.
|
||||
*/
|
||||
static pthread_mutex_t LOCK_plugin;
|
||||
pthread_mutex_t LOCK_plugin;
|
||||
static DYNAMIC_ARRAY plugin_dl_array;
|
||||
static DYNAMIC_ARRAY plugin_array;
|
||||
static HASH plugin_hash[MYSQL_MAX_PLUGIN_TYPE_NUM];
|
||||
|
Loading…
x
Reference in New Issue
Block a user