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.2422 07/02/05 13:22:33 tomas@stripped +2 -0
Merge poseidon.mysql.com:/home/tomas/mysql-5.1-telco-cga
into poseidon.mysql.com:/home/tomas/mysql-5.1-new-ndb
sql/ha_ndbcluster_binlog.cc
1.99 07/02/05 13:22:21 tomas@stripped +0 -0
Auto merged
sql/ha_ndbcluster.cc
1.401 07/02/05 13:22:21 tomas@stripped +0 -0
Auto merged
# 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.mysql.com
# Root: /home/tomas/mysql-5.1-new-ndb/RESYNC
--- 1.400/sql/ha_ndbcluster.cc 2007-02-05 12:19:17 +07:00
+++ 1.401/sql/ha_ndbcluster.cc 2007-02-05 13:22:21 +07:00
@@ -6831,7 +6831,7 @@
fprintf(stderr, "NDB: table share %s with use_count %d not freed\n",
share->key, share->use_count);
#endif
- real_free_share(&share);
+ ndbcluster_real_free_share(&share);
}
pthread_mutex_unlock(&ndbcluster_mutex);
}
@@ -7443,14 +7443,20 @@
bzero((char*) &table_list,sizeof(table_list));
table_list.db= share->db;
table_list.alias= table_list.table_name= share->table_name;
+ safe_mutex_assert_owner(&LOCK_open);
close_cached_tables(thd, 0, &table_list, TRUE);
pthread_mutex_lock(&ndbcluster_mutex);
if (!--share->use_count)
{
- DBUG_PRINT("info", ("NDB_SHARE: close_cashed_tables %s freed share.",
- share->key));
- real_free_share(&share);
+ if (ndb_extra_logging)
+ sql_print_information("NDB_SHARE: trailing share %s(connect_count: %u) "
+ "released by close_cached_tables at "
+ "connect_count: %u",
+ share->key,
+ share->connect_count,
+ g_ndb_cluster_connection->get_connect_count());
+ ndbcluster_real_free_share(&share);
DBUG_RETURN(0);
}
@@ -7460,10 +7466,14 @@
*/
if (share->state != NSS_DROPPED && !--share->use_count)
{
- DBUG_PRINT("info", ("NDB_SHARE: %s already exists, "
- "use_count=%d state != NSS_DROPPED.",
- share->key, share->use_count));
- real_free_share(&share);
+ if (ndb_extra_logging)
+ sql_print_information("NDB_SHARE: trailing share %s(connect_count: %u) "
+ "released after NSS_DROPPED check "
+ "at connect_count: %u",
+ share->key,
+ share->connect_count,
+ g_ndb_cluster_connection->get_connect_count());
+ ndbcluster_real_free_share(&share);
DBUG_RETURN(0);
}
DBUG_PRINT("error", ("NDB_SHARE: %s already exists use_count=%d.",
@@ -7729,7 +7739,7 @@
(*share)->util_lock= 0;
if (!--(*share)->use_count)
{
- real_free_share(share);
+ ndbcluster_real_free_share(share);
}
else
{
--- 1.98/sql/ha_ndbcluster_binlog.cc 2007-02-05 13:10:13 +07:00
+++ 1.99/sql/ha_ndbcluster_binlog.cc 2007-02-05 13:22:21 +07:00
@@ -362,6 +362,8 @@
int do_event_op= ndb_binlog_running;
DBUG_ENTER("ndbcluster_binlog_init_share");
+ share->connect_count= g_ndb_cluster_connection->get_connect_count();
+
share->op= 0;
share->table= 0;
@@ -605,7 +607,7 @@
("table->s->db.table_name: %s.%s",
share->table->s->db.str, share->table->s->table_name.str));
if (share->state != NSS_DROPPED && !--share->use_count)
- real_free_share(&share);
+ ndbcluster_real_free_share(&share);
else
{
DBUG_PRINT("share",
@@ -2443,11 +2445,20 @@
pthread_mutex_unlock(&ndbcluster_mutex);
DBUG_RETURN(1);
}
- handle_trailing_share(share);
+ if (share->connect_count !=
+ g_ndb_cluster_connection->get_connect_count())
+ {
+ handle_trailing_share(share);
+ share= NULL;
+ }
}
/* Create share which is needed to hold replication information */
- if (!(share= get_share(key, 0, TRUE, TRUE)))
+ if (share)
+ {
+ ++share->use_count;
+ }
+ else if (!(share= get_share(key, 0, TRUE, TRUE)))
{
sql_print_error("NDB Binlog: "
"allocating table share for %s failed", key);
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2422) | tomas | 5 Feb |