List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:October 20 2011 12:24pm
Subject:bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4606 to 4608)
View as plain text  
 4608 Jonas Oreland	2011-10-20
      ndb - always allow thread to see own transids

    modified:
      sql/ha_ndbcluster_connection.cc
 4607 Jonas Oreland	2011-10-20
      ndb - handle temporary error in testDict -n Bug57057. Seen once in autotest...why oh why can't we used the hugo-things..which has retries build in

    modified:
      storage/ndb/test/ndbapi/testDict.cpp
 4606 Jonas Oreland	2011-10-20
      ndb - don't suppress integral conversion warnings for ndb (and expect 50-100 new warnings on windows :)

    modified:
      support-files/compiler_warnings.supp
=== modified file 'sql/ha_ndbcluster_connection.cc'
--- a/sql/ha_ndbcluster_connection.cc	2011-10-17 12:43:31 +0000
+++ b/sql/ha_ndbcluster_connection.cc	2011-10-20 12:23:31 +0000
@@ -346,10 +346,8 @@ ndb_transid_mysql_connection_map_fill_ta
 {
   DBUG_ENTER("ndb_transid_mysql_connection_map_fill_table");
 
-  if (check_global_access(thd, PROCESS_ACL))
-  {
-    DBUG_RETURN(0);
-  }
+  const bool all = check_global_access(thd, PROCESS_ACL);
+  const ulonglong self = thd_get_thread_id(thd);
 
   TABLE* table= tables->table;
   for (uint i = 0; i<g_pool_alloc; i++)
@@ -360,16 +358,20 @@ ndb_transid_mysql_connection_map_fill_ta
       const Ndb * p = g_pool[i]->get_next_ndb_object(0);
       while (p)
       {
-        table->field[0]->set_notnull();
-        table->field[0]->store(p->getCustomData64(), true);
-        table->field[1]->set_notnull();
-        table->field[1]->store(g_pool[i]->node_id());
-        table->field[2]->set_notnull();
-        table->field[2]->store(p->getNextTransactionId(), true);
-        schema_table_store_record(thd, table);
-        p = g_pool[i]->get_next_ndb_object(p);
+        Uint64 connection_id = p->getCustomData64();
+        if ((connection_id == self) || all)
+        {
+          table->field[0]->set_notnull();
+          table->field[0]->store(p->getCustomData64(), true);
+          table->field[1]->set_notnull();
+          table->field[1]->store(g_pool[i]->node_id());
+          table->field[2]->set_notnull();
+          table->field[2]->store(p->getNextTransactionId(), true);
+          schema_table_store_record(thd, table);
+          p = g_pool[i]->get_next_ndb_object(p);
+        }
+        g_pool[i]->unlock_ndb_objects();
       }
-      g_pool[i]->unlock_ndb_objects();
     }
   }
 

=== modified file 'storage/ndb/test/ndbapi/testDict.cpp'
--- a/storage/ndb/test/ndbapi/testDict.cpp	2011-04-23 08:21:36 +0000
+++ b/storage/ndb/test/ndbapi/testDict.cpp	2011-10-20 12:21:10 +0000
@@ -8167,6 +8167,8 @@ runBug58277loadtable(NDBT_Context* ctx,
     int cnt = 0;
     for (int i = 0; i < rows; i++)
     {
+      int retries = 10;
+  retry:
       NdbTransaction* pTx = 0;
       CHK2((pTx = pNdb->startTransaction()) != 0, pNdb->getNdbError());
 
@@ -8183,7 +8185,19 @@ runBug58277loadtable(NDBT_Context* ctx,
         int x[] = {
          -630
         };
-        CHK3(pTx->execute(Commit) == 0, pTx->getNdbError(), x);
+        int res = pTx->execute(Commit);
+        if (res != 0 &&
+            pTx->getNdbError().status == NdbError::TemporaryError)
+        {
+          retries--;
+          if (retries >= 0)
+          {
+            pTx->close();
+            NdbSleep_MilliSleep(10);
+            goto retry;
+          }
+        }
+        CHK3(res == 0, pTx->getNdbError(), x);
         cnt++;
       }
       while (0);

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4606 to 4608) Jonas Oreland20 Oct