Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2161 06/03/07 12:19:27 tomas@stripped +1 -0
Bug #16874 memory leaks in rpl_row_basic_7ndb.test
- free ndb shares at server shutdown
- free_table_share at free of ndb_share
sql/ha_ndbcluster.cc
1.280 06/03/07 12:19:20 tomas@stripped +19 -4
Bug #16874 memory leaks in rpl_row_basic_7ndb.test
- free ndb shares at server shutdown
- free_table_share at free of ndb_share
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: tomas
# Host: poseidon.ndb.mysql.com
# Root: /home/tomas/mysql-5.1-new
--- 1.279/sql/ha_ndbcluster.cc 2006-03-01 18:23:59 +01:00
+++ 1.280/sql/ha_ndbcluster.cc 2006-03-07 12:19:20 +01:00
@@ -5995,6 +5995,22 @@
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 @@
#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));
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2161) BUG#16874 | tomas | 7 Mar |