Commit c4de1e0d authored by unknown's avatar unknown

Merge mysql.com:/home/stewart/Documents/MySQL/5.0/ndb

into mysql.com:/home/stewart/Documents/MySQL/5.0/ndb-dynamic-port

parents 839e6a24 1d32cbb1
...@@ -94,6 +94,7 @@ jcole@sarvik.tfr.cafe.ee ...@@ -94,6 +94,7 @@ jcole@sarvik.tfr.cafe.ee
jcole@tetra.spaceapes.com jcole@tetra.spaceapes.com
jimw@mysql.com jimw@mysql.com
joerg@mysql.com joerg@mysql.com
jon@gigan.
joreland@mysql.com joreland@mysql.com
jorge@linux.jorge.mysql.com jorge@linux.jorge.mysql.com
jplindst@t41.(none) jplindst@t41.(none)
......
...@@ -532,7 +532,7 @@ os_mem_alloc_large( ...@@ -532,7 +532,7 @@ os_mem_alloc_large(
ibool assert_on_error) /* in: if TRUE, we crash mysqld if the memory ibool assert_on_error) /* in: if TRUE, we crash mysqld if the memory
cannot be allocated */ cannot be allocated */
{ {
#ifdef UNIV_LINUX #ifdef HAVE_LARGE_PAGES
ulint size; ulint size;
int shmid; int shmid;
void *ptr = NULL; void *ptr = NULL;
...@@ -542,6 +542,7 @@ os_mem_alloc_large( ...@@ -542,6 +542,7 @@ os_mem_alloc_large(
goto skip; goto skip;
} }
#ifdef UNIV_LINUX
/* Align block size to os_large_page_size */ /* Align block size to os_large_page_size */
size = ((n - 1) & ~(os_large_page_size - 1)) + os_large_page_size; size = ((n - 1) & ~(os_large_page_size - 1)) + os_large_page_size;
...@@ -561,6 +562,7 @@ os_mem_alloc_large( ...@@ -561,6 +562,7 @@ os_mem_alloc_large(
*/ */
shmctl(shmid, IPC_RMID, &buf); shmctl(shmid, IPC_RMID, &buf);
} }
#endif
if (ptr) { if (ptr) {
if (set_to_zero) { if (set_to_zero) {
...@@ -573,8 +575,8 @@ os_mem_alloc_large( ...@@ -573,8 +575,8 @@ os_mem_alloc_large(
} }
fprintf(stderr, "InnoDB HugeTLB: Warning: Using conventional memory pool\n"); fprintf(stderr, "InnoDB HugeTLB: Warning: Using conventional memory pool\n");
#endif
skip: skip:
#endif /* HAVE_LARGE_PAGES */
return(ut_malloc_low(n, set_to_zero, assert_on_error)); return(ut_malloc_low(n, set_to_zero, assert_on_error));
} }
...@@ -587,8 +589,12 @@ os_mem_free_large( ...@@ -587,8 +589,12 @@ os_mem_free_large(
/*=================*/ /*=================*/
void *ptr) /* in: number of bytes */ void *ptr) /* in: number of bytes */
{ {
#ifdef HAVE_LARGE_PAGES
if (os_use_large_pages && os_large_page_size
#ifdef UNIV_LINUX #ifdef UNIV_LINUX
if (os_use_large_pages && os_large_page_size && !shmdt(ptr)) { && !shmdt(ptr)
#endif
) {
return; return;
} }
#endif #endif
......
...@@ -59,7 +59,7 @@ EXTRACT_PRIVATE = NO ...@@ -59,7 +59,7 @@ EXTRACT_PRIVATE = NO
# If the EXTRACT_STATIC tag is set to YES all static members of a file # If the EXTRACT_STATIC tag is set to YES all static members of a file
# will be included in the documentation. # will be included in the documentation.
EXTRACT_STATIC = NO EXTRACT_STATIC = YES
# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
# undocumented members of documented classes, files or namespaces. # undocumented members of documented classes, files or namespaces.
...@@ -146,7 +146,7 @@ HIDE_SCOPE_NAMES = NO ...@@ -146,7 +146,7 @@ HIDE_SCOPE_NAMES = NO
# will generate a verbatim copy of the header file for each class for # will generate a verbatim copy of the header file for each class for
# which an include is specified. Set to NO to disable this. # which an include is specified. Set to NO to disable this.
VERBATIM_HEADERS = YES VERBATIM_HEADERS = NO
# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
# will put list of the files that are included by a file in the documentation # will put list of the files that are included by a file in the documentation
......
...@@ -52,7 +52,7 @@ EXTRACT_ALL = YES ...@@ -52,7 +52,7 @@ EXTRACT_ALL = YES
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class # If the EXTRACT_PRIVATE tag is set to YES all private members of a class
# will be included in the documentation. # will be included in the documentation.
EXTRACT_PRIVATE = YES EXTRACT_PRIVATE = NO
# If the EXTRACT_STATIC tag is set to YES all static members of a file # If the EXTRACT_STATIC tag is set to YES all static members of a file
# will be included in the documentation. # will be included in the documentation.
...@@ -157,7 +157,7 @@ HIDE_SCOPE_NAMES = NO ...@@ -157,7 +157,7 @@ HIDE_SCOPE_NAMES = NO
# will generate a verbatim copy of the header file for each class for # will generate a verbatim copy of the header file for each class for
# which an include is specified. Set to NO to disable this. # which an include is specified. Set to NO to disable this.
VERBATIM_HEADERS = YES VERBATIM_HEADERS = NO
# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
# will put list of the files that are included by a file in the documentation # will put list of the files that are included by a file in the documentation
......
...@@ -59,7 +59,7 @@ EXTRACT_PRIVATE = NO ...@@ -59,7 +59,7 @@ EXTRACT_PRIVATE = NO
# If the EXTRACT_STATIC tag is set to YES all static members of a file # If the EXTRACT_STATIC tag is set to YES all static members of a file
# will be included in the documentation. # will be included in the documentation.
EXTRACT_STATIC = NO EXTRACT_STATIC = YES
# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
# undocumented members of documented classes, files or namespaces. # undocumented members of documented classes, files or namespaces.
...@@ -146,7 +146,7 @@ HIDE_SCOPE_NAMES = NO ...@@ -146,7 +146,7 @@ HIDE_SCOPE_NAMES = NO
# will generate a verbatim copy of the header file for each class for # will generate a verbatim copy of the header file for each class for
# which an include is specified. Set to NO to disable this. # which an include is specified. Set to NO to disable this.
VERBATIM_HEADERS = YES VERBATIM_HEADERS = NO
# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
# will put list of the files that are included by a file in the documentation # will put list of the files that are included by a file in the documentation
......
...@@ -52,7 +52,7 @@ EXTRACT_ALL = YES ...@@ -52,7 +52,7 @@ EXTRACT_ALL = YES
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class # If the EXTRACT_PRIVATE tag is set to YES all private members of a class
# will be included in the documentation. # will be included in the documentation.
EXTRACT_PRIVATE = YES EXTRACT_PRIVATE = NO
# If the EXTRACT_STATIC tag is set to YES all static members of a file # If the EXTRACT_STATIC tag is set to YES all static members of a file
# will be included in the documentation. # will be included in the documentation.
...@@ -157,7 +157,7 @@ HIDE_SCOPE_NAMES = NO ...@@ -157,7 +157,7 @@ HIDE_SCOPE_NAMES = NO
# will generate a verbatim copy of the header file for each class for # will generate a verbatim copy of the header file for each class for
# which an include is specified. Set to NO to disable this. # which an include is specified. Set to NO to disable this.
VERBATIM_HEADERS = YES VERBATIM_HEADERS = NO
# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
# will put list of the files that are included by a file in the documentation # will put list of the files that are included by a file in the documentation
......
...@@ -52,7 +52,7 @@ EXTRACT_ALL = YES ...@@ -52,7 +52,7 @@ EXTRACT_ALL = YES
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class # If the EXTRACT_PRIVATE tag is set to YES all private members of a class
# will be included in the documentation. # will be included in the documentation.
EXTRACT_PRIVATE = YES EXTRACT_PRIVATE = NO
# If the EXTRACT_STATIC tag is set to YES all static members of a file # If the EXTRACT_STATIC tag is set to YES all static members of a file
# will be included in the documentation. # will be included in the documentation.
...@@ -157,7 +157,7 @@ HIDE_SCOPE_NAMES = NO ...@@ -157,7 +157,7 @@ HIDE_SCOPE_NAMES = NO
# will generate a verbatim copy of the header file for each class for # will generate a verbatim copy of the header file for each class for
# which an include is specified. Set to NO to disable this. # which an include is specified. Set to NO to disable this.
VERBATIM_HEADERS = YES VERBATIM_HEADERS = NO
# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
# will put list of the files that are included by a file in the documentation # will put list of the files that are included by a file in the documentation
......
This diff is collapsed.
...@@ -31,6 +31,8 @@ class Ndb; ...@@ -31,6 +31,8 @@ class Ndb;
class NdbBlob; class NdbBlob;
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
// to be documented later
/** /**
* NdbAsynchCallback functions are used when executing asynchronous * NdbAsynchCallback functions are used when executing asynchronous
* transactions (using NdbConnection::executeAsynchPrepare, or * transactions (using NdbConnection::executeAsynchPrepare, or
...@@ -39,6 +41,7 @@ class NdbBlob; ...@@ -39,6 +41,7 @@ class NdbBlob;
* See @ref secAsync for more information. * See @ref secAsync for more information.
*/ */
typedef void (* NdbAsynchCallback)(int, NdbConnection*, void*); typedef void (* NdbAsynchCallback)(int, NdbConnection*, void*);
#endif
/** /**
* Commit type of transaction * Commit type of transaction
...@@ -184,7 +187,8 @@ public: ...@@ -184,7 +187,8 @@ public:
* @note All operations within the same transaction need to * @note All operations within the same transaction need to
* be initialized with this method. * be initialized with this method.
* *
* @param aTable A table object (fetched by NdbDictionary::Dictionary::getTable) * @param aTable
* A table object (fetched by NdbDictionary::Dictionary::getTable)
* @return Pointer to an NdbOperation object if successful, otherwise NULL. * @return Pointer to an NdbOperation object if successful, otherwise NULL.
*/ */
NdbOperation* getNdbOperation(const NdbDictionary::Table * aTable); NdbOperation* getNdbOperation(const NdbDictionary::Table * aTable);
...@@ -204,7 +208,8 @@ public: ...@@ -204,7 +208,8 @@ public:
* get the NdbConnection object which * get the NdbConnection object which
* was fetched by startTransaction pointing to this operation. * was fetched by startTransaction pointing to this operation.
* *
* @param aTable A table object (fetched by NdbDictionary::Dictionary::getTable) * @param aTable
* A table object (fetched by NdbDictionary::Dictionary::getTable)
* @return pointer to an NdbOperation object if successful, otherwise NULL * @return pointer to an NdbOperation object if successful, otherwise NULL
*/ */
NdbScanOperation* getNdbScanOperation(const NdbDictionary::Table * aTable); NdbScanOperation* getNdbScanOperation(const NdbDictionary::Table * aTable);
...@@ -226,11 +231,14 @@ public: ...@@ -226,11 +231,14 @@ public:
* get the NdbConnection object which * get the NdbConnection object which
* was fetched by startTransaction pointing to this operation. * was fetched by startTransaction pointing to this operation.
* *
* @param anIndex An index object (fetched by NdbDictionary::Dictionary::getIndex). * @param anIndex
* @param aTable A table object (fetched by NdbDictionary::Dictionary::getTable). An index object (fetched by NdbDictionary::Dictionary::getIndex).
* @param aTable
A table object (fetched by NdbDictionary::Dictionary::getTable).
* @return pointer to an NdbOperation object if successful, otherwise NULL * @return pointer to an NdbOperation object if successful, otherwise NULL
*/ */
NdbIndexScanOperation* getNdbIndexScanOperation(const NdbDictionary::Index * anIndex, NdbIndexScanOperation* getNdbIndexScanOperation
(const NdbDictionary::Index * anIndex,
const NdbDictionary::Table * aTable); const NdbDictionary::Table * aTable);
/** /**
...@@ -251,8 +259,10 @@ public: ...@@ -251,8 +259,10 @@ public:
* get the NdbConnection object that * get the NdbConnection object that
* was fetched by startTransaction pointing to this operation. * was fetched by startTransaction pointing to this operation.
* *
* @param anIndex An index object (fetched by NdbDictionary::Dictionary::getIndex). * @param anIndex
* @param aTable A table object (fetched by NdbDictionary::Dictionary::getTable). * An index object (fetched by NdbDictionary::Dictionary::getIndex).
* @param aTable
* A table object (fetched by NdbDictionary::Dictionary::getTable).
* @return Pointer to an NdbIndexOperation object if * @return Pointer to an NdbIndexOperation object if
* successful, otherwise NULL * successful, otherwise NULL
*/ */
...@@ -289,6 +299,8 @@ public: ...@@ -289,6 +299,8 @@ public:
AbortOption abortOption = AbortOnError, AbortOption abortOption = AbortOnError,
int force = 0 ); int force = 0 );
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
// to be documented later
/** /**
* Prepare an asynchronous transaction. * Prepare an asynchronous transaction.
* *
...@@ -334,7 +346,7 @@ public: ...@@ -334,7 +346,7 @@ public:
NdbAsynchCallback aCallback, NdbAsynchCallback aCallback,
void* anyObject, void* anyObject,
AbortOption abortOption = AbortOnError); AbortOption abortOption = AbortOnError);
#endif
/** /**
* Refresh * Refresh
* Update timeout counter of this transaction * Update timeout counter of this transaction
......
...@@ -166,7 +166,7 @@ public: ...@@ -166,7 +166,7 @@ public:
* The builtin column types * The builtin column types
*/ */
enum Type { enum Type {
Undefined=0,///< Undefined Undefined=0, ///< Undefined
Tinyint, ///< 8 bit. 1 byte signed integer, can be used in array Tinyint, ///< 8 bit. 1 byte signed integer, can be used in array
Tinyunsigned, ///< 8 bit. 1 byte unsigned integer, can be used in array Tinyunsigned, ///< 8 bit. 1 byte unsigned integer, can be used in array
Smallint, ///< 16 bit. 2 byte signed integer, can be used in array Smallint, ///< 16 bit. 2 byte signed integer, can be used in array
...@@ -374,16 +374,11 @@ public: ...@@ -374,16 +374,11 @@ public:
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
const Table * getBlobTable() const; const Table * getBlobTable() const;
/**
* @name ODBC Specific methods
* @{
*/
void setAutoIncrement(bool); void setAutoIncrement(bool);
bool getAutoIncrement() const; bool getAutoIncrement() const;
void setAutoIncrementInitialValue(Uint64 val); void setAutoIncrementInitialValue(Uint64 val);
void setDefaultValue(const char*); void setDefaultValue(const char*);
const char* getDefaultValue() const; const char* getDefaultValue() const;
/** @} *******************************************************************/
static const Column * FRAGMENT; static const Column * FRAGMENT;
static const Column * ROW_COUNT; static const Column * ROW_COUNT;
......
...@@ -125,6 +125,16 @@ int runCreateTheTable(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -125,6 +125,16 @@ int runCreateTheTable(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_OK; return NDBT_OK;
} }
int runDropTheTable(NDBT_Context* ctx, NDBT_Step* step){
Ndb* pNdb = GETNDB(step);
const NdbDictionary::Table* pTab = ctx->getTab();
// Try to create table in db
pNdb->getDictionary()->dropTable(pTab->getName());
return NDBT_OK;
}
int runCreateTableWhenDbIsFull(NDBT_Context* ctx, NDBT_Step* step){ int runCreateTableWhenDbIsFull(NDBT_Context* ctx, NDBT_Step* step){
Ndb* pNdb = GETNDB(step); Ndb* pNdb = GETNDB(step);
int result = NDBT_OK; int result = NDBT_OK;
...@@ -1584,7 +1594,7 @@ TESTCASE("CreateTableWhenDbIsFull", ...@@ -1584,7 +1594,7 @@ TESTCASE("CreateTableWhenDbIsFull",
INITIALIZER(runFillTable); INITIALIZER(runFillTable);
INITIALIZER(runCreateTableWhenDbIsFull); INITIALIZER(runCreateTableWhenDbIsFull);
INITIALIZER(runDropTableWhenDbIsFull); INITIALIZER(runDropTableWhenDbIsFull);
FINALIZER(runClearTable); FINALIZER(runDropTheTable);
} }
TESTCASE("FragmentTypeSingle", TESTCASE("FragmentTypeSingle",
"Create the table with fragment type Single\n"){ "Create the table with fragment type Single\n"){
......
...@@ -1277,7 +1277,7 @@ TESTCASE("CreateLoadDrop_O", ...@@ -1277,7 +1277,7 @@ TESTCASE("CreateLoadDrop_O",
TESTCASE("NFNR1", TESTCASE("NFNR1",
"Test that indexes are correctly maintained during node fail and node restart"){ "Test that indexes are correctly maintained during node fail and node restart"){
TC_PROPERTY("LoggedIndexes", (unsigned)0); TC_PROPERTY("LoggedIndexes", (unsigned)0);
//TC_PROPERTY("Threads", 2); TC_PROPERTY("PauseThreads", 2);
INITIALIZER(runClearTable); INITIALIZER(runClearTable);
INITIALIZER(createRandomIndex); INITIALIZER(createRandomIndex);
INITIALIZER(runLoadTable); INITIALIZER(runLoadTable);
...@@ -1292,6 +1292,7 @@ TESTCASE("NFNR1_O", ...@@ -1292,6 +1292,7 @@ TESTCASE("NFNR1_O",
"Test that indexes are correctly maintained during node fail and node restart"){ "Test that indexes are correctly maintained during node fail and node restart"){
TC_PROPERTY("OrderedIndex", 1); TC_PROPERTY("OrderedIndex", 1);
TC_PROPERTY("LoggedIndexes", (unsigned)0); TC_PROPERTY("LoggedIndexes", (unsigned)0);
TC_PROPERTY("PauseThreads", 2);
INITIALIZER(runClearTable); INITIALIZER(runClearTable);
INITIALIZER(createRandomIndex); INITIALIZER(createRandomIndex);
INITIALIZER(runLoadTable); INITIALIZER(runLoadTable);
...@@ -1305,6 +1306,7 @@ TESTCASE("NFNR1_O", ...@@ -1305,6 +1306,7 @@ TESTCASE("NFNR1_O",
TESTCASE("NFNR2", TESTCASE("NFNR2",
"Test that indexes are correctly maintained during node fail and node restart"){ "Test that indexes are correctly maintained during node fail and node restart"){
TC_PROPERTY("LoggedIndexes", (unsigned)0); TC_PROPERTY("LoggedIndexes", (unsigned)0);
TC_PROPERTY("PauseThreads", 2);
INITIALIZER(runClearTable); INITIALIZER(runClearTable);
INITIALIZER(createRandomIndex); INITIALIZER(createRandomIndex);
INITIALIZER(createPkIndex); INITIALIZER(createPkIndex);
...@@ -1321,6 +1323,7 @@ TESTCASE("NFNR2_O", ...@@ -1321,6 +1323,7 @@ TESTCASE("NFNR2_O",
"Test that indexes are correctly maintained during node fail and node restart"){ "Test that indexes are correctly maintained during node fail and node restart"){
TC_PROPERTY("OrderedIndex", 1); TC_PROPERTY("OrderedIndex", 1);
TC_PROPERTY("LoggedIndexes", (unsigned)0); TC_PROPERTY("LoggedIndexes", (unsigned)0);
TC_PROPERTY("PauseThreads", 2);
INITIALIZER(runClearTable); INITIALIZER(runClearTable);
INITIALIZER(createRandomIndex); INITIALIZER(createRandomIndex);
INITIALIZER(createPkIndex); INITIALIZER(createPkIndex);
...@@ -1336,6 +1339,7 @@ TESTCASE("NFNR2_O", ...@@ -1336,6 +1339,7 @@ TESTCASE("NFNR2_O",
TESTCASE("NFNR3", TESTCASE("NFNR3",
"Test that indexes are correctly maintained during node fail and node restart"){ "Test that indexes are correctly maintained during node fail and node restart"){
TC_PROPERTY("LoggedIndexes", (unsigned)0); TC_PROPERTY("LoggedIndexes", (unsigned)0);
TC_PROPERTY("PauseThreads", 2);
INITIALIZER(runClearTable); INITIALIZER(runClearTable);
INITIALIZER(createRandomIndex); INITIALIZER(createRandomIndex);
INITIALIZER(createPkIndex); INITIALIZER(createPkIndex);
...@@ -1351,6 +1355,7 @@ TESTCASE("NFNR3_O", ...@@ -1351,6 +1355,7 @@ TESTCASE("NFNR3_O",
"Test that indexes are correctly maintained during node fail and node restart"){ "Test that indexes are correctly maintained during node fail and node restart"){
TC_PROPERTY("OrderedIndex", 1); TC_PROPERTY("OrderedIndex", 1);
TC_PROPERTY("LoggedIndexes", (unsigned)0); TC_PROPERTY("LoggedIndexes", (unsigned)0);
TC_PROPERTY("PauseThreads", 2);
INITIALIZER(runClearTable); INITIALIZER(runClearTable);
INITIALIZER(createRandomIndex); INITIALIZER(createRandomIndex);
INITIALIZER(createPkIndex); INITIALIZER(createPkIndex);
...@@ -1365,6 +1370,7 @@ TESTCASE("NFNR3_O", ...@@ -1365,6 +1370,7 @@ TESTCASE("NFNR3_O",
TESTCASE("NFNR4", TESTCASE("NFNR4",
"Test that indexes are correctly maintained during node fail and node restart"){ "Test that indexes are correctly maintained during node fail and node restart"){
TC_PROPERTY("LoggedIndexes", (unsigned)0); TC_PROPERTY("LoggedIndexes", (unsigned)0);
TC_PROPERTY("PauseThreads", 4);
INITIALIZER(runClearTable); INITIALIZER(runClearTable);
INITIALIZER(createRandomIndex); INITIALIZER(createRandomIndex);
INITIALIZER(createPkIndex); INITIALIZER(createPkIndex);
...@@ -1383,6 +1389,7 @@ TESTCASE("NFNR4_O", ...@@ -1383,6 +1389,7 @@ TESTCASE("NFNR4_O",
"Test that indexes are correctly maintained during node fail and node restart"){ "Test that indexes are correctly maintained during node fail and node restart"){
TC_PROPERTY("OrderedIndex", 1); TC_PROPERTY("OrderedIndex", 1);
TC_PROPERTY("LoggedIndexes", (unsigned)0); TC_PROPERTY("LoggedIndexes", (unsigned)0);
TC_PROPERTY("PauseThreads", 4);
INITIALIZER(runClearTable); INITIALIZER(runClearTable);
INITIALIZER(createRandomIndex); INITIALIZER(createRandomIndex);
INITIALIZER(createPkIndex); INITIALIZER(createPkIndex);
......
...@@ -799,13 +799,13 @@ int runUpdateWithoutValues(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -799,13 +799,13 @@ int runUpdateWithoutValues(NDBT_Context* ctx, NDBT_Step* step){
// Dont' call any setValues // Dont' call any setValues
// Execute should not work // Execute should work
int check = pCon->execute(Commit); int check = pCon->execute(Commit);
if (check == 0){ if (check == 0){
ndbout << "execute worked" << endl; ndbout << "execute worked" << endl;
result = NDBT_FAILED;
} else { } else {
ERR(pCon->getNdbError()); ERR(pCon->getNdbError());
result = NDBT_FAILED;
} }
pNdb->closeTransaction(pCon); pNdb->closeTransaction(pCon);
......
...@@ -465,9 +465,73 @@ max-time: 150000 ...@@ -465,9 +465,73 @@ max-time: 150000
cmd: testOperations cmd: testOperations
args: args:
max-time: 150000 max-time: 1500
cmd: testTransactions cmd: testTransactions
args: args: T1
max-time: 1500
cmd: testTransactions
args: T2
max-time: 1500
cmd: testTransactions
args: T3
max-time: 1500
cmd: testTransactions
args: T4
max-time: 1500
cmd: testTransactions
args: T5
max-time: 1500
cmd: testTransactions
args: T6
max-time: 1500
cmd: testTransactions
args: T7
max-time: 1500
cmd: testTransactions
args: T8
max-time: 1500
cmd: testTransactions
args: T9
max-time: 1500
cmd: testTransactions
args: T10
max-time: 1500
cmd: testTransactions
args: T11
max-time: 1500
cmd: testTransactions
args: T12
max-time: 1500
cmd: testTransactions
args: T13
max-time: 1500
cmd: testTransactions
args: T14
max-time: 1500
cmd: testTransactions
args: I1
max-time: 1500
cmd: testTransactions
args: I2
max-time: 1500
cmd: testTransactions
args: I3
max-time: 1500 max-time: 1500
cmd: testRestartGci cmd: testRestartGci
...@@ -477,7 +541,7 @@ max-time: 600 ...@@ -477,7 +541,7 @@ max-time: 600
cmd: testBlobs cmd: testBlobs
args: args:
max-time: 2500 max-time: 5000
cmd: testOIBasic cmd: testOIBasic
args: args:
......
...@@ -1097,7 +1097,7 @@ HugoTransactions::pkReadRecords(Ndb* pNdb, ...@@ -1097,7 +1097,7 @@ HugoTransactions::pkReadRecords(Ndb* pNdb,
pNdb->closeTransaction(pTrans); pNdb->closeTransaction(pTrans);
return NDBT_FAILED; return NDBT_FAILED;
} }
} else{ } else {
if(pIndexScanOp) if(pIndexScanOp)
{ {
int rows_found = 0; int rows_found = 0;
...@@ -1759,7 +1759,7 @@ HugoTransactions::indexReadRecords(Ndb* pNdb, ...@@ -1759,7 +1759,7 @@ HugoTransactions::indexReadRecords(Ndb* pNdb,
pNdb->closeTransaction(pTrans); pNdb->closeTransaction(pTrans);
return NDBT_FAILED; return NDBT_FAILED;
} }
check = 0; check = sOp->readTuples();
} }
if( check == -1 ) { if( check == -1 ) {
...@@ -1948,7 +1948,7 @@ HugoTransactions::indexUpdateRecords(Ndb* pNdb, ...@@ -1948,7 +1948,7 @@ HugoTransactions::indexUpdateRecords(Ndb* pNdb,
} }
if(ordered && check != 0){ if(ordered && check != 0){
g_err << "Row: " << r << " not found!!" << endl; g_err << check << " - Row: " << r << " not found!!" << endl;
pNdb->closeTransaction(pTrans); pNdb->closeTransaction(pTrans);
return NDBT_FAILED; return NDBT_FAILED;
} }
......
...@@ -629,7 +629,7 @@ UtilTransactions::scanAndCompareUniqueIndex(Ndb* pNdb, ...@@ -629,7 +629,7 @@ UtilTransactions::scanAndCompareUniqueIndex(Ndb* pNdb,
parallelism = 1; parallelism = 1;
while (true){ while (true){
restart:
if (retryAttempt >= retryMax){ if (retryAttempt >= retryMax){
g_info << "ERROR: has retried this operation " << retryAttempt g_info << "ERROR: has retried this operation " << retryAttempt
<< " times, failing!" << endl; << " times, failing!" << endl;
...@@ -719,11 +719,26 @@ UtilTransactions::scanAndCompareUniqueIndex(Ndb* pNdb, ...@@ -719,11 +719,26 @@ UtilTransactions::scanAndCompareUniqueIndex(Ndb* pNdb,
// ndbout << row.c_str().c_str() << endl; // ndbout << row.c_str().c_str() << endl;
if (readRowFromTableAndIndex(pNdb, if (readRowFromTableAndIndex(pNdb,
pTrans, pTrans,
pIndex, pIndex,
row) != NDBT_OK){ row) != NDBT_OK){
while((eof= pOp->nextResult(false)) == 0);
if(eof == 2)
eof = pOp->nextResult(true); // this should give -1
if(eof == -1)
{
const NdbError err = pTrans->getNdbError();
if (err.status == NdbError::TemporaryError){
ERR(err);
pNdb->closeTransaction(pTrans);
NdbSleep_MilliSleep(50);
retryAttempt++;
goto restart;
}
}
pNdb->closeTransaction(pTrans); pNdb->closeTransaction(pTrans);
return NDBT_FAILED; return NDBT_FAILED;
} }
...@@ -736,7 +751,6 @@ UtilTransactions::scanAndCompareUniqueIndex(Ndb* pNdb, ...@@ -736,7 +751,6 @@ UtilTransactions::scanAndCompareUniqueIndex(Ndb* pNdb,
pNdb->closeTransaction(pTrans); pNdb->closeTransaction(pTrans);
NdbSleep_MilliSleep(50); NdbSleep_MilliSleep(50);
retryAttempt++; retryAttempt++;
rows--;
continue; continue;
} }
ERR(err); ERR(err);
...@@ -811,7 +825,6 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb, ...@@ -811,7 +825,6 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb,
check = pOp->readTuple(); check = pOp->readTuple();
if( check == -1 ) { if( check == -1 ) {
ERR(pTrans1->getNdbError()); ERR(pTrans1->getNdbError());
pNdb->closeTransaction(pTrans1);
goto close_all; goto close_all;
} }
...@@ -943,7 +956,7 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb, ...@@ -943,7 +956,7 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb,
#if VERBOSE #if VERBOSE
printf("\n"); printf("\n");
#endif #endif
scanTrans->refresh();
check = pTrans1->execute(Commit); check = pTrans1->execute(Commit);
if( check == -1 ) { if( check == -1 ) {
const NdbError err = pTrans1->getNdbError(); const NdbError err = pTrans1->getNdbError();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment