Commit 66ef0f14 authored by unknown's avatar unknown
Browse files

merge


ndb/include/ndbapi/Ndb.hpp:
  Auto merged
ndb/src/ndbapi/Ndbif.cpp:
  Auto merged
ndb/src/ndbapi/Ndbinit.cpp:
  Auto merged
ndb/test/ndbapi/testNdbApi.cpp:
  Auto merged
ndb/test/run-test/daily-basic-tests.txt:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
parents fa02ee1a 2f2ab546
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -40,3 +40,22 @@ p u o
5	5	5
drop table t1;
drop table t2;
create table t1 (p int not null primary key, u int not null) engine=ndb;
insert into t1 values (1,1),(2,2),(3,3);
create table t2 as 
select t1.*
from t1 as t1, t1 as t2, t1 as t3, t1 as t4, t1 as t5, t1 as t6, t1 as t7, t1 as t8
where t1.u = t2.u
and t2.u = t3.u
and t3.u = t4.u
and t4.u = t5.u
and t5.u = t6.u
and t6.u = t7.u
and t7.u = t8.u;
select * from t2 order by 1;
p	u
1	1
2	2
3	3
drop table t1;
drop table t2;
+23 −0
Original line number Diff line number Diff line
@@ -37,3 +37,26 @@ drop table t1;
drop table t2;
# bug#5367
##########

###
# bug#11205
create table t1 (p int not null primary key, u int not null) engine=ndb;
insert into t1 values (1,1),(2,2),(3,3);

create table t2 as 
select t1.*
from t1 as t1, t1 as t2, t1 as t3, t1 as t4, t1 as t5, t1 as t6, t1 as t7, t1 as t8
where t1.u = t2.u
  and t2.u = t3.u
  and t3.u = t4.u
  and t4.u = t5.u
  and t5.u = t6.u
  and t6.u = t7.u
  and t7.u = t8.u;

select * from t2 order by 1;

drop table t1;
drop table t2;

+1 −1
Original line number Diff line number Diff line
@@ -1614,7 +1614,7 @@ private:
  Uint32                theNoOfPreparedTransactions;
  Uint32                theNoOfSentTransactions;
  Uint32                theNoOfCompletedTransactions;
  Uint32                theNoOfAllocatedTransactions;
  Uint32                theRemainingStartTransactions;
  Uint32                theMaxNoOfTransactions;
  Uint32                theMinNoOfEventsToWakeUp;

+9 −0
Original line number Diff line number Diff line
@@ -425,12 +425,20 @@ Ndb::startTransactionLocal(Uint32 aPriority, Uint32 nodeId)
  DBUG_ENTER("Ndb::startTransactionLocal");
  DBUG_PRINT("enter", ("nodeid: %d", nodeId));

  if(unlikely(theRemainingStartTransactions == 0))
  {
    theError.code = 4006;
    DBUG_RETURN(0);
  }
  
  NdbTransaction* tConnection;
  Uint64 tFirstTransId = theFirstTransId;
  tConnection = doConnect(nodeId);
  if (tConnection == NULL) {
    DBUG_RETURN(NULL);
  }//if

  theRemainingStartTransactions--;
  NdbTransaction* tConNext = theTransactionList;
  tConnection->init();
  theTransactionList = tConnection;        // into a transaction list.
@@ -481,6 +489,7 @@ Ndb::closeTransaction(NdbTransaction* aConnection)
  CHECK_STATUS_MACRO_VOID;
  
  tCon = theTransactionList;
  theRemainingStartTransactions++;
  
  DBUG_PRINT("info",("close trans: 0x%x transid: 0x%llx",
		     aConnection, aConnection->getTransactionId()));
+5 −1
Original line number Diff line number Diff line
@@ -89,15 +89,18 @@ int
NdbScanOperation::init(const NdbTableImpl* tab, NdbTransaction* myConnection)
{
  m_transConnection = myConnection;
  //NdbTransaction* aScanConnection = theNdb->startTransaction(myConnection);
  //NdbConnection* aScanConnection = theNdb->startTransaction(myConnection);
  theNdb->theRemainingStartTransactions++; // will be checked in hupp...
  NdbTransaction* aScanConnection = theNdb->hupp(myConnection);
  if (!aScanConnection){
    theNdb->theRemainingStartTransactions--;
    setErrorCodeAbort(theNdb->getNdbError().code);
    return -1;
  }

  // NOTE! The hupped trans becomes the owner of the operation
  if(NdbOperation::init(tab, aScanConnection) != 0){
    theNdb->theRemainingStartTransactions--;
    return -1;
  }
  
@@ -675,6 +678,7 @@ void NdbScanOperation::close(bool forceSend, bool releaseOp)
  
  tCon->theScanningOp = 0;
  theNdb->closeTransaction(tCon);
  theNdb->theRemainingStartTransactions--;
  DBUG_VOID_RETURN;
}

Loading