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 mysql-test/mysql-test-run.pl: do not install ndb slave if no slaves sql/ha_ndbcluster.cc: fixed memleak in ndbcluster_end
This commit is contained in:
@@ -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)
|
|||||||
#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);
|
||||||
|
Reference in New Issue
Block a user