Commit a9033343 authored by stewart@mysql.com's avatar stewart@mysql.com

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

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