List:Commits« Previous MessageNext Message »
From:tomas Date:September 7 2007 4:28am
Subject:bk commit into 5.1 tree (tomas:1.2607)
View as plain text  
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@stripped, 2007-09-07 06:28:51+02:00, tomas@stripped +1 -0
  listEvents not to use local dict cache so it can be used by the mysqld

  storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp@stripped, 2007-09-07 06:28:48+02:00, tomas@stripped +13 -9
    listEvents not to use local dict cache so it can be used by the mysqld

diff -Nrup a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
--- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2007-09-06 22:05:43 +02:00
+++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2007-09-07 06:28:48 +02:00
@@ -4319,7 +4319,7 @@ static int scanEventTable(Ndb* pNdb, 
 
     Uint64 row_count = 0;
     {
-      if ((pOp = pTrans->getNdbScanOperation(pTab->getName())) == NULL)
+      if ((pOp = pTrans->getNdbScanOperation(pTab)) == NULL)
         goto error;
       if (pOp->readTuples(NdbScanOperation::LM_CommittedRead, 0, 1) != 0)
         goto error;
@@ -4343,7 +4343,7 @@ static int scanEventTable(Ndb* pNdb, 
       }
     }
 
-    if ((pOp = pTrans->getNdbScanOperation(pTab->getName())) == NULL)
+    if ((pOp = pTrans->getNdbScanOperation(pTab)) == NULL)
       goto error;
 
     if (pOp->readTuples(NdbScanOperation::LM_CommittedRead, 0, 1) != 0)
@@ -4427,14 +4427,18 @@ NdbDictionaryImpl::listEvents(List& list
 
   m_ndb.setDatabaseName("sys");
   m_ndb.setDatabaseSchemaName("def");
+  {
+    const NdbDictionary::Table* pTab =
+      m_facade->getTableGlobal("NDB$EVENTS_0");
 
-  const NdbDictionary::Table* pTab =
-    m_facade->getTable("NDB$EVENTS_0");
-
-  if(pTab == NULL)
-    error_code = m_facade->getNdbError().code;
-  else
-    error_code = scanEventTable(&m_ndb, pTab, list);
+    if(pTab == NULL)
+      error_code = m_facade->getNdbError().code;
+    else
+    {     
+      error_code = scanEventTable(&m_ndb, pTab, list);
+      m_facade->removeTableGlobal(*pTab, 0);
+    }
+  }
 
   m_ndb.setDatabaseName(currentDb.c_str());
   m_ndb.setDatabaseSchemaName(currentSchema.c_str());
Thread
bk commit into 5.1 tree (tomas:1.2607)tomas7 Sep