1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

do not install ndb slave if no slaves

fixed memleak in ndbcluster_end
This commit is contained in:
tomas@poseidon.ndb.mysql.com
2006-05-05 15:34:46 +02:00
parent 135f4ab706
commit f8c37502b3
2 changed files with 3 additions and 3 deletions

View File

@@ -1857,7 +1857,7 @@ sub mysql_install_db () {
} }
} }
if ( ndbcluster_install_slave() ) if ( $use_slaves and ndbcluster_install_slave() )
{ {
if ( $opt_force) if ( $opt_force)
{ {

View File

@@ -6217,10 +6217,10 @@ static int ndbcluster_end(ha_panic_function type)
#ifdef HAVE_NDB_BINLOG #ifdef HAVE_NDB_BINLOG
{ {
pthread_mutex_lock(&ndbcluster_mutex); pthread_mutex_lock(&ndbcluster_mutex);
for (uint i= 0; i < ndbcluster_open_tables.records; i++) while (ndbcluster_open_tables.records)
{ {
NDB_SHARE *share= NDB_SHARE *share=
(NDB_SHARE*) hash_element(&ndbcluster_open_tables, i); (NDB_SHARE*) hash_element(&ndbcluster_open_tables, 0);
#ifndef DBUG_OFF #ifndef DBUG_OFF
fprintf(stderr, "NDB: table share %s with use_count %d not freed\n", fprintf(stderr, "NDB: table share %s with use_count %d not freed\n",
share->key, share->use_count); share->key, share->use_count);