From: Date: January 31 2008 11:15pm Subject: bk commit into 5.0 tree (pekka:1.2593) BUG#34107 List-Archive: http://lists.mysql.com/commits/41530 X-Bug: 34107 Message-Id: <20080131221512.5308B23DEC@sama.localdomain> Below is the list of changes that have just been committed into a local 5.0 repository of pekka. When pekka does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2008-01-31 23:15:07+01:00, pekka@stripped +2 -0 ndb - bug#34107 - ndb api test case ndb/test/ndbapi/testInterpreter.cpp@stripped, 2008-01-31 23:14:21+01:00, pekka@stripped +89 -0 bug#34107 testInterpreter test case ndb/test/run-test/daily-basic-tests.txt@stripped, 2008-01-31 23:14:21+01:00, pekka@stripped +4 -4 bug#34107 testInterpreter test case diff -Nrup a/ndb/test/ndbapi/testInterpreter.cpp b/ndb/test/ndbapi/testInterpreter.cpp --- a/ndb/test/ndbapi/testInterpreter.cpp 2006-12-23 20:04:19 +01:00 +++ b/ndb/test/ndbapi/testInterpreter.cpp 2008-01-31 23:14:21 +01:00 @@ -77,6 +77,11 @@ int runTestIncValue32(NDBT_Context* ctx, const NdbDictionary::Table * pTab = ctx->getTab(); Ndb* pNdb = GETNDB(step); + if (strcmp(pTab->getName(), "T1") != 0) { + g_err << "runTestBug19537: skip, table != T1" << endl; + return NDBT_OK; + } + NdbConnection* pTrans = pNdb->startTransaction(); if (pTrans == NULL){ @@ -258,6 +263,84 @@ int runTestBug19537(NDBT_Context* ctx, N } +int runTestBug34107(NDBT_Context* ctx, NDBT_Step* step){ + int result = NDBT_OK; + const NdbDictionary::Table * pTab = ctx->getTab(); + Ndb* pNdb = GETNDB(step); + + int i; + for (i = 0; i <= 1; i++) { + g_info << "bug34107:" << (i == 0 ? " small" : " too big") << endl; + + NdbConnection* pTrans = pNdb->startTransaction(); + if (pTrans == NULL){ + ERR(pNdb->getNdbError()); + return NDBT_FAILED; + } + + NdbScanOperation* pOp = pTrans->getNdbScanOperation(pTab->getName()); + if (pOp == NULL) { + ERR(pTrans->getNdbError()); + pNdb->closeTransaction(pTrans); + return NDBT_FAILED; + } + + if (pOp->readTuples() == -1) { + ERR(pOp->getNdbError()); + pNdb->closeTransaction(pTrans); + return NDBT_FAILED; + } + + int n = i == 0 ? 10000 : 30000; + int k; + + for (k = 0; k < n; k++) { + + // inserts 1 word ATTRINFO + + if (pOp->interpret_exit_ok() == -1) { + ERR(pOp->getNdbError()); + pNdb->closeTransaction(pTrans); + return NDBT_FAILED; + } + } + + if (pTrans->execute(NoCommit) == -1) { + ERR(pTrans->getNdbError()); + pNdb->closeTransaction(pTrans); + return NDBT_FAILED; + } + + int ret; + while ((ret = pOp->nextResult()) == 0) + ; + g_info << "ret=" << ret << " err=" << pOp->getNdbError().code << endl; + + if (i == 0 && ret != 1) { + ERR(pTrans->getNdbError()); + pNdb->closeTransaction(pTrans); + return NDBT_FAILED; + } + + if (i == 1 && ret != -1) { + g_err << "unexpected big filter success" << endl; + pNdb->closeTransaction(pTrans); + return NDBT_FAILED; + } + if (i == 1 && pOp->getNdbError().code != 874) { + g_err << "unexpected big filter error code, wanted 874" << endl; + ERR(pTrans->getNdbError()); + pNdb->closeTransaction(pTrans); + return NDBT_FAILED; + } + + pNdb->closeTransaction(pTrans); + } + + return NDBT_OK; +} + + NDBT_TESTSUITE(testInterpreter); TESTCASE("IncValue32", "Test incValue for 32 bit integer\n"){ @@ -275,6 +358,12 @@ TESTCASE("Bug19537", "Test big-endian write_attr of 32 bit integer\n"){ INITIALIZER(runLoadTable); INITIALIZER(runTestBug19537); + FINALIZER(runClearTable); +} +TESTCASE("Bug34107", + "Test too big scan filter (error 874)\n"){ + INITIALIZER(runLoadTable); + INITIALIZER(runTestBug34107); FINALIZER(runClearTable); } #if 0 diff -Nrup a/ndb/test/run-test/daily-basic-tests.txt b/ndb/test/run-test/daily-basic-tests.txt --- a/ndb/test/run-test/daily-basic-tests.txt 2007-11-07 20:57:19 +01:00 +++ b/ndb/test/run-test/daily-basic-tests.txt 2008-01-31 23:14:21 +01:00 @@ -649,10 +649,10 @@ max-time: 1000 cmd: testNdbApi args: -n Bug28443 -#max-time: 500 -#cmd: testInterpreter -#args: T1 -# +max-time: 500 +cmd: testInterpreter +args: T1 + max-time: 150000 cmd: testOperations args: