From: Date: August 7 2008 2:32pm Subject: bzr commit into mysql-5.1-telco-6.4 tree (frazer:2669) Bug#37672, Bug#37986, Bug#38177, Bug#38520, WL#4258 List-Archive: http://lists.mysql.com/commits/51093 X-Bug: 38520 Message-Id: <200808071232.m77CWkWl023777@forth.ndb.mysql.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0648083061==" --===============0648083061== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #At file:///home/frazer/bzr/mysql-5.1-telco-6.4-wl4258-merge/ ------------------------------------------------------------ revno: 2669 revision-id: frazer@stripped parent: frazer@stripped parent: monty@stripped committer: Frazer Clement branch nick: mysql-5.1-telco-6.4-wl4258-merge timestamp: Thu 2008-08-07 13:32:06 +0100 message: Merge modified: storage/ndb/include/mgmapi/mgmapi.h sp1f-mgmapi.h-20040414082356-eupeadt332dudsvh2kdtwuomrudjinmv storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp sp1f-ndbindexscanoperatio-20040526093855-tiiep5fhck6uukkvxquaq5jtbzjcssp2 storage/ndb/include/ndbapi/NdbOperation.hpp sp1f-ndboperation.hpp-20040414082357-rysaqyizylpcnylrtvyasdp6xnz43ob4 storage/ndb/include/ndbapi/NdbTransaction.hpp sp1f-ndbconnection.hpp-20040414082357-xrpj656dqb7qi7hr35dqp4rsw6uqos4g storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp sp1f-dbtupexecquery.cpp-20040414082419-mq6uenb66nxl6kcdp3v27evwjkcs2ttz storage/ndb/src/mgmsrv/MgmtSrvrConfig.cpp sp1f-mgmtsrvrconfig.cpp-20040414082424-4gtbeeosc7jrys5jqf7ixwefsui74vdu storage/ndb/src/ndbapi/NdbOperationExec.cpp sp1f-ndboperationexec.cpp-20040414082425-spfhlvqpx5hh2u7nyud2l5ordg7u43eb storage/ndb/src/ndbapi/NdbScanFilter.cpp sp1f-ndbscanfilter.cpp-20040414082425-yqoh7jix4jq3puxfxrwibzt3dbe2lt7y storage/ndb/src/ndbapi/NdbScanOperation.cpp sp1f-ndbscanoperation.cpp-20040414082425-yr5memqa2kvjbeg5kez5mhmsjkkzcxmz storage/ndb/src/ndbapi/NdbTransaction.cpp sp1f-ndbconnection.cpp-20040414082424-ftc4cxrlno6yr3fmp3xzpp66xyx2x3kd storage/ndb/src/ndbapi/SignalSender.cpp sp1f-signalsender.cpp-20050908093451-2bptsw62keoy3yieixs5b7vfs3nueda6 storage/ndb/test/include/NDBT_Test.hpp sp1f-ndbt_test.hpp-20040414082433-xwtu4ad3l6jejmpxybvuza32wyp2eg7l storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp sp1f-ndbrepstress.cpp-20080108223329-m7rnylugoehdes25xt2g3lf34wytmta4 storage/ndb/test/ndbapi/bank/testBank.cpp sp1f-testbank.cpp-20040414082434-2rz3nm44nkdrmzmfzzk35o5fkjf7s2to storage/ndb/test/ndbapi/testBackup.cpp sp1f-testbackup.cpp-20040414082437-liww4jmzr43kpghtmxzl3vj6zg4wbo7y storage/ndb/test/ndbapi/testBasic.cpp sp1f-testbasic.cpp-20040414082437-uyttjhu6c6etzk4n3xe5rdqkxixzpmzh storage/ndb/test/ndbapi/testBasicAsynch.cpp sp1f-testbasicasynch.cpp-20040414082434-y5amhwzqbytdgnogttjyp7wbh6w5qlln storage/ndb/test/ndbapi/testDict.cpp sp1f-testdict.cpp-20040414082437-up57fojv5zipbzkv3mijrxhignscrlpl storage/ndb/test/ndbapi/testIndex.cpp sp1f-testindex.cpp-20040414082437-zfarvzzo5k654cznuxnv455imfhz3cbd storage/ndb/test/ndbapi/testInterpreter.cpp sp1f-testinterpreter.cpp-20040414082437-uys4lv75hhtotdamd3z2k4dx3od6dlgr storage/ndb/test/ndbapi/testLimits.cpp testlimits.cpp-20080630220416-8iqzxrvd280uesgn-1 storage/ndb/test/ndbapi/testMgm.cpp sp1f-testmgm.cpp-20040414082437-aou3ln5hvawx3rszj6qvam7oixyoticz storage/ndb/test/ndbapi/testNDBT.cpp sp1f-testndbt.cpp-20080118215500-pkbcryimwcucpgswxwx2cdglscmuqy64 storage/ndb/test/ndbapi/testNdbApi.cpp sp1f-testndbapi.cpp-20040414082437-mjif6fqfd5ohitwss3gjohzfn6pzn3sg storage/ndb/test/ndbapi/testNodeRestart.cpp sp1f-testnoderestart.cpp-20040414082437-etfhgguaz47l6ipytlcbazdgfr7avgh3 storage/ndb/test/ndbapi/testPartitioning.cpp sp1f-testpartitioning.cpp-20041115204033-cxt3uwultnb4re4wegydlktjon7kcujy storage/ndb/test/ndbapi/testRestartGci.cpp sp1f-testrestartgci.cpp-20040414082437-2mttlwwnqbsqecygqhdn7xe5y7wjejib storage/ndb/test/ndbapi/testSRBank.cpp sp1f-testsrbank.cpp-20050909103902-ijl22v4j34vppfniveml7dun7bcasfkp storage/ndb/test/ndbapi/testScan.cpp sp1f-testscan.cpp-20040414082437-hyegc3shck64nvlpbu6dk3d6carycg7v storage/ndb/test/ndbapi/testScanFilter.cpp sp1f-testscanfilter.cpp-20070301071331-mbylvv5isc5c5zatq2xbm4ffwvj4nt7h storage/ndb/test/ndbapi/testScanInterpreter.cpp sp1f-testscaninterpreter.-20040414082438-qrqhhra5slmy7w3a5zunoyib6gvwyb4x storage/ndb/test/ndbapi/testSingleUserMode.cpp testsingleusermode.c-20080623124733-3dpwgj85v5j8gcpw-1 storage/ndb/test/ndbapi/testSystemRestart.cpp sp1f-testsystemrestart.cp-20040414082438-t5ula3y3jcg3cs6hqyti5pdnhkhtglha storage/ndb/test/ndbapi/testTimeout.cpp sp1f-testtimeout.cpp-20040414082438-joiiqno4pd7elpsourbltfonedxpib43 storage/ndb/test/ndbapi/testUpgrade.cpp sp1f-testupgrade.cpp-20080221135739-bpklivgx3kuugvm5lsu3drf5xjbbgma6 storage/ndb/test/ndbapi/test_event.cpp sp1f-test_event.cpp-20040414082438-mn2bippetrmdotxdqygnmo7y2fhcioia storage/ndb/test/run-test/daily-basic-tests.txt sp1f-dailybasictests.txt-20040623115449-liur6p3tedydxdte6rr35pqap26frov6 storage/ndb/test/run-test/daily-devel-tests.txt sp1f-dailydeveltests.txt-20040623115449-iu24viz54gpubbscxtrzjtan6yuff6in storage/ndb/test/src/NDBT_Test.cpp sp1f-ndbt_test.cpp-20040414082441-artfvezrpus5ncexgq2vu7ei4btyio4f storage/ndb/tools/restore/Restore.cpp sp1f-restore.cpp-20040414082418-omzobub4nixpikkwpu42274l3ayfvz6m ------------------------------------------------------------ revno: 2663.1.38 revision-id: monty@stripped parent: monty@stripped parent: monty@stripped committer: Monty Taylor branch nick: mysql-5.1-telco-6.4 timestamp: Wed 2008-08-06 21:13:41 -0700 message: Merged modified: storage/ndb/include/mgmapi/mgmapi.h sp1f-mgmapi.h-20040414082356-eupeadt332dudsvh2kdtwuomrudjinmv ------------------------------------------------------------ revno: 2585.7.23 revision-id: monty@stripped parent: monty@stripped parent: monty@stripped committer: Monty Taylor branch nick: mysql-5.1-telco-6.3 timestamp: Wed 2008-08-06 20:45:20 -0700 message: Merged. modified: storage/ndb/include/mgmapi/mgmapi.h sp1f-mgmapi.h-20040414082356-eupeadt332dudsvh2kdtwuomrudjinmv ------------------------------------------------------------ revno: 2572.21.9 revision-id: monty@stripped parent: monty@stripped committer: Monty Taylor branch nick: 5.1-telco-6.2 timestamp: Wed 2008-08-06 20:44:29 -0700 message: Ooops. Removed _set_ instead of _get_. modified: storage/ndb/include/mgmapi/mgmapi.h sp1f-mgmapi.h-20040414082356-eupeadt332dudsvh2kdtwuomrudjinmv ------------------------------------------------------------ revno: 2663.1.37 revision-id: monty@stripped parent: frazer@stripped parent: monty@stripped committer: Monty Taylor branch nick: mysql-5.1-telco-6.4 timestamp: Wed 2008-08-06 18:42:03 -0700 message: Merged. modified: storage/ndb/include/mgmapi/mgmapi.h sp1f-mgmapi.h-20040414082356-eupeadt332dudsvh2kdtwuomrudjinmv storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp sp1f-ndbindexscanoperatio-20040526093855-tiiep5fhck6uukkvxquaq5jtbzjcssp2 storage/ndb/include/ndbapi/NdbOperation.hpp sp1f-ndboperation.hpp-20040414082357-rysaqyizylpcnylrtvyasdp6xnz43ob4 storage/ndb/include/ndbapi/NdbTransaction.hpp sp1f-ndbconnection.hpp-20040414082357-xrpj656dqb7qi7hr35dqp4rsw6uqos4g ------------------------------------------------------------ revno: 2585.7.22 revision-id: monty@stripped parent: frazer@stripped parent: monty@stripped committer: Monty Taylor branch nick: mysql-5.1-telco-6.3 timestamp: Wed 2008-08-06 18:36:57 -0700 message: Merged. modified: storage/ndb/include/mgmapi/mgmapi.h sp1f-mgmapi.h-20040414082356-eupeadt332dudsvh2kdtwuomrudjinmv storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp sp1f-ndbindexscanoperatio-20040526093855-tiiep5fhck6uukkvxquaq5jtbzjcssp2 storage/ndb/include/ndbapi/NdbOperation.hpp sp1f-ndboperation.hpp-20040414082357-rysaqyizylpcnylrtvyasdp6xnz43ob4 storage/ndb/include/ndbapi/NdbTransaction.hpp sp1f-ndbconnection.hpp-20040414082357-xrpj656dqb7qi7hr35dqp4rsw6uqos4g ------------------------------------------------------------ revno: 2572.21.8 revision-id: monty@stripped parent: frazer@stripped committer: Monty Taylor branch nick: 5.1-telco-6.2 timestamp: Wed 2008-08-06 18:34:35 -0700 message: BUG#38177 - Public headers prevent applications from being built with warnings turned on Fixed all of the build warnings produced by compiling a test program with: "-W -Wall -Wextra -std=gnu++98 -pedantic -Wundef -Wredundant-decls -Wno-long-long -Wno-strict-aliasing -Werror" modified: storage/ndb/include/mgmapi/mgmapi.h sp1f-mgmapi.h-20040414082356-eupeadt332dudsvh2kdtwuomrudjinmv storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp sp1f-ndbindexscanoperatio-20040526093855-tiiep5fhck6uukkvxquaq5jtbzjcssp2 storage/ndb/include/ndbapi/NdbOperation.hpp sp1f-ndboperation.hpp-20040414082357-rysaqyizylpcnylrtvyasdp6xnz43ob4 storage/ndb/include/ndbapi/NdbTransaction.hpp sp1f-ndbconnection.hpp-20040414082357-xrpj656dqb7qi7hr35dqp4rsw6uqos4g ------------------------------------------------------------ revno: 2663.1.36 revision-id: frazer@stripped parent: jonas@stripped parent: frazer@stripped committer: Frazer Clement branch nick: mysql-5.1-telco-6.4 timestamp: Wed 2008-08-06 16:46:41 +0100 message: Merge 6.3->6.4 modified: storage/ndb/src/ndbapi/NdbScanFilter.cpp sp1f-ndbscanfilter.cpp-20040414082425-yqoh7jix4jq3puxfxrwibzt3dbe2lt7y storage/ndb/src/ndbapi/NdbScanOperation.cpp sp1f-ndbscanoperation.cpp-20040414082425-yr5memqa2kvjbeg5kez5mhmsjkkzcxmz storage/ndb/src/ndbapi/NdbTransaction.cpp sp1f-ndbconnection.cpp-20040414082424-ftc4cxrlno6yr3fmp3xzpp66xyx2x3kd storage/ndb/test/ndbapi/testScanFilter.cpp sp1f-testscanfilter.cpp-20070301071331-mbylvv5isc5c5zatq2xbm4ffwvj4nt7h storage/ndb/test/run-test/daily-basic-tests.txt sp1f-dailybasictests.txt-20040623115449-liur6p3tedydxdte6rr35pqap26frov6 ------------------------------------------------------------ revno: 2585.7.21 revision-id: frazer@stripped parent: jonas@stripped parent: frazer@stripped committer: Frazer Clement branch nick: mysql-5.1-telco-6.3 timestamp: Wed 2008-08-06 16:39:54 +0100 message: Merge 6.2->6.3 modified: storage/ndb/src/ndbapi/NdbScanFilter.cpp sp1f-ndbscanfilter.cpp-20040414082425-yqoh7jix4jq3puxfxrwibzt3dbe2lt7y storage/ndb/src/ndbapi/NdbScanOperation.cpp sp1f-ndbscanoperation.cpp-20040414082425-yr5memqa2kvjbeg5kez5mhmsjkkzcxmz storage/ndb/src/ndbapi/NdbTransaction.cpp sp1f-ndbconnection.cpp-20040414082424-ftc4cxrlno6yr3fmp3xzpp66xyx2x3kd storage/ndb/test/ndbapi/testScanFilter.cpp sp1f-testscanfilter.cpp-20070301071331-mbylvv5isc5c5zatq2xbm4ffwvj4nt7h storage/ndb/test/run-test/daily-basic-tests.txt sp1f-dailybasictests.txt-20040623115449-liur6p3tedydxdte6rr35pqap26frov6 ------------------------------------------------------------ revno: 2572.21.7 revision-id: frazer@stripped parent: jonas@stripped committer: Frazer Clement branch nick: mysql-5.1-telco-6.2 timestamp: Wed 2008-08-06 16:33:19 +0100 message: Bug# 37986 NDBAPI : ScanFilter defined before readTuples() call results in SEGV - Failure in ScanFilter constructor is not tested for sufficiently - Before readTuples() call, old Api scan incorrectly marked as NdbRecord scan modified: storage/ndb/src/ndbapi/NdbScanFilter.cpp sp1f-ndbscanfilter.cpp-20040414082425-yqoh7jix4jq3puxfxrwibzt3dbe2lt7y storage/ndb/src/ndbapi/NdbScanOperation.cpp sp1f-ndbscanoperation.cpp-20040414082425-yr5memqa2kvjbeg5kez5mhmsjkkzcxmz storage/ndb/src/ndbapi/NdbTransaction.cpp sp1f-ndbconnection.cpp-20040414082424-ftc4cxrlno6yr3fmp3xzpp66xyx2x3kd storage/ndb/test/ndbapi/testScanFilter.cpp sp1f-testscanfilter.cpp-20070301071331-mbylvv5isc5c5zatq2xbm4ffwvj4nt7h storage/ndb/test/run-test/daily-basic-tests.txt sp1f-dailybasictests.txt-20040623115449-liur6p3tedydxdte6rr35pqap26frov6 ------------------------------------------------------------ revno: 2663.1.35 revision-id: jonas@stripped parent: frazer@stripped parent: jonas@stripped committer: jonas@stripped branch nick: telco-6.4 timestamp: Tue 2008-08-05 16:34:39 +0200 message: ndb - bug#38520 (merge telco-6.3 to telco-6.4) Incorrect handling EMPTY_ENTRY setion with length 2 modified: storage/ndb/tools/restore/Restore.cpp sp1f-restore.cpp-20040414082418-omzobub4nixpikkwpu42274l3ayfvz6m ------------------------------------------------------------ revno: 2585.7.20 revision-id: jonas@stripped parent: frazer@stripped parent: jonas@stripped committer: jonas@stripped branch nick: telco-6.3 timestamp: Tue 2008-08-05 16:32:58 +0200 message: ndb - bug#38520 (merge telco-6.2 to telco-6.3) Incorrect handling EMPTY_ENTRY setion with length 2 modified: storage/ndb/tools/restore/Restore.cpp sp1f-restore.cpp-20040414082418-omzobub4nixpikkwpu42274l3ayfvz6m ------------------------------------------------------------ revno: 2572.21.6 revision-id: jonas@stripped parent: frazer@stripped committer: jonas@stripped branch nick: telco-6.2 timestamp: Tue 2008-08-05 16:08:40 +0200 message: ndb - bug#38520 Incorrect handling EMPTY_ENTRY setion with length 2 modified: storage/ndb/tools/restore/Restore.cpp sp1f-restore.cpp-20040414082418-omzobub4nixpikkwpu42274l3ayfvz6m ------------------------------------------------------------ revno: 2663.1.34 revision-id: frazer@stripped parent: msvensson@stripped parent: frazer@stripped committer: Frazer Clement branch nick: mysql-5.1-telco-6.4 timestamp: Tue 2008-08-05 11:52:53 +0100 message: Merge 6.3->6.4 modified: storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp sp1f-dbtupexecquery.cpp-20040414082419-mq6uenb66nxl6kcdp3v27evwjkcs2ttz storage/ndb/src/ndbapi/NdbOperationExec.cpp sp1f-ndboperationexec.cpp-20040414082425-spfhlvqpx5hh2u7nyud2l5ordg7u43eb storage/ndb/test/ndbapi/test_event.cpp sp1f-test_event.cpp-20040414082438-mn2bippetrmdotxdqygnmo7y2fhcioia storage/ndb/test/run-test/daily-basic-tests.txt sp1f-dailybasictests.txt-20040623115449-liur6p3tedydxdte6rr35pqap26frov6 ------------------------------------------------------------ revno: 2585.7.19 revision-id: frazer@stripped parent: msvensson@stripped parent: frazer@stripped committer: Frazer Clement branch nick: mysql-5.1-telco-6.3 timestamp: Tue 2008-08-05 11:13:56 +0100 message: Merge 6.2->6.3 modified: storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp sp1f-dbtupexecquery.cpp-20040414082419-mq6uenb66nxl6kcdp3v27evwjkcs2ttz storage/ndb/src/ndbapi/NdbOperationExec.cpp sp1f-ndboperationexec.cpp-20040414082425-spfhlvqpx5hh2u7nyud2l5ordg7u43eb storage/ndb/test/ndbapi/test_event.cpp sp1f-test_event.cpp-20040414082438-mn2bippetrmdotxdqygnmo7y2fhcioia storage/ndb/test/run-test/daily-basic-tests.txt sp1f-dailybasictests.txt-20040623115449-liur6p3tedydxdte6rr35pqap26frov6 ------------------------------------------------------------ revno: 2572.21.5 revision-id: frazer@stripped parent: msvensson@stripped committer: Frazer Clement branch nick: mysql-5.1-telco-6.2 timestamp: Mon 2008-08-04 16:49:01 +0100 message: Bug# 37672 NDBAPI : NdbRecord option OO_ANYVALUE causes interpreted delete to abort. NdbRecord variant of NDBAPI did not properly support ANYVALUE with Delete operations Additionally, DbTUP did not correctly support ANYVALUE with interpreted Delete operations. modified: storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp sp1f-dbtupexecquery.cpp-20040414082419-mq6uenb66nxl6kcdp3v27evwjkcs2ttz storage/ndb/src/ndbapi/NdbOperationExec.cpp sp1f-ndboperationexec.cpp-20040414082425-spfhlvqpx5hh2u7nyud2l5ordg7u43eb storage/ndb/test/ndbapi/test_event.cpp sp1f-test_event.cpp-20040414082438-mn2bippetrmdotxdqygnmo7y2fhcioia storage/ndb/test/run-test/daily-basic-tests.txt sp1f-dailybasictests.txt-20040623115449-liur6p3tedydxdte6rr35pqap26frov6 ------------------------------------------------------------ revno: 2663.1.33 revision-id: msvensson@stripped parent: msvensson@stripped committer: Magnus Svensson branch nick: 6.4 timestamp: Mon 2008-08-04 23:01:04 +0200 message: Fix warning, returning wrong type modified: storage/ndb/src/mgmsrv/MgmtSrvrConfig.cpp sp1f-mgmtsrvrconfig.cpp-20040414082424-4gtbeeosc7jrys5jqf7ixwefsui74vdu ------------------------------------------------------------ revno: 2663.1.32 revision-id: msvensson@stripped parent: msvensson@stripped committer: Magnus Svensson branch nick: 6.4 timestamp: Mon 2008-08-04 22:59:33 +0200 message: Fix warning about comparison between signed/unsigned modified: storage/ndb/src/ndbapi/SignalSender.cpp sp1f-signalsender.cpp-20050908093451-2bptsw62keoy3yieixs5b7vfs3nueda6 ------------------------------------------------------------ revno: 2663.1.31 revision-id: msvensson@stripped parent: msvensson@stripped committer: Magnus Svensson branch nick: 6.4 timestamp: Mon 2008-08-04 21:58:31 +0200 message: Run testIndex on T14 instead of T6 in order to reduce number of metatdata objects needed to run test modified: storage/ndb/test/run-test/daily-devel-tests.txt sp1f-dailydeveltests.txt-20040623115449-iu24viz54gpubbscxtrzjtan6yuff6in ------------------------------------------------------------ revno: 2663.1.30 revision-id: msvensson@stripped parent: msvensson@stripped committer: Magnus Svensson branch nick: 6.4 timestamp: Mon 2008-08-04 21:02:08 +0200 message: Silently ignore dropTable error if No such table existed modified: storage/ndb/test/src/NDBT_Test.cpp sp1f-ndbt_test.cpp-20040414082441-artfvezrpus5ncexgq2vu7ei4btyio4f ------------------------------------------------------------ revno: 2663.1.29 revision-id: msvensson@stripped parent: jonas@stripped committer: Magnus Svensson branch nick: 6.4 timestamp: Mon 2008-08-04 19:29:07 +0200 message: Add missing ! to avoid that tables unintentionally are created without logging by test framework modified: storage/ndb/test/src/NDBT_Test.cpp sp1f-ndbt_test.cpp-20040414082441-artfvezrpus5ncexgq2vu7ei4btyio4f ------------------------------------------------------------ revno: 2663.1.28 revision-id: jonas@stripped parent: jonas@stripped committer: jonas@stripped branch nick: telco-6.4 timestamp: Mon 2008-08-04 15:40:17 +0200 message: ndb(t) Change so that test-suite instance isnt defined in global-scope so that ndb_init is run *before* object is created modified: storage/ndb/test/include/NDBT_Test.hpp sp1f-ndbt_test.hpp-20040414082433-xwtu4ad3l6jejmpxybvuza32wyp2eg7l storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp sp1f-ndbrepstress.cpp-20080108223329-m7rnylugoehdes25xt2g3lf34wytmta4 storage/ndb/test/ndbapi/bank/testBank.cpp sp1f-testbank.cpp-20040414082434-2rz3nm44nkdrmzmfzzk35o5fkjf7s2to storage/ndb/test/ndbapi/testBackup.cpp sp1f-testbackup.cpp-20040414082437-liww4jmzr43kpghtmxzl3vj6zg4wbo7y storage/ndb/test/ndbapi/testBasic.cpp sp1f-testbasic.cpp-20040414082437-uyttjhu6c6etzk4n3xe5rdqkxixzpmzh storage/ndb/test/ndbapi/testBasicAsynch.cpp sp1f-testbasicasynch.cpp-20040414082434-y5amhwzqbytdgnogttjyp7wbh6w5qlln storage/ndb/test/ndbapi/testDict.cpp sp1f-testdict.cpp-20040414082437-up57fojv5zipbzkv3mijrxhignscrlpl storage/ndb/test/ndbapi/testIndex.cpp sp1f-testindex.cpp-20040414082437-zfarvzzo5k654cznuxnv455imfhz3cbd storage/ndb/test/ndbapi/testInterpreter.cpp sp1f-testinterpreter.cpp-20040414082437-uys4lv75hhtotdamd3z2k4dx3od6dlgr storage/ndb/test/ndbapi/testLimits.cpp testlimits.cpp-20080630220416-8iqzxrvd280uesgn-1 storage/ndb/test/ndbapi/testMgm.cpp sp1f-testmgm.cpp-20040414082437-aou3ln5hvawx3rszj6qvam7oixyoticz storage/ndb/test/ndbapi/testNDBT.cpp sp1f-testndbt.cpp-20080118215500-pkbcryimwcucpgswxwx2cdglscmuqy64 storage/ndb/test/ndbapi/testNdbApi.cpp sp1f-testndbapi.cpp-20040414082437-mjif6fqfd5ohitwss3gjohzfn6pzn3sg storage/ndb/test/ndbapi/testNodeRestart.cpp sp1f-testnoderestart.cpp-20040414082437-etfhgguaz47l6ipytlcbazdgfr7avgh3 storage/ndb/test/ndbapi/testPartitioning.cpp sp1f-testpartitioning.cpp-20041115204033-cxt3uwultnb4re4wegydlktjon7kcujy storage/ndb/test/ndbapi/testRestartGci.cpp sp1f-testrestartgci.cpp-20040414082437-2mttlwwnqbsqecygqhdn7xe5y7wjejib storage/ndb/test/ndbapi/testSRBank.cpp sp1f-testsrbank.cpp-20050909103902-ijl22v4j34vppfniveml7dun7bcasfkp storage/ndb/test/ndbapi/testScan.cpp sp1f-testscan.cpp-20040414082437-hyegc3shck64nvlpbu6dk3d6carycg7v storage/ndb/test/ndbapi/testScanFilter.cpp sp1f-testscanfilter.cpp-20070301071331-mbylvv5isc5c5zatq2xbm4ffwvj4nt7h storage/ndb/test/ndbapi/testScanInterpreter.cpp sp1f-testscaninterpreter.-20040414082438-qrqhhra5slmy7w3a5zunoyib6gvwyb4x storage/ndb/test/ndbapi/testSingleUserMode.cpp testsingleusermode.c-20080623124733-3dpwgj85v5j8gcpw-1 storage/ndb/test/ndbapi/testSystemRestart.cpp sp1f-testsystemrestart.cp-20040414082438-t5ula3y3jcg3cs6hqyti5pdnhkhtglha storage/ndb/test/ndbapi/testTimeout.cpp sp1f-testtimeout.cpp-20040414082438-joiiqno4pd7elpsourbltfonedxpib43 storage/ndb/test/ndbapi/testUpgrade.cpp sp1f-testupgrade.cpp-20080221135739-bpklivgx3kuugvm5lsu3drf5xjbbgma6 storage/ndb/test/ndbapi/test_event.cpp sp1f-test_event.cpp-20040414082438-mn2bippetrmdotxdqygnmo7y2fhcioia --===============0648083061== MIME-Version: 1.0 Content-Type: text/text/x-diff; charset="us-ascii"; name="patch-2669.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline === modified file 'storage/ndb/include/mgmapi/mgmapi.h' --- a/storage/ndb/include/mgmapi/mgmapi.h 2008-04-07 10:26:34 +0000 +++ b/storage/ndb/include/mgmapi/mgmapi.h 2008-08-07 04:13:41 +0000 @@ -444,10 +444,6 @@ int ndb_mgm_number_of_mgmd_in_connect_string(NdbMgmHandle handle); int ndb_mgm_set_configuration_nodeid(NdbMgmHandle handle, int nodeid); - int ndb_mgm_get_configuration_nodeid(NdbMgmHandle handle); - int ndb_mgm_get_connected_port(NdbMgmHandle handle); - const char *ndb_mgm_get_connected_host(NdbMgmHandle handle); - const char *ndb_mgm_get_connectstring(NdbMgmHandle handle, char *buf, int buf_sz); /** * Set local bindaddress === modified file 'storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp' --- a/storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp 2008-02-19 15:00:29 +0000 +++ b/storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp 2008-08-07 01:34:35 +0000 @@ -307,7 +307,7 @@ inline int NdbIndexScanOperation::setBound(const char* attr, int type, const void* value, - Uint32 len) + __attribute__((__unused__))Uint32 len) { return setBound(attr, type, value); } @@ -315,7 +315,7 @@ inline int NdbIndexScanOperation::setBound(Uint32 anAttrId, int type, const void* value, - Uint32 len) + __attribute__((__unused__))Uint32 len) { return setBound(anAttrId, type, value); } === modified file 'storage/ndb/include/ndbapi/NdbOperation.hpp' --- a/storage/ndb/include/ndbapi/NdbOperation.hpp 2008-06-17 20:28:45 +0000 +++ b/storage/ndb/include/ndbapi/NdbOperation.hpp 2008-08-07 01:42:03 +0000 @@ -1457,6 +1457,9 @@ int NdbOperation::checkMagicNumber(bool b) { +#ifndef NDB_NO_DROPPED_SIGNAL + (void)b; // unused param in this context +#endif if (theMagicNumber != 0xABCDEF01){ #ifdef NDB_NO_DROPPED_SIGNAL if(b) abort(); @@ -1576,7 +1579,8 @@ inline int -NdbOperation::equal(const char* anAttrName, const char* aValue, Uint32 len) +NdbOperation::equal(const char* anAttrName, const char* aValue, + __attribute__((__unused__))Uint32 len) { return equal(anAttrName, aValue); } @@ -1611,7 +1615,8 @@ inline int -NdbOperation::equal(Uint32 anAttrId, const char* aValue, Uint32 len) +NdbOperation::equal(Uint32 anAttrId, const char* aValue, + __attribute__((__unused__))Uint32 len) { return equal(anAttrId, aValue); } @@ -1646,7 +1651,8 @@ inline int -NdbOperation::setValue(const char* anAttrName, const char* aValue, Uint32 len) +NdbOperation::setValue(const char* anAttrName, const char* aValue, + __attribute__((__unused__))Uint32 len) { return setValue(anAttrName, aValue); } @@ -1695,7 +1701,8 @@ inline int -NdbOperation::setValue(Uint32 anAttrId, const char* aValue, Uint32 len) +NdbOperation::setValue(Uint32 anAttrId, const char* aValue, + __attribute__((__unused__))Uint32 len) { return setValue(anAttrId, aValue); } === modified file 'storage/ndb/include/ndbapi/NdbTransaction.hpp' --- a/storage/ndb/include/ndbapi/NdbTransaction.hpp 2008-02-19 15:00:29 +0000 +++ b/storage/ndb/include/ndbapi/NdbTransaction.hpp 2008-08-07 01:34:35 +0000 @@ -1091,7 +1091,7 @@ inline void -NdbTransaction::set_send_size(Uint32 send_size) +NdbTransaction::set_send_size(__attribute__((__unused__))Uint32 send_size) { return; } === modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp' --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp 2008-08-07 11:52:50 +0000 +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp 2008-08-07 12:32:06 +0000 @@ -1964,7 +1964,11 @@ Uint32 RattroutCounter= 0; Uint32 RinstructionCounter= 5; - Uint32 RlogSize= 0; + + /* All information to be logged/propagated to replicas + * is generated from here on so reset the log word count + */ + Uint32 RlogSize= req_struct->log_size= 0; if (((RtotalLen + 5) == RattrinbufLen) && (RattrinbufLen >= 5) && (RattrinbufLen < ZATTR_BUFFER_SIZE)) { @@ -2070,7 +2074,12 @@ return -1; } } - req_struct->log_size= RlogSize; + /* Add log words explicitly generated here to existing log size + * - readAttributes can generate log for ANYVALUE column + * It adds the words directly to req_struct->log_size + * This is used for ANYVALUE and interpreted delete. + */ + req_struct->log_size+= RlogSize; req_struct->read_length= RattroutCounter; sendReadAttrinfo(signal, req_struct, RattroutCounter, regOperPtr); if (RlogSize > 0) { === modified file 'storage/ndb/src/mgmsrv/MgmtSrvrConfig.cpp' --- a/storage/ndb/src/mgmsrv/MgmtSrvrConfig.cpp 2008-07-29 13:38:18 +0000 +++ b/storage/ndb/src/mgmsrv/MgmtSrvrConfig.cpp 2008-08-04 21:01:04 +0000 @@ -62,14 +62,14 @@ _ownNodeId= m_config_retriever.allocNodeId(retry, delay); if (_ownNodeId == 0) { g_eventLogger->error(m_config_retriever.getErrorString()); - DBUG_RETURN(NULL); + DBUG_RETURN(false); } // read config from other managent server struct ndb_mgm_configuration * tmp = m_config_retriever.getConfig(); if (tmp == NULL) { g_eventLogger->error(m_config_retriever.getErrorString()); - DBUG_RETURN(NULL); + DBUG_RETURN(false); } setConfig(new Config(tmp)); === modified file 'storage/ndb/src/ndbapi/NdbOperationExec.cpp' --- a/storage/ndb/src/ndbapi/NdbOperationExec.cpp 2008-06-17 20:28:45 +0000 +++ b/storage/ndb/src/ndbapi/NdbOperationExec.cpp 2008-08-05 10:52:53 +0000 @@ -942,6 +942,28 @@ } } + if (m_use_any_value && + (tOpType == DeleteRequest)) + { + /* Special hack for delete and ANYVALUE pseudo-column + * We want to be able set the ANYVALUE pseudo-column as + * part of a delete, but deletes don't allow updates + * So we perform a 'read' of the column, passing a value. + * Code in TUP which handles this 'read' will set the + * value when the read is processed. + */ + res= insertATTRINFOHdr_NdbRecord(aTC_ConnectPtr, aTransId, + AttributeHeader::ANY_VALUE, 4, + &attrInfoPtr, &remain); + if(res) + return res; + res= insertATTRINFOData_NdbRecord(aTC_ConnectPtr, aTransId, + (const char *)(&m_any_value), 4, + &attrInfoPtr, &remain); + if(res) + return res; + } + /* Interpreted program main signal words */ if (code) { @@ -1126,10 +1148,9 @@ if ((tOpType == InsertRequest) || (tOpType == WriteRequest) || - (tOpType == UpdateRequest) || - (tOpType == DeleteRequest)) + (tOpType == UpdateRequest)) { - /* Handle any setAnyValue(). */ + /* Handle setAnyValue() for all cases except delete */ if (m_use_any_value) { res= insertATTRINFOHdr_NdbRecord(aTC_ConnectPtr, aTransId, === modified file 'storage/ndb/src/ndbapi/NdbScanFilter.cpp' --- a/storage/ndb/src/ndbapi/NdbScanFilter.cpp 2008-05-29 15:06:11 +0000 +++ b/storage/ndb/src/ndbapi/NdbScanFilter.cpp 2008-08-06 15:46:41 +0000 @@ -75,7 +75,11 @@ m_code= code; m_associated_op= NULL; - m_error.code = 0; + if (code == NULL) + /* NdbInterpretedCode not supported for operation type */ + m_error.code = 4539; + else + m_error.code = 0; }; /* This method propagates an error code from NdbInterpretedCode @@ -136,13 +140,22 @@ { DBUG_ENTER("NdbScanFilter::NdbScanFilter(NdbOperation)"); - /* We ask the NdbScanOperation to allocate an InterpretedCode - * object for us. It will look after freeing it when - * necessary. This allows the InterpretedCode object to - * survive after the NdbScanFilter has gone out of scope + NdbInterpretedCode* code= NULL; + NdbOperation::Type opType= op->getType(); + + /* If the operation is not of the correct type then + * m_impl.init() will set an error on the scan filter */ - NdbInterpretedCode* code= - ((NdbScanOperation *)op)->allocInterpretedCodeOldApi(); + if (likely((opType == NdbOperation::TableScan) || + (opType == NdbOperation::OrderedIndexScan))) + { + /* We ask the NdbScanOperation to allocate an InterpretedCode + * object for us. It will look after freeing it when + * necessary. This allows the InterpretedCode object to + * survive after the NdbScanFilter has gone out of scope + */ + code= ((NdbScanOperation *)op)->allocInterpretedCodeOldApi(); + } m_impl.init(code); @@ -158,6 +171,8 @@ int NdbScanFilter::begin(Group group){ + if (m_impl.m_error.code != 0) return -1; + if (m_impl.m_stack2.push_back(m_impl.m_negative)) { /* Memory allocation problem */ @@ -244,6 +259,8 @@ int NdbScanFilter::end(){ + if (m_impl.m_error.code != 0) return -1; + if(m_impl.m_stack2.size() == 0){ /* Invalid set of range scan bounds */ m_impl.m_error.code= 4259; @@ -353,6 +370,8 @@ int NdbScanFilter::istrue(){ + if(m_impl.m_error.code != 0) return -1; + if(m_impl.m_current.m_group < NdbScanFilter::AND || m_impl.m_current.m_group > NdbScanFilter::NOR){ /* Operator is not defined in NdbScanFilter::Group */ @@ -373,6 +392,7 @@ int NdbScanFilter::isfalse(){ + if (m_impl.m_error.code != 0) return -1; if(m_impl.m_current.m_group < NdbScanFilter::AND || m_impl.m_current.m_group > NdbScanFilter::NOR){ /* Operator is not defined in NdbScanFilter::Group */ @@ -436,6 +456,8 @@ int NdbScanFilterImpl::cond_col(Interpreter::UnaryCondition op, Uint32 AttrId){ + if (m_error.code != 0) return -1; + if(op < 0 || op >= tab2_sz){ /* Condition is out of bounds */ m_error.code= 4262; @@ -458,6 +480,8 @@ int NdbScanFilter::isnull(int AttrId){ + if (m_impl.m_error.code != 0) return -1; + if(m_impl.m_negative == 1) return m_impl.cond_col(Interpreter::IS_NOT_NULL, AttrId); else @@ -466,6 +490,8 @@ int NdbScanFilter::isnotnull(int AttrId){ + if (m_impl.m_error.code != 0) return -1; + if(m_impl.m_negative == 1) return m_impl.cond_col(Interpreter::IS_NULL, AttrId); else @@ -568,6 +594,8 @@ NdbScanFilterImpl::cond_col_const(Interpreter::BinaryCondition op, Uint32 AttrId, const void * value, Uint32 len){ + if (m_error.code != 0) return -1; + if(op < 0 || op >= tab3_sz){ /* Condition is out of bounds */ m_error.code= 4262; === modified file 'storage/ndb/src/ndbapi/NdbScanOperation.cpp' --- a/storage/ndb/src/ndbapi/NdbScanOperation.cpp 2008-06-17 20:28:45 +0000 +++ b/storage/ndb/src/ndbapi/NdbScanOperation.cpp 2008-08-06 15:46:41 +0000 @@ -53,7 +53,7 @@ theSCAN_TABREQ = 0; m_executed = false; m_scan_buffer= NULL; - m_scanUsingOldApi= false; + m_scanUsingOldApi= true; m_interpretedCodeOldApi= NULL; } @@ -119,7 +119,7 @@ m_descending= false; m_read_range_no = 0; m_executed = false; - m_scanUsingOldApi= false; + m_scanUsingOldApi= true; m_interpretedCodeOldApi= NULL; m_api_receivers_count = 0; @@ -937,16 +937,14 @@ Uint32 parallel, Uint32 batch) { - // It is only possible to call readTuples if - // 1. the scan transaction doesn't already contain another scan operation - // 2. We have not already defined an old Api scan operation. - if (theNdbCon->theScanningOp != NULL || - m_scanUsingOldApi ){ + // It is only possible to call readTuples if the scan transaction + // doesn't already contain a scan operation + if (theNdbCon->theScanningOp != NULL) + { setErrorCode(4605); return -1; } - - m_scanUsingOldApi= true; + /* Save parameters for later */ m_savedLockModeOldApi= lm; m_savedScanFlagsOldApi= scan_flags; === modified file 'storage/ndb/src/ndbapi/NdbTransaction.cpp' --- a/storage/ndb/src/ndbapi/NdbTransaction.cpp 2008-06-03 16:18:01 +0000 +++ b/storage/ndb/src/ndbapi/NdbTransaction.cpp 2008-08-06 15:39:54 +0000 @@ -2583,6 +2583,8 @@ DBUG_RETURN(NULL); } + op_idx->m_scanUsingOldApi= false; + /* The real work is done in NdbScanOperation */ if (op_idx->scanTableImpl(result_record, lock_mode, @@ -2622,6 +2624,8 @@ return NULL; } + op->m_scanUsingOldApi= false; + /* Defer the rest of the work to NdbIndexScanOperation */ if (op->scanIndexImpl(key_record, result_record, === modified file 'storage/ndb/src/ndbapi/SignalSender.cpp' --- a/storage/ndb/src/ndbapi/SignalSender.cpp 2008-07-25 11:28:05 +0000 +++ b/storage/ndb/src/ndbapi/SignalSender.cpp 2008-08-04 20:59:33 +0000 @@ -145,7 +145,7 @@ } /* Remove old signals from usedBuffer */ - for (int i= 0; i < m_usedBuffer.size(); i++) + for (unsigned i= 0; i < m_usedBuffer.size(); i++) delete m_usedBuffer[i]; m_usedBuffer.clear(); === modified file 'storage/ndb/test/include/NDBT_Test.hpp' --- a/storage/ndb/test/include/NDBT_Test.hpp 2008-07-22 13:25:43 +0000 +++ b/storage/ndb/test/include/NDBT_Test.hpp 2008-08-04 13:40:17 +0000 @@ -483,7 +483,10 @@ pt->m_all_tables= true; #define NDBT_TESTSUITE_END(suitname) \ - } } ; C##suitname suitname + } } ; + +#define NDBT_TESTSUITE_INSTANCE(suitname) \ + C##suitname suitname // Helper functions for retrieving variables from NDBT_Step #define GETNDB(ps) ((NDBT_Step*)ps)->getNdb() === modified file 'storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp' --- a/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp 2008-07-22 13:25:43 +0000 +++ b/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp 2008-08-04 13:40:17 +0000 @@ -474,6 +474,7 @@ int main(int argc, const char** argv){ ndb_init(); + NDBT_TESTSUITE_INSTANCE(NdbRepStress); NdbRepStress.setCreateAllTables(true); return NdbRepStress.execute(argc, argv); } === modified file 'storage/ndb/test/ndbapi/bank/testBank.cpp' --- a/storage/ndb/test/ndbapi/bank/testBank.cpp 2006-12-23 19:20:40 +0000 +++ b/storage/ndb/test/ndbapi/bank/testBank.cpp 2008-08-04 13:40:17 +0000 @@ -144,6 +144,7 @@ int main(int argc, const char** argv){ ndb_init(); // Tables should not be auto created + NDBT_TESTSUITE_INSTANCE(testBank); testBank.setCreateTable(false); return testBank.execute(argc, argv); === modified file 'storage/ndb/test/ndbapi/testBackup.cpp' --- a/storage/ndb/test/ndbapi/testBackup.cpp 2008-03-03 11:12:37 +0000 +++ b/storage/ndb/test/ndbapi/testBackup.cpp 2008-08-04 13:40:17 +0000 @@ -579,6 +579,7 @@ int main(int argc, const char** argv){ ndb_init(); + NDBT_TESTSUITE_INSTANCE(testBackup); return testBackup.execute(argc, argv); } === modified file 'storage/ndb/test/ndbapi/testBasic.cpp' --- a/storage/ndb/test/ndbapi/testBasic.cpp 2008-07-22 13:25:43 +0000 +++ b/storage/ndb/test/ndbapi/testBasic.cpp 2008-08-04 13:40:17 +0000 @@ -1840,6 +1840,7 @@ int main(int argc, const char** argv){ ndb_init(); + NDBT_TESTSUITE_INSTANCE(testBasic); return testBasic.execute(argc, argv); } === modified file 'storage/ndb/test/ndbapi/testBasicAsynch.cpp' --- a/storage/ndb/test/ndbapi/testBasicAsynch.cpp 2008-07-22 13:25:43 +0000 +++ b/storage/ndb/test/ndbapi/testBasicAsynch.cpp 2008-08-04 13:40:17 +0000 @@ -179,6 +179,7 @@ int main(int argc, const char** argv){ ndb_init(); + NDBT_TESTSUITE_INSTANCE(testBasicAsynch); return testBasicAsynch.execute(argc, argv); } === modified file 'storage/ndb/test/ndbapi/testDict.cpp' --- a/storage/ndb/test/ndbapi/testDict.cpp 2008-07-01 16:16:30 +0000 +++ b/storage/ndb/test/ndbapi/testDict.cpp 2008-08-07 12:32:06 +0000 @@ -6552,6 +6552,7 @@ int main(int argc, const char** argv){ ndb_init(); + NDBT_TESTSUITE_INSTANCE(testDict); // Tables should not be auto created testDict.setCreateTable(false); myRandom48Init(NdbTick_CurrentMillisecond()); === modified file 'storage/ndb/test/ndbapi/testIndex.cpp' --- a/storage/ndb/test/ndbapi/testIndex.cpp 2008-03-25 14:17:03 +0000 +++ b/storage/ndb/test/ndbapi/testIndex.cpp 2008-08-04 13:40:17 +0000 @@ -1752,6 +1752,7 @@ int main(int argc, const char** argv){ ndb_init(); + NDBT_TESTSUITE_INSTANCE(testIndex); return testIndex.execute(argc, argv); } === modified file 'storage/ndb/test/ndbapi/testInterpreter.cpp' --- a/storage/ndb/test/ndbapi/testInterpreter.cpp 2008-06-18 14:55:21 +0000 +++ b/storage/ndb/test/ndbapi/testInterpreter.cpp 2008-08-04 13:40:17 +0000 @@ -482,6 +482,7 @@ int main(int argc, const char** argv){ ndb_init(); // TABLE("T1"); + NDBT_TESTSUITE_INSTANCE(testInterpreter); return testInterpreter.execute(argc, argv); } === modified file 'storage/ndb/test/ndbapi/testLimits.cpp' --- a/storage/ndb/test/ndbapi/testLimits.cpp 2008-07-01 12:35:34 +0000 +++ b/storage/ndb/test/ndbapi/testLimits.cpp 2008-08-04 13:40:17 +0000 @@ -824,5 +824,6 @@ int main(int argc, const char** argv){ ndb_init(); + NDBT_TESTSUITE_INSTANCE(testLimits); return testLimits.execute(argc, argv); } === modified file 'storage/ndb/test/ndbapi/testMgm.cpp' --- a/storage/ndb/test/ndbapi/testMgm.cpp 2008-07-22 13:25:43 +0000 +++ b/storage/ndb/test/ndbapi/testMgm.cpp 2008-08-04 13:40:17 +0000 @@ -682,6 +682,7 @@ int main(int argc, const char** argv){ ndb_init(); + NDBT_TESTSUITE_INSTANCE(testMgm); testMgm.setCreateTable(false); testMgm.setRunAllTables(true); return testMgm.execute(argc, argv); === modified file 'storage/ndb/test/ndbapi/testNDBT.cpp' --- a/storage/ndb/test/ndbapi/testNDBT.cpp 2008-03-03 15:10:42 +0000 +++ b/storage/ndb/test/ndbapi/testNDBT.cpp 2008-08-04 13:40:17 +0000 @@ -180,6 +180,7 @@ int main(int argc, const char** argv){ ndb_init(); + NDBT_TESTSUITE_INSTANCE(testNDBT); return testNDBT.execute(argc, argv); } === modified file 'storage/ndb/test/ndbapi/testNdbApi.cpp' --- a/storage/ndb/test/ndbapi/testNdbApi.cpp 2008-06-03 12:37:17 +0000 +++ b/storage/ndb/test/ndbapi/testNdbApi.cpp 2008-08-04 13:40:17 +0000 @@ -1844,6 +1844,7 @@ int main(int argc, const char** argv){ ndb_init(); + NDBT_TESTSUITE_INSTANCE(testNdbApi); // TABLE("T1"); return testNdbApi.execute(argc, argv); } === modified file 'storage/ndb/test/ndbapi/testNodeRestart.cpp' --- a/storage/ndb/test/ndbapi/testNodeRestart.cpp 2008-04-25 07:20:39 +0000 +++ b/storage/ndb/test/ndbapi/testNodeRestart.cpp 2008-08-04 13:40:17 +0000 @@ -3644,6 +3644,7 @@ int main(int argc, const char** argv){ ndb_init(); + NDBT_TESTSUITE_INSTANCE(testNodeRestart); #if 0 // It might be interesting to have longer defaults for num // loops in this test === modified file 'storage/ndb/test/ndbapi/testPartitioning.cpp' --- a/storage/ndb/test/ndbapi/testPartitioning.cpp 2008-07-22 13:27:57 +0000 +++ b/storage/ndb/test/ndbapi/testPartitioning.cpp 2008-08-04 13:40:17 +0000 @@ -622,6 +622,7 @@ int main(int argc, const char** argv){ ndb_init(); + NDBT_TESTSUITE_INSTANCE(testPartitioning); testPartitioning.setCreateTable(false); return testPartitioning.execute(argc, argv); } === modified file 'storage/ndb/test/ndbapi/testRestartGci.cpp' --- a/storage/ndb/test/ndbapi/testRestartGci.cpp 2006-12-23 19:20:40 +0000 +++ b/storage/ndb/test/ndbapi/testRestartGci.cpp 2008-08-04 13:40:17 +0000 @@ -215,6 +215,7 @@ int main(int argc, const char** argv){ ndb_init(); + NDBT_TESTSUITE_INSTANCE(testRestartGci); return testRestartGci.execute(argc, argv); } === modified file 'storage/ndb/test/ndbapi/testSRBank.cpp' --- a/storage/ndb/test/ndbapi/testSRBank.cpp 2008-04-28 15:17:02 +0000 +++ b/storage/ndb/test/ndbapi/testSRBank.cpp 2008-08-04 13:40:17 +0000 @@ -291,6 +291,7 @@ break; } } + NDBT_TESTSUITE_INSTANCE(testSRBank); return testSRBank.execute(argc, argv); } === modified file 'storage/ndb/test/ndbapi/testScan.cpp' --- a/storage/ndb/test/ndbapi/testScan.cpp 2008-04-28 14:17:28 +0000 +++ b/storage/ndb/test/ndbapi/testScan.cpp 2008-08-04 13:40:17 +0000 @@ -1730,6 +1730,7 @@ int main(int argc, const char** argv){ ndb_init(); myRandom48Init(NdbTick_CurrentMillisecond()); + NDBT_TESTSUITE_INSTANCE(testScan); return testScan.execute(argc, argv); } === modified file 'storage/ndb/test/ndbapi/testScanFilter.cpp' --- a/storage/ndb/test/ndbapi/testScanFilter.cpp 2008-02-19 15:00:29 +0000 +++ b/storage/ndb/test/ndbapi/testScanFilter.cpp 2008-08-06 15:46:41 +0000 @@ -894,6 +894,132 @@ return NDBT_OK; } + +int runScanFilterConstructorFail(NDBT_Context* ctx, NDBT_Step* step) +{ + /* We test that failures in the ScanFilter constructor can be + * detected by the various ScanFilter methods without + * issues + */ + Ndb *myNdb = GETNDB(step); + const NdbDictionary::Dictionary* myDict= myNdb->getDictionary(); + const NdbDictionary::Table *myTable= myDict->getTable(TABLE_NAME); + if(myTable == NULL) + APIERROR(myDict->getNdbError()); + + NdbTransaction* trans=myNdb->startTransaction(); + + if (trans == NULL) + { + APIERROR(trans->getNdbError()); + return NDBT_FAILED; + } + + /* Create an NdbRecord scan operation */ + const NdbScanOperation* tabScan= + trans->scanTable(myTable->getDefaultRecord()); + + if (tabScan==NULL) + { + APIERROR(trans->getNdbError()); + return NDBT_FAILED; + } + + /* Now we hackily try to add a ScanFilter after the operation + * is defined. This will cause a failure within the + * constructor + */ + NdbScanFilter brokenSf((NdbScanOperation*) tabScan); + + /* Scan operation should have an error */ + if (tabScan->getNdbError().code != 4536) + { + ndbout << "Expected error 4536, had error " << + tabScan->getNdbError().code << " instead" << endl; + return NDBT_FAILED; + } + + /* ScanFilter should have an error */ + if (brokenSf.getNdbError().code != 4539) + { + ndbout << "Expected error 4539, had error " << + brokenSf.getNdbError().code << " instead" << endl; + return NDBT_FAILED; + } + + if (brokenSf.begin() != -1) + { ndbout << "Bad rc from begin" << endl; return NDBT_FAILED; } + + if (brokenSf.istrue() != -1) + { ndbout << "Bad rc from istrue" << endl; return NDBT_FAILED; } + + if (brokenSf.isfalse() != -1) + { ndbout << "Bad rc from isfalse" << endl; return NDBT_FAILED; } + + if (brokenSf.isnull(0) != -1) + { ndbout << "Bad rc from isnull" << endl; return NDBT_FAILED; } + + if (brokenSf.isnotnull(0) != -1) + { ndbout << "Bad rc from isnotnull" << endl; return NDBT_FAILED; } + + if (brokenSf.cmp(NdbScanFilter::COND_EQ, 0, NULL, 0) != -1) + { ndbout << "Bad rc from cmp" << endl; return NDBT_FAILED; } + + if (brokenSf.end() != -1) + { ndbout << "Bad rc from begin" << endl; return NDBT_FAILED; } + + trans->close(); + + /* Now we check that we can define a ScanFilter before + * calling readTuples() for a scan operation + */ + trans= myNdb->startTransaction(); + + if (trans == NULL) + { + APIERROR(trans->getNdbError()); + return NDBT_FAILED; + } + + /* Get an old Api table scan operation */ + NdbScanOperation* tabScanOp= + trans->getNdbScanOperation(myTable); + + if (tabScanOp==NULL) + { + APIERROR(trans->getNdbError()); + return NDBT_FAILED; + } + + /* Attempt to define a ScanFilter before calling readTuples() */ + NdbScanFilter sf(tabScanOp); + + /* Should be no problem ... */ + if (sf.getNdbError().code != 0) + { APIERROR(sf.getNdbError()); return NDBT_FAILED; }; + + + /* Ok, now attempt to define a ScanFilter against a primary key op */ + NdbOperation* pkOp= trans->getNdbOperation(myTable); + + if (pkOp == NULL) + { + APIERROR(trans->getNdbError()); + return NDBT_FAILED; + } + + NdbScanFilter sf2(pkOp); + + if (sf2.getNdbError().code != 4539) + { + ndbout << "Error, expected 4539" << endl; + APIERROR(sf2.getNdbError()); + return NDBT_FAILED; + } + + return NDBT_OK; +} + NDBT_TESTSUITE(testScanFilter); TESTCASE(TEST_NAME, "Scan table TABLE_NAME for the records which accord with \ @@ -903,6 +1029,7 @@ INITIALIZER(runPopulate); INITIALIZER(runScanRandomFilterTest); INITIALIZER(runMaxScanFilterSize); + INITIALIZER(runScanFilterConstructorFail); FINALIZER(runDropTables); } @@ -918,6 +1045,7 @@ { return NDBT_ProgramExit(NDBT_FAILED); } - + + NDBT_TESTSUITE_INSTANCE(testScanFilter); return testScanFilter.executeOneCtx(con, &MYTAB1, TEST_NAME); } === modified file 'storage/ndb/test/ndbapi/testScanInterpreter.cpp' --- a/storage/ndb/test/ndbapi/testScanInterpreter.cpp 2006-12-23 19:20:40 +0000 +++ b/storage/ndb/test/ndbapi/testScanInterpreter.cpp 2008-08-04 13:40:17 +0000 @@ -273,6 +273,7 @@ int main(int argc, const char** argv){ ndb_init(); + NDBT_TESTSUITE_INSTANCE(testScanInterpreter); return testScanInterpreter.execute(argc, argv); } === modified file 'storage/ndb/test/ndbapi/testSingleUserMode.cpp' --- a/storage/ndb/test/ndbapi/testSingleUserMode.cpp 2008-06-23 12:52:49 +0000 +++ b/storage/ndb/test/ndbapi/testSingleUserMode.cpp 2008-08-04 13:40:17 +0000 @@ -176,6 +176,7 @@ int main(int argc, const char** argv){ ndb_init(); + NDBT_TESTSUITE_INSTANCE(testSingleUserMode); return testSingleUserMode.execute(argc, argv); } === modified file 'storage/ndb/test/ndbapi/testSystemRestart.cpp' --- a/storage/ndb/test/ndbapi/testSystemRestart.cpp 2008-06-18 21:25:50 +0000 +++ b/storage/ndb/test/ndbapi/testSystemRestart.cpp 2008-08-04 13:40:17 +0000 @@ -2018,6 +2018,7 @@ int main(int argc, const char** argv){ ndb_init(); + NDBT_TESTSUITE_INSTANCE(testSystemRestart); return testSystemRestart.execute(argc, argv); } === modified file 'storage/ndb/test/ndbapi/testTimeout.cpp' --- a/storage/ndb/test/ndbapi/testTimeout.cpp 2006-12-23 19:20:40 +0000 +++ b/storage/ndb/test/ndbapi/testTimeout.cpp 2008-08-04 13:40:17 +0000 @@ -556,6 +556,7 @@ int main(int argc, const char** argv){ ndb_init(); myRandom48Init(NdbTick_CurrentMillisecond()); + NDBT_TESTSUITE_INSTANCE(testTimeout); return testTimeout.execute(argc, argv); } === modified file 'storage/ndb/test/ndbapi/testUpgrade.cpp' --- a/storage/ndb/test/ndbapi/testUpgrade.cpp 2008-02-21 13:57:42 +0000 +++ b/storage/ndb/test/ndbapi/testUpgrade.cpp 2008-08-04 13:40:17 +0000 @@ -484,6 +484,7 @@ int main(int argc, const char** argv){ ndb_init(); + NDBT_TESTSUITE_INSTANCE(testUpgrade); testUpgrade.setCreateAllTables(true); return testUpgrade.execute(argc, argv); } === modified file 'storage/ndb/test/ndbapi/test_event.cpp' --- a/storage/ndb/test/ndbapi/test_event.cpp 2008-07-22 13:27:57 +0000 +++ b/storage/ndb/test/ndbapi/test_event.cpp 2008-08-05 10:52:53 +0000 @@ -23,14 +23,13 @@ #include #include -static int createEvent(Ndb *pNdb, +static int createEvent(Ndb *pNdb, const NdbDictionary::Table &tab, - NDBT_Context* ctx) + bool merge_events, + bool report) { char eventName[1024]; sprintf(eventName,"%s_EVENT",tab.getName()); - bool merge_events = ctx->getProperty("MergeEvents"); - bool report = ctx->getProperty("ReportSubscribe"); NdbDictionary::Dictionary *myDict = pNdb->getDictionary(); @@ -87,6 +86,16 @@ return NDBT_OK; } +static int createEvent(Ndb *pNdb, + const NdbDictionary::Table &tab, + NDBT_Context* ctx) +{ + bool merge_events = ctx->getProperty("MergeEvents"); + bool report = ctx->getProperty("ReportSubscribe"); + + return createEvent(pNdb, tab, merge_events, report); +} + static int dropEvent(Ndb *pNdb, const NdbDictionary::Table &tab) { char eventName[1024]; @@ -2688,6 +2697,346 @@ return NDBT_OK; } +const NdbDictionary::Table* createBoringTable(const char* name, Ndb* pNdb) +{ + NdbDictionary::Table tab; + + tab.setName(name); + + NdbDictionary::Column pk; + pk.setName("Key"); + pk.setType(NdbDictionary::Column::Unsigned); + pk.setLength(1); + pk.setNullable(false); + pk.setPrimaryKey(true); + tab.addColumn(pk); + + NdbDictionary::Column attr; + attr.setName("Attr"); + attr.setType(NdbDictionary::Column::Unsigned); + attr.setLength(1); + attr.setNullable(true); + attr.setPrimaryKey(false); + tab.addColumn(attr); + + pNdb->getDictionary()->dropTable(tab.getName()); + if(pNdb->getDictionary()->createTable(tab) == 0) + { + ndbout << (NDBT_Table&)tab << endl; + return pNdb->getDictionary()->getTable(tab.getName()); + } + + ndbout << "Table create failed, err : " << + pNdb->getDictionary()->getNdbError().code << endl; + + return NULL; +} + +/* Types of operation which can be tagged via 'setAnyValue */ +enum OpTypes {Insert, Update, Write, Delete, EndOfOpTypes}; + +/** + * executeOps + * Generate a number of PK operations of the supplied type + * using the passed operation options and setting the + * anyValue tag + */ +int +executeOps(Ndb* pNdb, + const NdbDictionary::Table* tab, + OpTypes op, + Uint32 rowCount, + Uint32 keyOffset, + Uint32 anyValueOffset, + NdbOperation::OperationOptions opts) +{ + NdbTransaction* trans= pNdb->startTransaction(); + const NdbRecord* record= tab->getDefaultRecord(); + + char RowBuf[16]; + Uint32* keyPtr= (Uint32*) NdbDictionary::getValuePtr(record, + RowBuf, + 0); + Uint32* attrPtr= (Uint32*) NdbDictionary::getValuePtr(record, + RowBuf, + 1); + + for (Uint32 i=keyOffset; i < (keyOffset + rowCount); i++) + { + *keyPtr= *attrPtr= i; + opts.optionsPresent |= NdbOperation::OperationOptions::OO_ANYVALUE; + opts.anyValue= anyValueOffset + i; + bool allowInterpreted= + (op == Update) || + (op == Delete); + + if (!allowInterpreted) + opts.optionsPresent &= + ~ (Uint64) NdbOperation::OperationOptions::OO_INTERPRETED; + + switch (op) { + case Insert : + if (trans->insertTuple(record, + RowBuf, + NULL, + &opts, + sizeof(opts)) == NULL) + { + g_err << "Can't create operation : " << + trans->getNdbError().code << endl; + return NDBT_FAILED; + } + break; + case Update : + if (trans->updateTuple(record, + RowBuf, + record, + RowBuf, + NULL, + &opts, + sizeof(opts)) == NULL) + { + g_err << "Can't create operation : " << + trans->getNdbError().code << endl; + return NDBT_FAILED; + } + break; + case Write : + if (trans->writeTuple(record, + RowBuf, + record, + RowBuf, + NULL, + &opts, + sizeof(opts)) == NULL) + { + g_err << "Can't create operation : " << + trans->getNdbError().code << endl; + return NDBT_FAILED; + } + break; + case Delete : + if (trans->deleteTuple(record, + RowBuf, + record, + NULL, + NULL, + &opts, + sizeof(opts)) == NULL) + { + g_err << "Can't create operation : " << + trans->getNdbError().code << endl; + return NDBT_FAILED; + } + break; + default: + g_err << "Bad operation type : " << op << endl; + return NDBT_FAILED; + } + } + + trans->execute(Commit); + + if (trans->getNdbError().code != 0) + { + g_err << "Error executing operations :" << + trans->getNdbError().code << endl; + return NDBT_FAILED; + } + + trans->close(); + + return NDBT_OK; +} + +int +checkAnyValueInEvent(Ndb* pNdb, + NdbRecAttr* preKey, + NdbRecAttr* postKey, + NdbRecAttr* preAttr, + NdbRecAttr* postAttr, + Uint32 num, + Uint32 anyValueOffset, + bool checkPre) +{ + Uint32 received= 0; + + while (received < num) + { + int pollRc; + + if ((pollRc= pNdb->pollEvents(10000)) < 0) + { + g_err << "Error while polling for events : " << + pNdb->getNdbError().code; + return NDBT_FAILED; + } + + if (pollRc == 0) + { + printf("No event, waiting...\n"); + continue; + } + + NdbEventOperation* event; + while((event= pNdb->nextEvent()) != NULL) + { +// printf("Event is %p of type %u\n", +// event, event->getEventType()); +// printf("Got event, prekey is %u predata is %u \n", +// preKey->u_32_value(), +// preAttr->u_32_value()); +// printf(" postkey is %u postdata is %u anyvalue is %u\n", +// postKey->u_32_value(), +// postAttr->u_32_value(), +// event->getAnyValue()); + + received ++; + Uint32 keyVal= (checkPre? + preKey->u_32_value() : + postKey->u_32_value()); + + if (event->getAnyValue() != + (anyValueOffset + keyVal)) + { + g_err << "Error : Got event, key is " << + keyVal << " anyValue is " << + event->getAnyValue() << + " expected " << (anyValueOffset + keyVal) + << endl; + return NDBT_FAILED; + } + } + } + + return NDBT_OK; +} + + + +int +runBug37672(NDBT_Context* ctx, NDBT_Step* step) +{ + /* InterpretedDelete and setAnyValue failed */ + /* Let's create a boring, known table for this since + * we don't yet have Hugo tools for NdbRecord + */ + BaseString name; + name.assfmt("TAB_TESTEVENT%d", rand() & 65535); + Ndb* pNdb= GETNDB(step); + + const NdbDictionary::Table* tab= createBoringTable(name.c_str(), pNdb); + + if (tab == NULL) + return NDBT_FAILED; + + /* Create an event to listen to events on the table */ + char eventName[1024]; + sprintf(eventName,"%s_EVENT", tab->getName()); + + if (createEvent(pNdb, *tab, false, true) != 0) + return NDBT_FAILED; + + /* Now create the event operation to retrieve the events */ + NdbEventOperation* eventOp; + eventOp= pNdb->createEventOperation(eventName); + + if (eventOp == NULL) + { + g_err << "Failed to create event operation :" << + pNdb->getNdbError().code << endl; + return NDBT_FAILED; + } + + NdbRecAttr* eventKeyData= eventOp->getValue("Key"); + NdbRecAttr* eventOldKeyData= eventOp->getPreValue("Key"); + NdbRecAttr* eventAttrData= eventOp->getValue("Attr"); + NdbRecAttr* eventOldAttrData= eventOp->getPreValue("Attr"); + + if ((eventKeyData == NULL) || (eventAttrData == NULL)) + { + g_err << "Failed to get NdbRecAttrs for events" << endl; + return NDBT_FAILED; + }; + + if (eventOp->execute() != 0) + { + g_err << "Failed to execute event operation :" << + eventOp->getNdbError().code << endl; + return NDBT_FAILED; + } + + /* Perform some operations on the table, and check + * that we get the correct AnyValues propagated + * through + */ + NdbOperation::OperationOptions opts; + opts.optionsPresent= 0; + + NdbInterpretedCode nonsenseProgram; + + nonsenseProgram.load_const_u32(0, 0); + nonsenseProgram.interpret_exit_ok(); + + nonsenseProgram.finalise(); + + const Uint32 rowCount= 1500; + Uint32 keyOffset= 0; + Uint32 anyValueOffset= 100; + + printf ("Testing AnyValue with no interpreted program\n"); + for (int variants= 0; variants < 2; variants ++) + { + for (int op= Insert; op < EndOfOpTypes; op++) + { + printf(" Testing opType %d (ko=%d, ao=%d)...", + op, keyOffset, anyValueOffset); + + if (executeOps(pNdb, + tab, + (OpTypes)op, + rowCount, + keyOffset, + anyValueOffset, + opts)) + return NDBT_FAILED; + + if (checkAnyValueInEvent(pNdb, + eventOldKeyData, eventKeyData, + eventOldAttrData, eventAttrData, + rowCount, + anyValueOffset, + false // always use postKey data + ) != NDBT_OK) + return NDBT_FAILED; + printf("ok\n"); + }; + + printf("Testing AnyValue with interpreted program\n"); + opts.optionsPresent|= NdbOperation::OperationOptions::OO_INTERPRETED; + opts.interpretedCode= &nonsenseProgram; + } + + if (dropEventOperations(pNdb) != 0) + { + g_err << "Dropping event operations failed : " << + pNdb->getNdbError().code << endl; + return NDBT_FAILED; + } + + if (dropEvent(pNdb, tab->getName()) != 0) + { + g_err << "Dropping event failed : " << + pNdb->getDictionary()->getNdbError().code << endl; + return NDBT_FAILED; + } + + pNdb->getDictionary()->dropTable(tab->getName()); + + return NDBT_OK; +} + + NDBT_TESTSUITE(test_event); TESTCASE("BasicEventOperation", "Verify that we can listen to Events" @@ -2879,10 +3228,15 @@ { INITIALIZER(runBug37442); } +TESTCASE("Bug37672", "NdbRecord option OO_ANYVALUE causes interpreted delete to abort.") +{ + INITIALIZER(runBug37672); +} NDBT_TESTSUITE_END(test_event); int main(int argc, const char** argv){ ndb_init(); + NDBT_TESTSUITE_INSTANCE(test_event); test_event.setCreateAllTables(true); return test_event.execute(argc, argv); } === modified file 'storage/ndb/test/run-test/daily-basic-tests.txt' --- a/storage/ndb/test/run-test/daily-basic-tests.txt 2008-07-01 16:16:30 +0000 +++ b/storage/ndb/test/run-test/daily-basic-tests.txt 2008-08-07 12:32:06 +0000 @@ -1197,6 +1197,16 @@ cmd: testBasic args: -n PkUpdate WIDE_MAXKEY_HUGO WIDE_MAXATTR_HUGO WIDE_MAXKEYMAXCOLS_HUGO WIDE_MINKEYMAXCOLS_HUGO - # EOF 2008-06-30 -# EOF + +max-time: 500 +cmd: test_event +args -n bug37672 T1 + +#EOF 2008-07-04 + +max-time: 500 +cmd: testScanFilter +args: + +#EOF 2008-07-09 === modified file 'storage/ndb/test/run-test/daily-devel-tests.txt' --- a/storage/ndb/test/run-test/daily-devel-tests.txt 2008-06-23 12:52:49 +0000 +++ b/storage/ndb/test/run-test/daily-devel-tests.txt 2008-08-04 19:58:31 +0000 @@ -3,7 +3,7 @@ # max-time: 1500 cmd: testIndex -args: -n CreateAll T1 T6 T13 +args: -n CreateAll T1 T13 T14 #-m 7200 1: testIndex -n InsertDeleteGentle T6 max-time: 3600 === modified file 'storage/ndb/test/src/NDBT_Test.cpp' --- a/storage/ndb/test/src/NDBT_Test.cpp 2008-07-22 13:25:43 +0000 +++ b/storage/ndb/test/src/NDBT_Test.cpp 2008-08-04 19:02:08 +0000 @@ -1049,15 +1049,16 @@ for(unsigned i = 0; idropTable(tab_name) != 0) + if (pDict->dropTable(tab_name) != 0 && + pDict->getNdbError().code != 723) // No such table { - g_err << "runCreateTables: Failed to drop table " << tab_name + g_err << "runCreateTables: Failed to drop table " << tab_name << endl << pDict->getNdbError() << endl; return NDBT_FAILED; } - if(NDBT_Tables::createTable(&ndb, tab_name, getLogging()) != 0) + if(NDBT_Tables::createTable(&ndb, tab_name, !getLogging()) != 0) { - g_err << "runCreateTables: Failed to create table " << tab_name + g_err << "runCreateTables: Failed to create table " << tab_name << endl << pDict->getNdbError() << endl; return NDBT_FAILED; } @@ -1091,15 +1092,16 @@ NdbDictionary::Dictionary* pDict = ndb.getDictionary(); const NdbDictionary::Table* pTab = ctx->getTab(); const char *tab_name= pTab->getName(); - if (pDict->dropTable(tab_name) > 0) + if (pDict->dropTable(tab_name) != 0 && + pDict->getNdbError().code != 723) // No such table { - g_err << "runCreateTable: Failed to drop table " << tab_name + g_err << "runCreateTable: Failed to drop table " << tab_name << endl << pDict->getNdbError() << endl; return NDBT_FAILED; } if(NDBT_Tables::createTable(&ndb, tab_name, - ctx->getSuite()->getLogging()) != 0) + !ctx->getSuite()->getLogging()) != 0) { g_err << "runCreateTable: Failed to create table " << tab_name << pDict->getNdbError() << endl; === modified file 'storage/ndb/tools/restore/Restore.cpp' --- a/storage/ndb/tools/restore/Restore.cpp 2008-06-02 13:27:27 +0000 +++ b/storage/ndb/tools/restore/Restore.cpp 2008-08-05 14:34:39 +0000 @@ -1365,13 +1365,19 @@ if (Header.SectionType == BackupFormat::EMPTY_ENTRY) { void *tmp; - buffer_get_ptr(&tmp, Header.SectionLength*4-8, 1); + if (Header.SectionLength < 2) + { + err << "getFragmentFooter:Error reading fragment footer" << endl; + return false; + } + if (Header.SectionLength > 2) + buffer_get_ptr(&tmp, Header.SectionLength*4-8, 1); continue; } break; } /* read rest of header */ - if (buffer_read(((char*)&Header)+8, sizeof(Header)-8, 1) != 1) + if (buffer_read(((char*)&Header)+8, Header.SectionLength*4-8, 1) != 1) { ret = 0; return false; --===============0648083061==--