Commit 2a6a3ad2 authored by unknown's avatar unknown

do not install ndb slave if no slaves

    fixed memleak in ndbcluster_end


mysql-test/mysql-test-run.pl:
  do not install ndb slave if no slaves
sql/ha_ndbcluster.cc:
  fixed memleak in ndbcluster_end
parent 2a655fcc
...@@ -1857,7 +1857,7 @@ sub mysql_install_db () { ...@@ -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)
{ {
......
...@@ -6217,10 +6217,10 @@ static int ndbcluster_end(ha_panic_function type) ...@@ -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);
......
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