Commit 2a6a3ad2 authored by unknown's avatar unknown
Browse files

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1857,7 +1857,7 @@ sub mysql_install_db () {
    }
  }

  if ( ndbcluster_install_slave() )
  if ( $use_slaves and ndbcluster_install_slave() )
  {
    if ( $opt_force)
    {
+2 −2
Original line number Diff line number Diff line
@@ -6217,10 +6217,10 @@ static int ndbcluster_end(ha_panic_function type)
#ifdef HAVE_NDB_BINLOG
  {
    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*) hash_element(&ndbcluster_open_tables, i);
        (NDB_SHARE*) hash_element(&ndbcluster_open_tables, 0);
#ifndef DBUG_OFF
      fprintf(stderr, "NDB: table share %s with use_count %d not freed\n",
              share->key, share->use_count);