#At file:///u02/devl/bzr-tree/6.3-patch3/ based on revid:don.kehn@stripped
2751 Don Kehn 2008-11-14
Adds the check_ndb_connection to the ndb_util_thread_func
modified:
sql/ha_ndbcluster.cc
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc 2008-11-14 19:32:11 +0000
+++ b/sql/ha_ndbcluster.cc 2008-11-14 19:36:11 +0000
@@ -8048,6 +8048,8 @@ bool Thd_ndb::recycle_ndb(THD* thd)
DBUG_ENTER("recycle_ndb");
DBUG_PRINT("enter", ("ndb: 0x%lx", (long)ndb));
+ DBUG_ASSERT(global_schema_lock_trans == NULL);
+
delete ndb;
if ((ndb= new Ndb(connection, "")) == NULL)
{
@@ -8074,6 +8076,11 @@ bool Thd_ndb::recycle_ndb(THD* thd)
bool
Thd_ndb::valid_ndb(void)
{
+ // The ndb object should be valid as long as a
+ // global schema lock transaction is ongoing
+ if (global_schema_lock_trans)
+ return true;
+
if (unlikely(m_connect_count != connection->get_connect_count()))
return false;
return true;
| Thread |
|---|
| • bzr commit into mysql-5.1 branch (DonKehndon.kehn:2751) | DonKehndon.kehn | 14 Nov |