List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:February 23 2011 12:44pm
Subject:bzr push into mysql-5.1-telco-7.0 branch (jonas:4222 to 4223)
View as plain text  
 4223 Jonas Oreland	2011-02-23
      ndb - addition fix for bug-59723 also don't retry 711 in NdbEventOperation::execute()

    modified:
      storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
      storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp
      storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
 4222 Ole John Aske	2011-02-23
      Backport to 'telco' branches of cherry picked fix for 
      Bug#11766256  'GREEDY OPTIMIZER PRODUCE STUPID QUERY EXECUTION PLANS'
      
      Se original commit http://lists.mysql.com/commits/131862
      for comments related to this push.

    added:
      mysql-test/include/check_qep.inc
      mysql-test/include/expect_qep.inc
    modified:
      mysql-test/r/greedy_optimizer.result
      mysql-test/r/join.result
      mysql-test/r/status.result
      mysql-test/r/subselect.result
      mysql-test/t/greedy_optimizer.test
      sql/sql_select.cc
=== modified file 'storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp'
--- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2011-02-16 15:39:36 +0000
+++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2011-02-23 12:15:04 +0000
@@ -8022,7 +8022,7 @@ template class Vector<NdbTableImpl*>;
 template class Vector<NdbColumnImpl*>;
 
 int
-NdbDictionaryImpl::beginSchemaTrans()
+NdbDictionaryImpl::beginSchemaTrans(bool retry711)
 {
   DBUG_ENTER("beginSchemaTrans");
   if (m_tx.m_state == NdbDictInterface::Tx::Started) {
@@ -8042,7 +8042,7 @@ NdbDictionaryImpl::beginSchemaTrans()
   m_tx.m_error.code = 0;
   if (m_tx.m_transId == 0)
     m_tx.m_transId = 1;
-  int ret = m_receiver.beginSchemaTrans();
+  int ret = m_receiver.beginSchemaTrans(retry711);
   if (ret == -1) {
     m_tx.m_state = NdbDictInterface::Tx::NotStarted;
     DBUG_RETURN(-1);
@@ -8139,7 +8139,7 @@ NdbDictInterface::checkAllNodeVersionsMi
 
 
 int
-NdbDictInterface::beginSchemaTrans()
+NdbDictInterface::beginSchemaTrans(bool retry711)
 {
   assert(m_tx.m_op.size() == 0);
   NdbApiSignal tSignal(m_reference);
@@ -8157,9 +8157,10 @@ NdbDictInterface::beginSchemaTrans()
   int errCodes[] = {
     SchemaTransBeginRef::NotMaster,
     SchemaTransBeginRef::Busy,
-    SchemaTransBeginRef::BusyWithNR,
+    retry711 ? SchemaTransBeginRef::BusyWithNR : 0,
     0
   };
+
   int ret = dictSignal(
       &tSignal,
       0,

=== modified file 'storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp'
--- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp	2011-02-16 14:53:53 +0000
+++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp	2011-02-23 12:15:04 +0000
@@ -694,7 +694,7 @@ public:
   int get_hashmap(NdbHashMapImpl&, Uint32 id);
   int get_hashmap(NdbHashMapImpl&, const char * name);
 
-  int beginSchemaTrans();
+  int beginSchemaTrans(bool retry711 = true);
   int endSchemaTrans(Uint32 flags);
   Tx & m_tx; // shared with NdbDictionaryImpl
 
@@ -892,7 +892,7 @@ public:
   int createLogfileGroup(const NdbLogfileGroupImpl &, NdbDictObjectImpl*);
   int dropLogfileGroup(const NdbLogfileGroupImpl &);
 
-  int beginSchemaTrans();
+  int beginSchemaTrans(bool retry711 = true);
   int endSchemaTrans(Uint32 flags);
   bool hasSchemaTrans() const
     { return (m_tx.m_state == NdbDictInterface::Tx::Started); }

=== modified file 'storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp'
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2011-02-04 17:52:38 +0000
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2011-02-23 12:15:04 +0000
@@ -591,7 +591,7 @@ NdbEventOperationImpl::execute_nolock()
   bool schemaTrans = false;
   if (m_ndb->theEventBuffer->m_total_buckets == TOTAL_BUCKETS_INIT)
   {
-    int res = myDict->beginSchemaTrans();
+    int res = NdbDictionaryImpl::getImpl(* myDict).beginSchemaTrans(false);
     if (res != 0)
     {
       switch(myDict->getNdbError().code){

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (jonas:4222 to 4223) Jonas Oreland23 Feb