• unknown's avatar
    ndb - interface change of handling of abort option · 16c58c11
    unknown authored
    1) move AbortOption from NdbTransaction to NdbOperation
    
    2) let each operation have a "default" abort option dependant on
       operation type
    
       - read - AO_IgnoreError
       - dml - AbortOnError
       - scan take over - AbortOnError
    
    3) Changed default value to execute() from AbortOnError to DefaultAbortOption, which does not change the operations abort-option.
    
       Another value to execute(AO) is equivalent to setting AO on each operation before calling execute
    
    4) execute() does _only_ return -1 if transaction has been aborted
       otherwise, you need to check each operation for error code
    
    
    sql/ha_ndbcluster.cc:
      adopt to changes in aption option handling
    storage/ndb/include/ndbapi/NdbOperation.hpp:
      Move "ownership" of AbortOption to operation from transaction
    storage/ndb/include/ndbapi/NdbTransaction.hpp:
      Move "ownership" of AbortOption to operation from transaction
    storage/ndb/src/ndbapi/NdbBlob.cpp:
      Move "ownership" of AbortOption to operation from transaction
    storage/ndb/src/ndbapi/NdbIndexStat.cpp:
      Move "ownership" of AbortOption to operation from transaction
    storage/ndb/src/ndbapi/NdbOperationDefine.cpp:
      Put default value on abortoption dependant on operation type
    storage/ndb/src/ndbapi/NdbOperationExec.cpp:
      Move "ownership" of AbortOption to operation from transaction
    storage/ndb/src/ndbapi/NdbScanOperation.cpp:
      Move "ownership" of AbortOption to operation from transaction
    storage/ndb/src/ndbapi/NdbTransaction.cpp:
      Move "ownership" of AbortOption to operation from transaction
    storage/ndb/test/include/HugoOperations.hpp:
      Move "ownership" of AbortOption to operation from transaction
    storage/ndb/test/ndbapi/testNdbApi.cpp:
      Move "ownership" of AbortOption to operation from transaction
    storage/ndb/test/src/HugoOperations.cpp:
      Move "ownership" of AbortOption to operation from transaction
    16c58c11
NdbOperationExec.cpp 18.6 KB