Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new
This commit is contained in:
commit
5e77d28789
@ -5995,6 +5995,22 @@ static int ndbcluster_end(ha_panic_function type)
|
||||
delete g_ndb_cluster_connection;
|
||||
g_ndb_cluster_connection= NULL;
|
||||
|
||||
#ifdef HAVE_NDB_BINLOG
|
||||
{
|
||||
pthread_mutex_lock(&ndbcluster_mutex);
|
||||
for (uint i= 0; i < ndbcluster_open_tables.records; i++)
|
||||
{
|
||||
NDB_SHARE *share=
|
||||
(NDB_SHARE*) hash_element(&ndbcluster_open_tables, i);
|
||||
#ifndef DBUG_OFF
|
||||
fprintf(stderr, "NDB: table share %s with use_count %d not freed\n",
|
||||
share->key, share->use_count);
|
||||
#endif
|
||||
real_free_share(&share);
|
||||
}
|
||||
pthread_mutex_unlock(&ndbcluster_mutex);
|
||||
}
|
||||
#endif
|
||||
hash_free(&ndbcluster_open_tables);
|
||||
pthread_mutex_destroy(&ndbcluster_mutex);
|
||||
pthread_mutex_destroy(&LOCK_ndb_util_thread);
|
||||
@ -6843,11 +6859,10 @@ void ndbcluster_real_free_share(NDB_SHARE **share)
|
||||
#ifdef HAVE_NDB_BINLOG
|
||||
if ((*share)->table)
|
||||
{
|
||||
// (*share)->table->mem_root is freed by closefrm
|
||||
closefrm((*share)->table, 0);
|
||||
#if 0 // todo ?
|
||||
free_root(&(*share)->table->mem_root, MYF(0));
|
||||
#endif
|
||||
|
||||
// (*share)->table_share->mem_root is freed by free_table_share
|
||||
free_table_share((*share)->table_share);
|
||||
#ifndef DBUG_OFF
|
||||
bzero((gptr)(*share)->table_share, sizeof(*(*share)->table_share));
|
||||
bzero((gptr)(*share)->table, sizeof(*(*share)->table));
|
||||
|
Loading…
x
Reference in New Issue
Block a user