# HG changeset patch # User hgs # Date 1273840330 -3600 # Node ID 7a522c0700d3bb013be5c5b805df718d7e3d6ea9 # Parent d6ef85bc5971e4e15f2743d6061c6b3964fe3671 201019_09 diff -r d6ef85bc5971 -r 7a522c0700d3 loggingservices/eventlogger/Rom/logengtest.iby --- a/loggingservices/eventlogger/Rom/logengtest.iby Fri May 14 17:36:33 2010 +0300 +++ b/loggingservices/eventlogger/Rom/logengtest.iby Fri May 14 13:32:10 2010 +0100 @@ -61,11 +61,13 @@ file=ABI_DIR\BUILD_DIR\t_logcompat.exe Test\t_logcompat.exe file=ABI_DIR\BUILD_DIR\t_logsimid.exe Test\t_logsimid.exe -data=ZSYSTEM\test\logengtests.bat Test\logengtests.bat -data=ZSYSTEM\data\oldLogdbu.dat system\data\oldLogdbu.dat -data=ZSYSTEM\data\corruptLogdbu.dat system\data\corruptLogdbu.dat -data=ZSYSTEM\data\corruptDamagedLogdbu.dat system\data\corruptDamagedLogdbu.dat -data=ZSYSTEM\data\101f401d.txt system\data\101f401d.txt +data=DATAZ_\test\logengtests.bat Test\logengtests.bat + +data=DATAZ_\test\oldLogdbu.dat Test\oldLogdbu.dat +data=DATAZ_\test\corruptLogdbu.dat Test\corruptLogdbu.dat +data=DATAZ_\test\corruptDamagedLogdbu.dat Test\corruptDamagedLogdbu.dat +data=DATAZ_\test\101f401d.txt Test\101f401d.txt + //The next line to be uncommented if the testing is performed locally. Otherwise t_logview2 fails - //the following file is missing and needed by the time zone server. //data=ZPRIVATE\10202BE9\1020383e.txt private\10202be9\1020383e.txt diff -r d6ef85bc5971 -r 7a522c0700d3 loggingservices/eventlogger/group/BLD.INF --- a/loggingservices/eventlogger/group/BLD.INF Fri May 14 17:36:33 2010 +0300 +++ b/loggingservices/eventlogger/group/BLD.INF Fri May 14 13:32:10 2010 +0100 @@ -20,6 +20,7 @@ */ PRJ_EXPORTS + ../LogWrap/inc/LOGWRAP.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logwrap.h) ../LogWrap/inc/LOGWRAPCONST.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logwrapconst.h) ../LogWrap/inc/LOGWRAPLIMITS.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(logwraplimits.h) @@ -51,6 +52,7 @@ ../conf/eventlogger_101f401d.crml OS_LAYER_EXPORTS_CRML(eventlogger_101f401d.crml) PRJ_MMPFILES + LOGWRAP.MMP logstub.mmp logserv.mmp @@ -58,14 +60,17 @@ logcntmodel.mmp PRJ_TESTEXPORTS -../Rom/logengtest.iby /epoc32/rom/include/logengtest.iby -../group/logengtests.bat /epoc32/data/z/system/test/logengtests.bat -../test/contacttestmanualpost.bat /epoc32/data/z/system/test/contacttestmanualpost.bat -../test/contacttestmanualpre.bat /epoc32/data/z/system/test/contacttestmanualpre.bat -../test/logservcntmatch.rsc /epoc32/data/z/system/test/logservcntmatch.rsc + +../Rom/logengtest.iby /epoc32/rom/include/logengtest.iby +../group/logengtests.bat z:/test/logengtests.bat +../test/src/oldLogdbu.dat z:/test/oldLogdbu.dat +../test/src/corruptLogdbu.dat z:/test/corruptLogdbu.dat +../test/src/corruptDamagedLogdbu.dat z:/test/corruptDamagedLogdbu.dat +../test/101f401d.txt z:/test/101f401d.txt PRJ_TESTMMPFILES + ../test/t_logtype.mmp ../test/t_logapi.mmp ../test/t_logapi2.mmp @@ -101,8 +106,4 @@ ../test/t_logsimid.mmp ../test/t_logcntmatchplugin.mmp support -PRJ_TESTEXTENSIONS -start extension syslibs/test/logeng_copytestfiles -end - #include "../test/tef/group/bld.inf" diff -r d6ef85bc5971 -r 7a522c0700d3 loggingservices/eventlogger/test/contacttestmanualpost.bat --- a/loggingservices/eventlogger/test/contacttestmanualpost.bat Fri May 14 17:36:33 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -@echo off -rem -rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -rem All rights reserved. -rem This component and the accompanying materials are made available -rem under the terms of "Eclipse Public License v1.0" -rem which accompanies this distribution, and is available -rem at the URL "http://www.eclipse.org/legal/epl-v10.html". -rem -rem Initial Contributors: -rem Nokia Corporation - initial contribution. -rem -rem Contributors: -rem -rem Description: -rem - -if not exist %EPOCROOT%EPOC32\RELEASE\WINSCW\UDEB\Z\private\101f401d\LOGSERV.RSC.TMP goto noTmpFiles - -rem Delete new ( matching disabled ) rsc files -del /f %EPOCROOT%EPOC32\RELEASE\WINSCW\UDEB\Z\private\101f401d\LOGSERV.RSC -del /f %EPOCROOT%EPOC32\RELEASE\WINSCW\UREL\Z\private\101f401d\LOGSERV.RSC -del /f %EPOCROOT%EPOC32\data\Z\Private\101f401d\logserv.rsc - -rem Restore original ( matching disabled ) rsc files -rename %EPOCROOT%EPOC32\RELEASE\WINSCW\UDEB\Z\private\101f401d\LOGSERV.RSC.TMP LOGSERV.RSC -rename %EPOCROOT%EPOC32\RELEASE\WINSCW\UREL\Z\private\101f401d\LOGSERV.RSC.TMP LOGSERV.RSC -rename %EPOCROOT%EPOC32\data\Z\Private\101f401d\logserv.rsc.tmp logserv.rsc -goto :EOF - -:noTmpFiles -@echo No temp files exist, pre bat file hasn't been run or %0 already called diff -r d6ef85bc5971 -r 7a522c0700d3 loggingservices/eventlogger/test/contacttestmanualpre.bat --- a/loggingservices/eventlogger/test/contacttestmanualpre.bat Fri May 14 17:36:33 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -@echo off -rem -rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -rem All rights reserved. -rem This component and the accompanying materials are made available -rem under the terms of "Eclipse Public License v1.0" -rem which accompanies this distribution, and is available -rem at the URL "http://www.eclipse.org/legal/epl-v10.html". -rem -rem Initial Contributors: -rem Nokia Corporation - initial contribution. -rem -rem Contributors: -rem -rem Description: -rem - -@rem This call is so that the batch file can be used unaltered by the ONB -@if exist \textshell.bat call \textshell.bat - -@if not exist %EPOCROOT%EPOC32\DATA\Z\SYSTEM\TEST\LOGSERVCNTMATCH.RSC goto notBuilt -@if exist %EPOCROOT%EPOC32\RELEASE\WINSCW\UDEB\Z\private\101f401d\LOGSERV.RSC.TMP goto TmpFilesExist - -@rem Save original ( matching disabled ) rsc files -@rename %EPOCROOT%EPOC32\RELEASE\WINSCW\UDEB\Z\private\101f401d\LOGSERV.RSC LOGSERV.RSC.TMP -@rename %EPOCROOT%EPOC32\RELEASE\WINSCW\UREL\Z\private\101f401d\LOGSERV.RSC LOGSERV.RSC.TMP -@rename %EPOCROOT%EPOC32\data\Z\Private\101f401d\logserv.rsc logserv.rsc.tmp - -@rem Copy over new ( matching enabled ) rsc file -@copy /y %EPOCROOT%EPOC32\DATA\Z\SYSTEM\TEST\LOGSERVCNTMATCH.RSC %EPOCROOT%EPOC32\RELEASE\WINSCW\UDEB\Z\private\101f401d\LOGSERV.RSC -@copy /y %EPOCROOT%EPOC32\DATA\Z\SYSTEM\TEST\LOGSERVCNTMATCH.RSC %EPOCROOT%EPOC32\RELEASE\WINSCW\UREL\Z\private\101f401d\LOGSERV.RSC -@copy /y %EPOCROOT%EPOC32\DATA\Z\SYSTEM\TEST\LOGSERVCNTMATCH.RSC %EPOCROOT%EPOC32\data\Z\Private\101f401d\logserv.rsc -@goto :EOF - -:TmpFilesExist -@echo Tmp files exist %0 already called -@goto :EOF - -:notBuilt -@echo %EPOCROOT%EPOC32\DATA\Z\SYSTEM\TEST\LOGSERVCNTMATCH.RSC doesn't exist, test files not exported. diff -r d6ef85bc5971 -r 7a522c0700d3 loggingservices/eventlogger/test/logservcntmatch.rsc Binary file loggingservices/eventlogger/test/logservcntmatch.rsc has changed diff -r d6ef85bc5971 -r 7a522c0700d3 loggingservices/eventlogger/test/src/CntModel.ini Binary file loggingservices/eventlogger/test/src/CntModel.ini has changed diff -r d6ef85bc5971 -r 7a522c0700d3 loggingservices/eventlogger/test/src/SQLite__Contacts.cdb Binary file loggingservices/eventlogger/test/src/SQLite__Contacts.cdb has changed diff -r d6ef85bc5971 -r 7a522c0700d3 loggingservices/eventlogger/test/src/t_logapi.cpp --- a/loggingservices/eventlogger/test/src/t_logapi.cpp Fri May 14 17:36:33 2010 +0300 +++ b/loggingservices/eventlogger/test/src/t_logapi.cpp Fri May 14 13:32:10 2010 +0100 @@ -786,7 +786,7 @@ User::After(1000); //copy the repository file to the folder 10202be9 - _LIT(KCommandParameters1, "z:\\system\\data\\101f401d.txt;c:\\private\\10202be9\\101f401d.txt;0"); + _LIT(KCommandParameters1, "z:\\test\\101f401d.txt;c:\\private\\10202be9\\101f401d.txt;0"); r = process.Create(KExecutableFileName, KCommandParameters1); process.Resume(); process.Close(); diff -r d6ef85bc5971 -r 7a522c0700d3 loggingservices/eventlogger/test/src/t_loghicaphelper.cpp --- a/loggingservices/eventlogger/test/src/t_loghicaphelper.cpp Fri May 14 17:36:33 2010 +0300 +++ b/loggingservices/eventlogger/test/src/t_loghicaphelper.cpp Fri May 14 13:32:10 2010 +0100 @@ -69,9 +69,9 @@ EIsMatchingEnabled } ; -_LIT(KOldCorruptDatabase,"z:\\system\\data\\corruptLogdbu.dat"); -_LIT(KOldCorruptDamagedDatabase,"z:\\system\\data\\corruptDamagedLogdbu.dat"); -_LIT(KOldFormatDatabase,"z:\\system\\data\\oldLogdbu.dat"); +_LIT(KOldCorruptDatabase,"z:\\test\\corruptLogdbu.dat"); +_LIT(KOldCorruptDamagedDatabase,"z:\\test\\corruptDamagedLogdbu.dat"); +_LIT(KOldFormatDatabase,"z:\\test\\oldLogdbu.dat"); CTestActive::CTestActive(TInt aPriority) diff -r d6ef85bc5971 -r 7a522c0700d3 loggingservices/filelogger/SCLI/FLOGCLI.CPP --- a/loggingservices/filelogger/SCLI/FLOGCLI.CPP Fri May 14 17:36:33 2010 +0300 +++ b/loggingservices/filelogger/SCLI/FLOGCLI.CPP Fri May 14 13:32:10 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1997-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -423,11 +423,26 @@ TBuf8<1600> buf; //Want at least an mtu sized buffer //PG 14/08/2002 - If mode is set to *Raw, Don't change format of client buffer if(aMode == EFileLoggingModeAppendRaw || aMode == EFileLoggingModeOverwriteRaw) - buf.Copy(aText); + { + TPtrC8 ptr8; + if (logger.LogSTI()) + { + ptr8.Set(aText.Left(KLogBufferSize)); //in LogSTI mode, truncate to KLogBufferSize + } + else + { + ptr8.Set(aText.Left(1600)); // truncate to 1600 + } + buf.Copy(ptr8); + } else + { ret=logger.iFormatter.FormatTextToWritableBuffer(buf,aText); + } if (ret==KErrNone) + { logger.DoStaticWrite(buf); + } } logger.Close(); } @@ -597,11 +612,12 @@ n.Copy(aBuf); TFileName logFileName = iLogFile.Name(); RDebug::Print(_L("FLG %S %S"),&logFileName,&n); - } else - { - TPckg logFilePckg(iLogFile); - iLastError=SendReceive(EWriteLog,TIpcArgs (&logFilePckg, &aBuf)); - } + } + else + { + TPckg logFilePckg(iLogFile); + iLastError=SendReceive(EWriteLog,TIpcArgs (&logFilePckg, &aBuf)); + } } void RFileLogger::DoStaticWrite(const TDesC8& aBuf) @@ -624,10 +640,11 @@ n.Copy(aBuf); TFileName logFileName = iLogFile.Name(); RDebug::Print(_L("FLG %S %S"),&logFileName,&n); - } else - { - SendReceive(ECreateWriteAndCloseLog, TIpcArgs( &logFilePckg, &aBuf)); // ignore error - } + } + else + { + SendReceive(ECreateWriteAndCloseLog, TIpcArgs( &logFilePckg, &aBuf)); // ignore error + } } void RFileLogger::DoWriteFormat(TRefByValue aFmt, VA_LIST& aList) diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/dbms/group/BLD.INF --- a/persistentstorage/dbms/group/BLD.INF Fri May 14 17:36:33 2010 +0300 +++ b/persistentstorage/dbms/group/BLD.INF Fri May 14 13:32:10 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1999-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -40,6 +40,7 @@ ../bmake/EDBSRV.MMP PRJ_TESTMMPFILES + ../tdbms/t_dbenvcreate.mmp ../tdbms/t_dbalter.mmp ../tdbms/t_dbbench.mmp @@ -77,11 +78,28 @@ ../tdbms/t_dbperf3.mmp ../tdbms/t_dbenvdestroy.mmp -PRJ_TESTEXTENSIONS -start extension syslibs/test/dbms_copytestdbscfiles -end - PRJ_TESTEXPORTS -DBMSTests.iby /epoc32/rom/include/dbmstests.iby -DbmsTests.bat /epoc32/data/z/system/test/dbmstests.bat +DBMSTests.iby /epoc32/rom/include/dbmstests.iby +DbmsTests.bat z:/test/dbmstests.bat + +../tdbms/11335577.spd z:/private/100012a5/policy/11335577.spd +../tdbms/11335578.spd z:/private/100012a5/policy/11335578.spd +../tdbms/11335579.spd z:/private/100012a5/policy/11335579.spd +../tdbms/1133557A.spd z:/private/100012a5/policy/1133557a.spd +../tdbms/12344321.spd z:/private/100012a5/policy/12344321.spd +../tdbms/dbs_11335578_A.DB z:/private/100012a5/dbs_11335578_a.db +../tdbms/dbs_11335578_B.DB z:/private/100012a5/dbs_11335578_b.db +../tdbms/dbs_11335578_Z.DB z:/private/100012a5/dbs_11335578_z.db +../tdbms/dbs_11335579_TESTDB.DB z:/private/100012a5/dbs_11335579_testdb.db +../tdbms/dbs_1133557A_ZZZ.DB z:/private/100012a5/dbs_1133557a_zzz.db +../tdbms/dbs_12344321_1234567890123456789012345678901234567890123456789012345678901234567890.DB z:/private/100012a5/dbs_12344321_1234567890123456789012345678901234567890123456789012345678901234567890.db +../tdbms/11335577.txt z:/test/11335577.txt +../tdbms/11335578.txt z:/test/11335578.txt +../tdbms/11335579.txt z:/test/11335579.txt +../tdbms/1133557A.txt z:/test/1133557A.txt +../tdbms/t_dbperf1.sql z:/test/t_dbperf1.sql +../tdbms/t_script.txt z:/test/t_script.txt +../tdbms/typetextktests44.dat z:/test/typetextktests44.dat +../tdbms/typetextktests46.dat z:/test/typetextktests46.dat +../tdbms/typetextktests47.dat z:/test/typetextktests47.dat diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/dbms/group/DBMSTests.iby --- a/persistentstorage/dbms/group/DBMSTests.iby Fri May 14 17:36:33 2010 +0300 +++ b/persistentstorage/dbms/group/DBMSTests.iby Fri May 14 13:32:10 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -20,30 +20,31 @@ REM DBMS Tests #include -data=ZSYSTEM\TEST\T_SCRIPT.TXT \TEST\T_SCRIPT.TXT -data=ZSYSTEM\TEST\11335577.TXT \TEST\11335577.TXT -data=ZSYSTEM\TEST\11335578.TXT \TEST\11335578.TXT -data=ZSYSTEM\TEST\11335579.TXT \TEST\11335579.TXT -data=ZSYSTEM\TEST\1133557A.TXT \TEST\1133557A.TXT -data=ZSYSTEM\test\DBMStests.bat \TEST\DBMStests.bat -data=ZSYSTEM\TEST\t_dbperf1.sql \TEST\t_dbperf1.sql +data=DATAZ_\test\DBMStests.bat \TEST\DBMStests.bat + +data=DATAZ_\TEST\T_SCRIPT.TXT \TEST\T_SCRIPT.TXT +data=DATAZ_\TEST\11335577.TXT \TEST\11335577.TXT +data=DATAZ_\TEST\11335578.TXT \TEST\11335578.TXT +data=DATAZ_\TEST\11335579.TXT \TEST\11335579.TXT +data=DATAZ_\TEST\1133557A.TXT \TEST\1133557A.TXT +data=DATAZ_\TEST\t_dbperf1.sql \TEST\t_dbperf1.sql // Work around for DEF063276 -data=ZSYSTEM\test\TypeTextKTests44.dat \TEST\TypeTextKTests44.dat -data=ZSYSTEM\test\TypeTextKTests46.dat \TEST\TypeTextKTests46.dat -data=ZSYSTEM\test\TypeTextKTests47.dat \TEST\TypeTextKTests47.dat +data=DATAZ_\test\TypeTextKTests44.dat \TEST\TypeTextKTests44.dat +data=DATAZ_\test\TypeTextKTests46.dat \TEST\TypeTextKTests46.dat +data=DATAZ_\test\TypeTextKTests47.dat \TEST\TypeTextKTests47.dat -data=ZPRIVATE\100012A5\POLICY\11335577.SPD \PRIVATE\100012A5\POLICY\11335577.SPD -data=ZPRIVATE\100012A5\POLICY\11335578.SPD \PRIVATE\100012A5\POLICY\11335578.SPD -data=ZPRIVATE\100012A5\POLICY\11335579.SPD \PRIVATE\100012A5\POLICY\11335579.SPD -data=ZPRIVATE\100012A5\POLICY\1133557A.SPD \PRIVATE\100012A5\POLICY\1133557A.SPD -data=ZPRIVATE\100012A5\POLICY\12344321.SPD \PRIVATE\100012A5\POLICY\12344321.SPD -data=ZPRIVATE\100012A5\DBS_11335578_A.DB \PRIVATE\100012A5\Dbs_11335578_a.dB -data=ZPRIVATE\100012A5\DBS_11335578_B.DB \PRIVATE\100012A5\dbs_11335578_b.DB -data=ZPRIVATE\100012A5\DBS_11335578_Z.DB \PRIVATE\100012A5\dBS_11335578_z.db -data=ZPRIVATE\100012A5\DBS_11335579_TESTDB.DB \PRIVATE\100012A5\DbS_11335579_TEStdB.DB +data=ZPRIVATE\100012A5\POLICY\11335577.SPD \PRIVATE\100012A5\POLICY\11335577.SPD +data=ZPRIVATE\100012A5\POLICY\11335578.SPD \PRIVATE\100012A5\POLICY\11335578.SPD +data=ZPRIVATE\100012A5\POLICY\11335579.SPD \PRIVATE\100012A5\POLICY\11335579.SPD +data=ZPRIVATE\100012A5\POLICY\1133557A.SPD \PRIVATE\100012A5\POLICY\1133557A.SPD +data=ZPRIVATE\100012A5\POLICY\12344321.SPD \PRIVATE\100012A5\POLICY\12344321.SPD +data=ZPRIVATE\100012A5\DBS_11335578_A.DB \PRIVATE\100012A5\Dbs_11335578_a.dB +data=ZPRIVATE\100012A5\DBS_11335578_B.DB \PRIVATE\100012A5\dbs_11335578_b.DB +data=ZPRIVATE\100012A5\DBS_11335578_Z.DB \PRIVATE\100012A5\dBS_11335578_z.db +data=ZPRIVATE\100012A5\DBS_11335579_TESTDB.DB \PRIVATE\100012A5\DbS_11335579_TEStdB.DB data=ZPRIVATE\100012A5\DBS_12344321_1234567890123456789012345678901234567890123456789012345678901234567890.DB \PRIVATE\100012A5\DBS_12344321_1234567890123456789012345678901234567890123456789012345678901234567890.DB -data=ZPRIVATE\100012A5\DBS_1133557A_ZZZ.DB \PRIVATE\100012A5\DBS_1133557A_ZZZ.db +data=ZPRIVATE\100012A5\DBS_1133557A_ZZZ.DB \PRIVATE\100012A5\DBS_1133557A_ZZZ.db file=ABI_DIR\BUILD_DIR\TEST.DBX \SYSTEM\LIBS\TEST.DBX file=ABI_DIR\BUILD_DIR\T_DBENVCREATE.EXE \TEST\T_DBENVCREATE.EXE diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/dbms/pcdbms/ustor/US_FILE.CPP --- a/persistentstorage/dbms/pcdbms/ustor/US_FILE.CPP Fri May 14 17:36:33 2010 +0300 +++ b/persistentstorage/dbms/pcdbms/ustor/US_FILE.CPP Fri May 14 13:32:10 2010 +0100 @@ -91,11 +91,13 @@ { default: __LEAVE(KErrNotSupported); +// When the file cache in file server is on, the order of file writing is not guaranteed which could cause data inconsistency in some circumstances, for example, when the power is lost in the middle of data transaction. Therefore, the file write cache is switched off here to maintain the file integrity . case TDbFormat::ECreate: - store=CPermanentFileStore::CreateL(iFs,aName,EFileRead|EFileWrite); + store=CPermanentFileStore::CreateL(iFs,aName,EFileRead|EFileWrite|EFileWriteDirectIO); break; +// When the file cache in file server is on, the order of file writing is not guaranteed which could cause data inconsistency in some circumstances, for example, when the power is lost in the middle of data transaction. Therefore, the file write cache is switched off here to maintain the file integrity . case TDbFormat::EReplace: - store=CPermanentFileStore::ReplaceL(iFs,aName,EFileRead|EFileWrite); + store=CPermanentFileStore::ReplaceL(iFs,aName,EFileRead|EFileWrite|EFileWriteDirectIO); break; }; iStore=store; @@ -138,6 +140,8 @@ // iName=aName.AllocL(); const TUint mode=aMode==TDbFormat::EReadOnly ? EFileShareReadersOnly : EFileWrite; +// When the file cache in file server is on, the order of file writing is not guaranteed which could cause data inconsistency in some circumstances, for example, when the power is lost in the middle of data transaction. Therefore, the file write cache is switched off here to maintain the file integrity . + mode=mode|EFileWriteDirectIO; CFileStore* store=CPermanentFileStore::OpenL(iFs,*iName,mode); iStore=store; CDbStoreDatabase::RestoreL(DatabaseIdL(store->Root())); diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/dbms/ustor/US_FILE.CPP --- a/persistentstorage/dbms/ustor/US_FILE.CPP Fri May 14 17:36:33 2010 +0300 +++ b/persistentstorage/dbms/ustor/US_FILE.CPP Fri May 14 13:32:10 2010 +0100 @@ -98,10 +98,12 @@ default: __LEAVE(KErrNotSupported); case TDbFormat::ECreate: - store=CPermanentFileStore::CreateL(iFs,aName,EFileRead|EFileWrite); +// When the file cache in file server is on, the order of file writing is not guaranteed which could cause data inconsistency in some circumstances, for example, when the power is lost in the middle of data transaction. Therefore, the file write cache is switched off here to maintain the file integrity . + store=CPermanentFileStore::CreateL(iFs,aName,EFileRead|EFileWrite/EFileWriteDirectIO); break; case TDbFormat::EReplace: - store=CPermanentFileStore::ReplaceL(iFs,aName,EFileRead|EFileWrite); +// When the file cache in file server is on, the order of file writing is not guaranteed which could cause data inconsistency in some circumstances, for example, when the power is lost in the middle of data transaction. Therefore, the file write cache is switched off here to maintain the file integrity . + store=CPermanentFileStore::ReplaceL(iFs,aName,EFileRead|EFileWrite/EFileWriteDirectIO); break; }; iStore=store; @@ -143,7 +145,9 @@ __ASSERT(!iName); // check construction phase // iName=aName.AllocL(); - const TUint mode=aMode==TDbFormat::EReadOnly ? EFileShareReadersOnly : EFileWrite; + TUint mode=aMode==TDbFormat::EReadOnly ? EFileShareReadersOnly : EFileWrite; +// When the file cache in file server is on, the order of file writing is not guaranteed which could cause data inconsistency in some circumstances, for example, when the power is lost in the middle of data transaction. Therefore, the file write cache is switched off here to maintain the file integrity . + mode = mode|EFileWriteDirectIO; CFileStore* store=CPermanentFileStore::OpenL(iFs,*iName,mode); iStore=store; CDbStoreDatabase::RestoreL(DatabaseIdL(store->Root())); diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/sql/GROUP/BLD.INF --- a/persistentstorage/sql/GROUP/BLD.INF Fri May 14 17:36:33 2010 +0300 +++ b/persistentstorage/sql/GROUP/BLD.INF Fri May 14 13:32:10 2010 +0100 @@ -43,8 +43,34 @@ PRJ_TESTEXPORTS -sqltests.iby /epoc32/rom/include/sqltests.iby -sqltests.bat /epoc32/data/z/system/test/sqltests.bat +sqltests.iby /epoc32/rom/include/sqltests.iby +sqltests.bat z:/test/sqltests.bat + +../TEST/TestDb1.db z:/test/testdb1.db +../TEST/CorruptDb.db z:/test/corruptdb.db +../TEST/contacts_schema_to_vendors.sql z:/test/contacts_schema_to_vendors.sql +../TEST/add_simple_contacts.sql z:/test/add_simple_contacts.sql +../TEST/t_SqlShortNonDb.db z:/test/t_sqlshortnondb.db +../TEST/contacts_startup_time.sql z:/test/contacts_startup_time.sql +../TEST/t_inc095412.db z:/test/t_inc095412.db +../TEST/default_avacon.dbSQL z:/test/default_avacon.dbSQL +../TEST/t_sqlbur_backup_ver0.bak z:/test/t_sqlbur_backup_ver0.bak +../TEST/t_sqlperformance4.sql z:/test/t_sqlperformance4.sql +../TEST/{21212122}AADb2.db z:/private/10281e17/[21212122]aadb2.db +../TEST/{21212122}BBDb2.db z:/private/10281e17/[21212122]bbdb2.db +../TEST/{21212125}T_AB.db z:/private/10281e17/[21212125]t_ab.db +../TEST/{1111CCCC}T_AB.db z:/private/10281e17/[1111CCCC]t_ab.db +../TEST/{21212125}T_OneDefPolicy.db z:/private/10281e17/[21212125]t_onedefpolicy.db +//../TEST/SqlServer.cfg z:/private/10281e17/sqlserver.cfg +../TEST/t_sqldb1.db z:/private/21212124/t_sqldb1.db +../TEST/{98765432}t_2defaultpolicies.db z:/private/10281e17/[98765432]t_2defaultpolicies.db +../TEST/{98765432}t_emptysettings.db z:/private/10281e17/[98765432]t_emptysettings.db +../TEST/{98765432}t_invobject.db z:/private/10281e17/[98765432]t_invobject.db +../TEST/{98765432}t_invversion.db z:/private/10281e17/[98765432]t_invversion.db +../TEST/{98765432}t_longcollation.db z:/private/10281e17/[98765432]t_longcollation.db +../TEST/{98765432}t_nocollation.db z:/private/10281e17/[98765432]t_nocollation.db +../TEST/{98765432}t_nodefaultpolicy.db z:/private/10281e17/[98765432]t_nodefaultpolicy.db +../TEST/{98765432}t_nosettings.db z:/private/10281e17/[98765432]t_nosettings.db PRJ_TESTMMPFILES @@ -76,6 +102,7 @@ t_sqlsecurity3.mmp t_sqlsecurity4.mmp t_sqlsecurity5.mmp +t_sqlsecurity6.mmp t_sqlattach.mmp #ifndef WINS //hardware only t_sqlattach2.mmp manual @@ -84,6 +111,7 @@ t_sqlperformance2.mmp t_sqlperformance3.mmp t_sqlperformance4.mmp +t_sqlperformance5.mmp t_sqlood.mmp t_sqloslayer.mmp t_sqldefect.mmp @@ -109,12 +137,8 @@ t_sqlfilesrvcrash1.mmp manual t_sqlfilesrvcrash2.mmp manual #endif +t_sqlcorrupt.mmp t_sqlenvdestroy.mmp - -PRJ_TESTEXTENSIONS -start extension syslibs/test/sql_copysqltestfiles -end - #include "../TEST/testexecute/group/bld.inf" diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/sql/GROUP/sqltests.bat --- a/persistentstorage/sql/GROUP/sqltests.bat Fri May 14 17:36:33 2010 +0300 +++ b/persistentstorage/sql/GROUP/sqltests.bat Fri May 14 13:32:10 2010 +0100 @@ -36,11 +36,13 @@ T_SQLSECURITY3.EXE T_SQLSECURITY4.EXE T_SQLSECURITY5.EXE +T_SQLSECURITY6.EXE T_SQLATTACH.EXE T_SQLPERFORMANCE.EXE T_SQLPERFORMANCE2.EXE T_SQLPERFORMANCE3.EXE T_SQLPERFORMANCE4.EXE +T_SQLPERFORMANCE5.EXE T_SQLOOD.EXE T_SQLOSLAYER.EXE T_SQLDEFECT.EXE @@ -61,4 +63,5 @@ T_SQLFILEBUF64.EXE T_SQLAUTHORIZER.EXE T_SQLSTARTUP.EXE +T_SQLCORRUPT.EXE T_SQLENVDESTROY.EXE diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/sql/GROUP/sqltests.iby --- a/persistentstorage/sql/GROUP/sqltests.iby Fri May 14 17:36:33 2010 +0300 +++ b/persistentstorage/sql/GROUP/sqltests.iby Fri May 14 13:32:10 2010 +0100 @@ -22,8 +22,6 @@ #include #include #include -#include - //Include the following to enable the ulogger server and the client tool. //This is used to perform tracing using the UTF2 @@ -31,32 +29,32 @@ //#include //#include -data=ZSYSTEM\test\sqlTests.bat \TEST\sqlTests.bat -data=ZSYSTEM\test\contacts_schema_to_vendors.sql \TEST\contacts_schema_to_vendors.sql -data=ZSYSTEM\test\add_simple_contacts.sql \TEST\add_simple_contacts.sql -data=ZSYSTEM\test\contacts_startup_time.sql \TEST\contacts_startup_time.sql -data=ZSYSTEM\test\TestDb1.DB \TEST\TestDb1.dB -data=ZSYSTEM\test\CorruptDb.DB \TEST\CorruptDb.dB -data=ZSYSTEM\test\t_SqlShortNonDb.db \TEST\t_SqlShortNonDb.db -data=ZPRIVATE\10281e17\[21212122]AADb2.db \PRIVATE\10281e17\[21212122]AADb2.db -data=ZPRIVATE\10281e17\[21212122]BBDb2.db \PRIVATE\10281e17\[21212122]BBDb2.db -data=ZPRIVATE\10281e17\[21212125]T_AB.db \PRIVATE\10281e17\[21212125]T_AB.db -data=ZPRIVATE\10281e17\[1111CCCC]T_AB.db \PRIVATE\10281e17\[1111CCCC]T_AB.db -data=ZPRIVATE\21212124\t_sqldb1.db \PRIVATE\21212124\t_sqldb1.db -data=ZSYSTEM\test\t_inc095412.db \TEST\t_inc095412.db -data=ZPRIVATE\10281e17\[21212125]T_OneDefPolicy.db \PRIVATE\10281e17\[21212125]T_OneDefPolicy.db -data=ZSYSTEM\test\default_avacon.dbSQL \TEST\default_avacon.dbSQL -data=ZPRIVATE\10281e17\[98765432]t_2defaultpolicies.db \PRIVATE\10281e17\[98765432]t_2defaultpolicies.db -data=ZPRIVATE\10281e17\[98765432]t_emptysettings.db \PRIVATE\10281e17\[98765432]t_emptysettings.db -data=ZPRIVATE\10281e17\[98765432]t_invobject.db \PRIVATE\10281e17\[98765432]t_invobject.db -data=ZPRIVATE\10281e17\[98765432]t_invversion.db \PRIVATE\10281e17\[98765432]t_invversion.db -data=ZPRIVATE\10281e17\[98765432]t_longcollation.db \PRIVATE\10281e17\[98765432]t_longcollation.db -data=ZPRIVATE\10281e17\[98765432]t_nocollation.db \PRIVATE\10281e17\[98765432]t_nocollation.db +data=DATAZ_\test\sqlTests.bat \TEST\sqlTests.bat + +data=DATAZ_\test\contacts_schema_to_vendors.sql \TEST\contacts_schema_to_vendors.sql +data=DATAZ_\test\add_simple_contacts.sql \TEST\add_simple_contacts.sql +data=DATAZ_\test\contacts_startup_time.sql \TEST\contacts_startup_time.sql +data=DATAZ_\test\TestDb1.DB \TEST\TestDb1.dB +data=DATAZ_\test\CorruptDb.DB \TEST\CorruptDb.dB +data=DATAZ_\test\t_SqlShortNonDb.db \TEST\t_SqlShortNonDb.db +data=DATAZ_\test\t_inc095412.db \TEST\t_inc095412.db +data=DATAZ_\test\default_avacon.dbSQL \TEST\default_avacon.dbSQL +data=DATAZ_\test\t_sqlbur_backup_ver0.bak \TEST\t_sqlbur_backup_ver0.bak +data=DATAZ_\test\t_sqlperformance4.sql \TEST\t_sqlperformance4.sql +data=ZPRIVATE\10281e17\[21212122]AADb2.db \PRIVATE\10281e17\[21212122]AADb2.db +data=ZPRIVATE\10281e17\[21212122]BBDb2.db \PRIVATE\10281e17\[21212122]BBDb2.db +data=ZPRIVATE\10281e17\[21212125]T_AB.db \PRIVATE\10281e17\[21212125]T_AB.db +data=ZPRIVATE\10281e17\[1111CCCC]T_AB.db \PRIVATE\10281e17\[1111CCCC]T_AB.db +data=ZPRIVATE\21212124\t_sqldb1.db \PRIVATE\21212124\t_sqldb1.db +data=ZPRIVATE\10281e17\[21212125]T_OneDefPolicy.db \PRIVATE\10281e17\[21212125]T_OneDefPolicy.db +data=ZPRIVATE\10281e17\[98765432]t_2defaultpolicies.db \PRIVATE\10281e17\[98765432]t_2defaultpolicies.db +data=ZPRIVATE\10281e17\[98765432]t_emptysettings.db \PRIVATE\10281e17\[98765432]t_emptysettings.db +data=ZPRIVATE\10281e17\[98765432]t_invobject.db \PRIVATE\10281e17\[98765432]t_invobject.db +data=ZPRIVATE\10281e17\[98765432]t_invversion.db \PRIVATE\10281e17\[98765432]t_invversion.db +data=ZPRIVATE\10281e17\[98765432]t_longcollation.db \PRIVATE\10281e17\[98765432]t_longcollation.db +data=ZPRIVATE\10281e17\[98765432]t_nocollation.db \PRIVATE\10281e17\[98765432]t_nocollation.db data=ZPRIVATE\10281e17\[98765432]t_nodefaultpolicy.db \PRIVATE\10281e17\[98765432]t_nodefaultpolicy.db -data=ZPRIVATE\10281e17\[98765432]t_nosettings.db \PRIVATE\10281e17\[98765432]t_nosettings.db -data=ZSYSTEM\test\t_sqlbur_backup_ver0.bak \TEST\t_sqlbur_backup_ver0.bak -data=ZSYSTEM\test\t_sqlperformance4.sql \TEST\t_sqlperformance4.sql - +data=ZPRIVATE\10281e17\[98765432]t_nosettings.db \PRIVATE\10281e17\[98765432]t_nosettings.db file=ABI_DIR\BUILD_DIR\T_SQLENVCREATE.EXE \TEST\T_SQLENVCREATE.EXE file=ABI_DIR\BUILD_DIR\T_SQLITE.EXE \TEST\T_SQLITE.EXE @@ -80,12 +78,14 @@ file=ABI_DIR\BUILD_DIR\T_SQLSECURITY3.EXE \TEST\T_SQLSECURITY3.EXE file=ABI_DIR\BUILD_DIR\T_SQLSECURITY4.EXE \TEST\T_SQLSECURITY4.EXE file=ABI_DIR\BUILD_DIR\T_SQLSECURITY5.EXE \TEST\T_SQLSECURITY5.EXE +file=ABI_DIR\BUILD_DIR\T_SQLSECURITY6.EXE \TEST\T_SQLSECURITY6.EXE file=ABI_DIR\BUILD_DIR\T_SQLATTACH.EXE \TEST\T_SQLATTACH.EXE file=ABI_DIR\BUILD_DIR\T_SQLATTACH2.EXE \TEST\T_SQLATTACH2.EXE file=ABI_DIR\BUILD_DIR\T_SQLPERFORMANCE.EXE \TEST\T_SQLPERFORMANCE.EXE file=ABI_DIR\BUILD_DIR\T_SQLPERFORMANCE2.EXE \TEST\T_SQLPERFORMANCE2.EXE file=ABI_DIR\BUILD_DIR\T_SQLPERFORMANCE3.EXE \TEST\T_SQLPERFORMANCE3.EXE file=ABI_DIR\BUILD_DIR\T_SQLPERFORMANCE4.EXE \TEST\T_SQLPERFORMANCE4.EXE +file=ABI_DIR\BUILD_DIR\T_SQLPERFORMANCE5.EXE \TEST\T_SQLPERFORMANCE5.EXE file=ABI_DIR\BUILD_DIR\T_SQLOOD.EXE \TEST\T_SQLOOD.EXE file=ABI_DIR\BUILD_DIR\T_SQLOSLAYER.EXE \TEST\T_SQLOSLAYER.EXE file=ABI_DIR\BUILD_DIR\T_SQLDEFECT.EXE \TEST\T_SQLDEFECT.EXE @@ -109,6 +109,7 @@ file=ABI_DIR\BUILD_DIR\T_SQLDB64.EXE \TEST\T_SQLDB64.EXE file=ABI_DIR\BUILD_DIR\T_SQLFILESRVCRASH1.EXE \TEST\T_SQLFILESRVCRASH1.EXE file=ABI_DIR\BUILD_DIR\T_SQLFILESRVCRASH2.EXE \TEST\T_SQLFILESRVCRASH2.EXE +file=ABI_DIR\BUILD_DIR\T_SQLCORRUPT.EXE \TEST\T_SQLCORRUPT.EXE file=ABI_DIR\BUILD_DIR\T_SQLENVDESTROY.EXE \TEST\T_SQLENVDESTROY.EXE #endif diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/sql/GROUP/t_sqlcompact.mmp --- a/persistentstorage/sql/GROUP/t_sqlcompact.mmp Fri May 14 17:36:33 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of "Eclipse Public License v1.0" -// which accompanies this distribution, and is available -// at the URL "http://www.eclipse.org/legal/epl-v10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -TARGET t_sqlcompact.exe -TARGETTYPE EXE -CAPABILITY None - -OS_LAYER_SYSTEMINCLUDE_SYMBIAN -OS_LAYER_ESTLIB_SYSTEMINCLUDE -USERINCLUDE . -USERINCLUDE ../SRC/Common -USERINCLUDE ../SRC/Server/Compact -USERINCLUDE ../SRC/Server -#ifdef SYMBIAN_USE_SQLITE_VERSION_3_6_4 -USERINCLUDE ../SQLite364 -#else -USERINCLUDE ../SQLite -#endif - -SOURCEPATH ../SRC/Common -SOURCE SqlUtil.cpp - -SOURCEPATH ../SRC/Server/Compact -SOURCE SqlCompact.cpp SqlCompactEntry.cpp SqlCompactTimer.cpp - -SOURCEPATH ../SRC/Server -SOURCE SqlSrvStatementUtil.cpp SqlSrvStrings.cpp SqlSrvUtil.cpp - -SOURCEPATH ../TEST -SOURCE t_sqlcompact.cpp - -LIBRARY euser.lib -LIBRARY estlib.lib -LIBRARY efsrv.lib -LIBRARY charconv.lib -LIBRARY estor.lib -LIBRARY hal.lib -STATICLIBRARY sqlite.lib - -VENDORID 0x70000001 - -SMPSAFE \ No newline at end of file diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/sql/GROUP/t_sqlperformance5.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/sql/GROUP/t_sqlperformance5.mmp Fri May 14 13:32:10 2010 +0100 @@ -0,0 +1,36 @@ +// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: MDS harvesting performance test +// + +TARGET t_sqlperformance5.exe +TARGETTYPE EXE +CAPABILITY All -Tcb + +USERINCLUDE . +OS_LAYER_SYSTEMINCLUDE_SYMBIAN + +SOURCEPATH ../TEST +SOURCE t_sqlperformance5.cpp t_sqlcmdlineutil.cpp + +LIBRARY euser.lib +LIBRARY efsrv.lib +LIBRARY sqldb.lib +LIBRARY bafl.lib +LIBRARY hal.lib +LIBRARY estor.lib + +UID 0 0x2121228F +VENDORID 0x70000001 + +SMPSAFE diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/sql/OsLayer/os_symbian.cpp --- a/persistentstorage/sql/OsLayer/os_symbian.cpp Fri May 14 17:36:33 2010 +0300 +++ b/persistentstorage/sql/OsLayer/os_symbian.cpp Fri May 14 13:32:10 2010 +0100 @@ -84,6 +84,10 @@ EPanicFastCounterFreq =21 }; +//Bit-mask constant. If xOpen()'s "aFlag" parameter contains one of these bits set, then the the file top be +//opened or created is a journal file. +const TUint KJournalFileTypeBitMask = SQLITE_OPEN_MAIN_JOURNAL | SQLITE_OPEN_TEMP_JOURNAL | SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_MASTER_JOURNAL; + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -356,7 +360,7 @@ { TOsCallProfile('M', "CL"), TOsCallProfile('M', "RD"), TOsCallProfile('M', "WR"), TOsCallProfile('M', "TR"), TOsCallProfile('M', "SY"), TOsCallProfile('M', "FS"), TOsCallProfile('M', "LK"), TOsCallProfile('M', "UL"), - TOsCallProfile('M', "CL"), TOsCallProfile('M', "FC"), TOsCallProfile('M', "SS"), TOsCallProfile('M', "DC"), + TOsCallProfile('M', "RL"), TOsCallProfile('M', "FC"), TOsCallProfile('M', "SS"), TOsCallProfile('M', "DC"), TOsCallProfile('M', "OP"), TOsCallProfile('M', "DE"), TOsCallProfile('M', "AC"), TOsCallProfile('M', "FN"), TOsCallProfile('M', "RN"), TOsCallProfile('M', "SL"), TOsCallProfile('M', "CT"), TOsCallProfile('M', "LE") }; @@ -367,7 +371,7 @@ { TOsCallProfile('J', "CL"), TOsCallProfile('J', "RD"), TOsCallProfile('J', "WR"), TOsCallProfile('J', "TR"), TOsCallProfile('J', "SY"), TOsCallProfile('J', "FS"), TOsCallProfile('J', "LK"), TOsCallProfile('J', "UL"), - TOsCallProfile('J', "CL"), TOsCallProfile('J', "FC"), TOsCallProfile('J', "SS"), TOsCallProfile('J', "DC"), + TOsCallProfile('J', "RL"), TOsCallProfile('J', "FC"), TOsCallProfile('J', "SS"), TOsCallProfile('J', "DC"), TOsCallProfile('J', "OP"), TOsCallProfile('J', "DE"), TOsCallProfile('J', "AC"), TOsCallProfile('J', "FN"), TOsCallProfile('J', "RN"), TOsCallProfile('J', "SL"), TOsCallProfile('J', "CT"), TOsCallProfile('J', "LE") }; @@ -380,11 +384,15 @@ //aProfileRef - a reference to the related TOsCallProfile object - TheOsCallMProfile[] or TheOsCallJProfile[] entry; //aOffset - file offset in bytes; //aBytes - amount of bytes to be read/written; - TOsCallCounter(TInt64& aOsCallTicksEntryRef, TOsCallProfile& aOsCallProfileRef, TInt64 aOffset, TInt aBytes) : + //aOptional - might be NULL. Used to print out the name of the file being processed. + TOsCallCounter(TInt64& aOsCallTicksEntryRef, TOsCallProfile& aOsCallProfileRef, TInt64 aOffset, TInt aBytes, + const sqlite3_file* aHandle, const char* aOptional) : iOsCallTicksEntryRef(aOsCallTicksEntryRef), iOsCallProfileRef(aOsCallProfileRef), iOffset(aOffset), - iBytes(aBytes) + iBytes(aBytes), + iHandle((TUint)aHandle), + iOptional((const TUint8*)aOptional) { if(TheOsCallTimeProfileEnabled) { @@ -407,18 +415,32 @@ ++iOsCallProfileRef.iCallCounter; iOsCallProfileRef.iTicksTotal += diffTicks; iOsCallProfileRef.iBytesTotal += iBytes; - // 1 2 3 4 5 6 7 8 9 10 - RDebug::Print(_L("'%c','%c%c',%d,%d,%ld,%d,%ld,%ld,%ld\n"), - iOsCallProfileRef.iType, //1 - iOsCallProfileRef.iIdentifier[0], //2 - iOsCallProfileRef.iIdentifier[1], //3 - TheOpCounter, //4 - iOsCallProfileRef.iCallCounter, //5 - iOffset, //6 - iBytes, //7 - diffTicks, //8 - iOsCallProfileRef.iBytesTotal, //9 - iOsCallProfileRef.iTicksTotal); //10 + TFileName fname; + if(iOptional) + { + TPtrC8 fn8(iOptional); + fname.Copy(fn8); + } + // 0 1 2 3 4 5 6 7 8 9 10 11 + RDebug::Print(_L("[SQL-OS]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬%c¬%c%c¬%d¬%d¬%ld¬%d¬%ld¬%ld¬%ld¬%S\n"), + //[SQL-OS] + //Handle + //Time from start, microseconds + //Subtype + //IPC sequence counter + //IPC call name + iHandle, //sqlite3_file* + iOsCallProfileRef.iType, //1 - main or journal file + iOsCallProfileRef.iIdentifier[0], //2 - 1st letter - operation type + iOsCallProfileRef.iIdentifier[1], //3 - 2nd letter - operation type + TheOpCounter, //4 - Operation counter + iOsCallProfileRef.iCallCounter, //5 - This call type counter + iOffset, //6 - File offset + iBytes, //7 - Data, bytes + diffTicks, //8 - Ticks + iOsCallProfileRef.iBytesTotal, //9 - Data total, bytes + iOsCallProfileRef.iTicksTotal, //10- Ticks total + &fname); //11- File name } } } @@ -428,6 +450,8 @@ TInt64 iOffset; TInt iBytes; TUint32 iStartTicks; + TUint iHandle; + const TUint8* iOptional; }; inline TOsCallProfile& OsCallProfile(TBool aType, TInt aIndex) @@ -435,7 +459,7 @@ return aType ? TheOsCallJProfile[aIndex] : TheOsCallMProfile[aIndex]; } -# define __OSTIME_COUNTER(aOsCallTicksRef, aOsCallProfileRef, aOffset, aBytes) TOsCallCounter osCallCounter(aOsCallTicksRef, aOsCallProfileRef, aOffset, aBytes) +# define __OSTIME_COUNTER(aOsCallTicksRef, aOsCallProfileRef, aOffset, aBytes, aHandle, aOpt) TOsCallCounter osCallCounter(aOsCallTicksRef, aOsCallProfileRef, aOffset, aBytes, aHandle, aOpt) #else //_SQLPROFILER @@ -447,7 +471,7 @@ # define __OS_CALL(aOpType, a1, a2) void(0) -# define __OSTIME_COUNTER(aOsCallTicksRef, aOsCallProfileRef, aOffset, aBytes) void(0) +# define __OSTIME_COUNTER(aOsCallTicksRef, aOsCallProfileRef, aOffset, aBytes, aHandle, aOpt) void(0) #endif//_SQLPROFILER @@ -1218,8 +1242,9 @@ { wchar_t* dest = reinterpret_cast (const_cast (aFileNameDestBuf.Ptr())); TInt len = mbstowcs(dest, aFileName, aFileNameDestBuf.MaxLength()); + __ASSERT_DEBUG(len >= 0, User::Panic(KPanicCategory, EPanicInternalError)); //If len == aFileNameDestBuf.MaxLength(), then the output buffer is too small. - if(len > 0 && len < aFileNameDestBuf.MaxLength()) + if(len < aFileNameDestBuf.MaxLength()) { aFileNameDestBuf.SetLength(len); return ETrue; @@ -1246,8 +1271,9 @@ char* dest = reinterpret_cast (const_cast (aFileNameDestBuf.Ptr())); const wchar_t* src = reinterpret_cast (aFileName.Ptr()); TInt len = wcstombs(dest, src, aFileNameDestBuf.MaxLength()); + __ASSERT_DEBUG(len >= 0, User::Panic(KPanicCategory, EPanicInternalError)); //If len == aFileNameDestBuf.MaxLength(), then the output buffer is too small. - if(len > 0 && len < aFileNameDestBuf.MaxLength()) + if(len < aFileNameDestBuf.MaxLength()) { aFileNameDestBuf.SetLength(len); return ETrue; @@ -1477,7 +1503,7 @@ SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); __OS_CALL(EOsFileClose, 0, 0); - __OSTIME_COUNTER(TheOsCallTicks[EOsFileClose], ::OsCallProfile(dbFile.iIsJournal, EOsFileClose), 0, 0); + __OSTIME_COUNTER(TheOsCallTicks[EOsFileClose], ::OsCallProfile(dbFile.iIsJournal, EOsFileClose), 0, 0, aDbFile, 0); __FS_CALL(EFsOpFileClose, 0); dbFile.iFileBuf.Close(); if(dbFile.iFullName) @@ -1519,7 +1545,7 @@ TDbFile& dbFile = ::DbFile(aDbFile); __OS_CALL(EOsFileRead, 0, 0); __COUNTER_INCR(TheSqlSrvProfilerFileRead); - __OSTIME_COUNTER(TheOsCallTicks[EOsFileRead], ::OsCallProfile(dbFile.iIsJournal, EOsFileRead), aOffset, aAmt); + __OSTIME_COUNTER(TheOsCallTicks[EOsFileRead], ::OsCallProfile(dbFile.iIsJournal, EOsFileRead), aOffset, aAmt, aDbFile, 0); TPtr8 ptr((TUint8*)aBuf, 0, aAmt); TInt err = dbFile.iFileBuf.Read(aOffset, ptr); TInt cnt = ptr.Length(); @@ -1582,7 +1608,7 @@ TDbFile& dbFile = ::DbFile(aDbFile); __OS_CALL(EOsFileWrite, 0, 0); __COUNTER_INCR(TheSqlSrvProfilerFileWrite); - __OSTIME_COUNTER(TheOsCallTicks[EOsFileWrite], ::OsCallProfile(dbFile.iIsJournal, EOsFileWrite), aOffset, aAmt); + __OSTIME_COUNTER(TheOsCallTicks[EOsFileWrite], ::OsCallProfile(dbFile.iIsJournal, EOsFileWrite), aOffset, aAmt, aDbFile, 0); TInt err = KErrAccessDenied; if(!dbFile.iReadOnly) { @@ -1636,7 +1662,7 @@ TDbFile& dbFile = ::DbFile(aDbFile); __OS_CALL(EOsFileTruncate, 0, 0); __COUNTER_INCR(TheSqlSrvProfilerFileSetSize); - __OSTIME_COUNTER(TheOsCallTicks[EOsFileTruncate], ::OsCallProfile(dbFile.iIsJournal, EOsFileTruncate), aLength, 0); + __OSTIME_COUNTER(TheOsCallTicks[EOsFileTruncate], ::OsCallProfile(dbFile.iIsJournal, EOsFileTruncate), aLength, 0, aDbFile, 0); if(dbFile.iReadOnly) { COsLayerData::Instance().SetOsErrorCode(KErrAccessDenied); @@ -1672,7 +1698,7 @@ TDbFile& dbFile = ::DbFile(aDbFile); __OS_CALL(EOsFileSync, 0, 0); __COUNTER_INCR(TheSqlSrvProfilerFileSync); - __OSTIME_COUNTER(TheOsCallTicks[EOsFileSync], ::OsCallProfile(dbFile.iIsJournal, EOsFileSync), 0, 0); + __OSTIME_COUNTER(TheOsCallTicks[EOsFileSync], ::OsCallProfile(dbFile.iIsJournal, EOsFileSync), 0, 0, aDbFile, 0); if(dbFile.iReadOnly) { COsLayerData::Instance().SetOsErrorCode(KErrAccessDenied); @@ -1707,7 +1733,7 @@ SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); __OS_CALL(EOsFileFileSize, 0, 0); - __OSTIME_COUNTER(TheOsCallTicks[EOsFileFileSize], ::OsCallProfile(dbFile.iIsJournal, EOsFileFileSize), 0, 0); + __OSTIME_COUNTER(TheOsCallTicks[EOsFileFileSize], ::OsCallProfile(dbFile.iIsJournal, EOsFileFileSize), 0, 0, aDbFile, 0); __FS_CALL(EFsOpFileSize, 0); TInt err = dbFile.iFileBuf.Size(*aSize); COsLayerData::Instance().SetOsErrorCode(err); @@ -1741,7 +1767,7 @@ SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); __OS_CALL(EOsFileLock, 0, 0); - __OSTIME_COUNTER(TheOsCallTicks[EOsFileLock], ::OsCallProfile(dbFile.iIsJournal, EOsFileLock), aLockType, 0); + __OSTIME_COUNTER(TheOsCallTicks[EOsFileLock], ::OsCallProfile(dbFile.iIsJournal, EOsFileLock), aLockType, 0, aDbFile, 0); //If there is already a lock of this type or more restrictive on the database file, do nothing. if(dbFile.iLockType >= aLockType) { @@ -1774,7 +1800,7 @@ SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); __OS_CALL(EOsFileUnlock, 0, 0); - __OSTIME_COUNTER(TheOsCallTicks[EOsFileUnlock], ::OsCallProfile(dbFile.iIsJournal, EOsFileUnlock), aLockType, 0); + __OSTIME_COUNTER(TheOsCallTicks[EOsFileUnlock], ::OsCallProfile(dbFile.iIsJournal, EOsFileUnlock), aLockType, 0, aDbFile, 0); dbFile.iLockType = aLockType; return SQLITE_OK; } @@ -1803,7 +1829,7 @@ SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); __OS_CALL(EOsFileCheckReservedLock, 0, 0); - __OSTIME_COUNTER(TheOsCallTicks[EOsFileCheckReservedLock], ::OsCallProfile(dbFile.iIsJournal, EOsFileCheckReservedLock), 0, 0); + __OSTIME_COUNTER(TheOsCallTicks[EOsFileCheckReservedLock], ::OsCallProfile(dbFile.iIsJournal, EOsFileCheckReservedLock), 0, 0, aDbFile, 0); *aResOut = dbFile.iLockType >= SQLITE_LOCK_RESERVED ? 1 : 0; return SQLITE_OK; } @@ -1839,7 +1865,7 @@ SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KFileFileCtr, aOp)); TDbFile& dbFile = ::DbFile(aDbFile); __OS_CALL(EOsFileFileControl, 0, 0); - __OSTIME_COUNTER(TheOsCallTicks[EOsFileFileControl], ::OsCallProfile(dbFile.iIsJournal, EOsFileFileControl), aOp, 0); + __OSTIME_COUNTER(TheOsCallTicks[EOsFileFileControl], ::OsCallProfile(dbFile.iIsJournal, EOsFileFileControl), aOp, 0, aDbFile, 0); TInt err = KErrNone; switch(aOp) { @@ -1890,7 +1916,7 @@ SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); __OS_CALL(EOsFileSectorSize, 0, 0); - __OSTIME_COUNTER(TheOsCallTicks[EOsFileSectorSize], ::OsCallProfile(dbFile.iIsJournal, EOsFileSectorSize), 0, 0); + __OSTIME_COUNTER(TheOsCallTicks[EOsFileSectorSize], ::OsCallProfile(dbFile.iIsJournal, EOsFileSectorSize), 0, 0, aDbFile, 0); __ASSERT_DEBUG(dbFile.iSectorSize > 0, User::Panic(KPanicCategory, EPanicInternalError)); if(dbFile.iSectorSize > 0) { @@ -1921,7 +1947,7 @@ SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); __OS_CALL(EOsFileDeviceCharacteristics, 0, 0); - __OSTIME_COUNTER(TheOsCallTicks[EOsFileDeviceCharacteristics], ::OsCallProfile(dbFile.iIsJournal, EOsFileDeviceCharacteristics), 0, 0); + __OSTIME_COUNTER(TheOsCallTicks[EOsFileDeviceCharacteristics], ::OsCallProfile(dbFile.iIsJournal, EOsFileDeviceCharacteristics), 0, 0, aDbFile, 0); __ASSERT_DEBUG(dbFile.iDeviceCharacteristics >= 0, User::Panic(KPanicCategory, EPanicInternalError)); if(dbFile.iDeviceCharacteristics >= 0) { @@ -2005,38 +2031,35 @@ { deviceCharacteristics |= SQLITE_IOCAP_ATOMIC; } - if(aVolumeInfo.iBlockSize >= SQLITE_DEFAULT_SECTOR_SIZE && (aVolumeInfo.iBlockSize & (aVolumeInfo.iBlockSize - 1)) == 0) + switch(aVolumeInfo.iBlockSize) { - switch(aVolumeInfo.iBlockSize) - { - case 512: - deviceCharacteristics |= SQLITE_IOCAP_ATOMIC512; - break; - case 1024: - deviceCharacteristics |= SQLITE_IOCAP_ATOMIC1K; - break; - case 2048: - deviceCharacteristics |= SQLITE_IOCAP_ATOMIC2K; - break; - case 4096: - deviceCharacteristics |= SQLITE_IOCAP_ATOMIC4K; - break; - case 8192: - deviceCharacteristics |= SQLITE_IOCAP_ATOMIC8K; - break; - case 16384: - deviceCharacteristics |= SQLITE_IOCAP_ATOMIC16K; - break; - case 32768: - deviceCharacteristics |= SQLITE_IOCAP_ATOMIC32K; - break; - case 65536: - deviceCharacteristics |= SQLITE_IOCAP_ATOMIC64K; - break; - default: - //Do nothing. deviceCharacteristics was initialized with 0 at the beginning of the function body. - break; - } + case 512: + deviceCharacteristics |= SQLITE_IOCAP_ATOMIC512; + break; + case 1024: + deviceCharacteristics |= SQLITE_IOCAP_ATOMIC1K; + break; + case 2048: + deviceCharacteristics |= SQLITE_IOCAP_ATOMIC2K; + break; + case 4096: + deviceCharacteristics |= SQLITE_IOCAP_ATOMIC4K; + break; + case 8192: + deviceCharacteristics |= SQLITE_IOCAP_ATOMIC8K; + break; + case 16384: + deviceCharacteristics |= SQLITE_IOCAP_ATOMIC16K; + break; + case 32768: + deviceCharacteristics |= SQLITE_IOCAP_ATOMIC32K; + break; + case 65536: + deviceCharacteristics |= SQLITE_IOCAP_ATOMIC64K; + break; + default: + //Do nothing. deviceCharacteristics was initialized with 0 at the beginning of the function body. + break; } return deviceCharacteristics; } @@ -2215,7 +2238,7 @@ { SQLUTRACE_PROFILER(aVfs); __OS_CALL(EOsVfsOpen, 0, 0); - __OSTIME_COUNTER(TheOsCallTicks[EOsVfsOpen], ::OsCallProfile(EFalse, EOsVfsOpen), 0, 0); + __OSTIME_COUNTER(TheOsCallTicks[EOsVfsOpen], ::OsCallProfile(EFalse, EOsVfsOpen), 0, 0, aDbFile, aFileName); COsLayerData& osLayerData = COsLayerData::Instance(); TFileName fname; if(aFileName && !::ConvertToUnicode(aFileName, fname)) @@ -2287,8 +2310,7 @@ __FS_CALL(EFsOpFileOpen, 0); err = dbFile.iFileBuf.Open(osLayerData.iFs, fname, fmode); - if(err == KErrNone && ((aFlags & SQLITE_OPEN_MAIN_JOURNAL) || (aFlags & SQLITE_OPEN_TEMP_JOURNAL) || - (aFlags & SQLITE_OPEN_SUBJOURNAL) || (aFlags & SQLITE_OPEN_MASTER_JOURNAL))) + if(err == KErrNone && (aFlags & KJournalFileTypeBitMask)) { err = TVfs::DoFileSizeCorruptionCheck(dbFile, fname, fmode); } @@ -2338,8 +2360,7 @@ (void)dbFile.iFileBuf.SetReadAheadSize(dbFile.iSectorSize, recReadBufSize); } #ifdef _SQLPROFILER - dbFile.iIsJournal = (aFlags & SQLITE_OPEN_MAIN_JOURNAL) || (aFlags & SQLITE_OPEN_TEMP_JOURNAL) || - (aFlags & SQLITE_OPEN_SUBJOURNAL) || (aFlags & SQLITE_OPEN_MASTER_JOURNAL); + dbFile.iIsJournal = aFlags & KJournalFileTypeBitMask; #endif return err == KErrNone ? SQLITE_OK : (err == KErrNoMemory ? SQLITE_IOERR_NOMEM : SQLITE_CANTOPEN); } @@ -2366,7 +2387,7 @@ { SQLUTRACE_PROFILER(aVfs); __OS_CALL(EOsVfsDelete, 0, 0); - __OSTIME_COUNTER(TheOsCallTicks[EOsVfsDelete], ::OsCallProfile(EFalse, EOsVfsDelete), 0, 0); + __OSTIME_COUNTER(TheOsCallTicks[EOsVfsDelete], ::OsCallProfile(EFalse, EOsVfsDelete), 0, 0, 0, aFileName); COsLayerData& osLayerData = COsLayerData::Instance(); TBuf fname; if(!::ConvertToUnicode(aFileName, fname)) @@ -2414,7 +2435,7 @@ { SQLUTRACE_PROFILER(aVfs); __OS_CALL(EOsVfsAccess, 0, 0); - __OSTIME_COUNTER(TheOsCallTicks[EOsVfsAccess], ::OsCallProfile(EFalse, EOsVfsAccess), aFlags, 0); + __OSTIME_COUNTER(TheOsCallTicks[EOsVfsAccess], ::OsCallProfile(EFalse, EOsVfsAccess), aFlags, 0, 0, aFileName); COsLayerData& osLayerData = COsLayerData::Instance(); TBuf fname; if(!::ConvertToUnicode(aFileName, fname)) @@ -2491,7 +2512,7 @@ { SQLUTRACE_PROFILER(aVfs); __OS_CALL(EOsVfsFullPathName, 0, 0); - __OSTIME_COUNTER(TheOsCallTicks[EOsVfsFullPathName], ::OsCallProfile(EFalse, EOsVfsFullPathName), aBufLen, 0); + __OSTIME_COUNTER(TheOsCallTicks[EOsVfsFullPathName], ::OsCallProfile(EFalse, EOsVfsFullPathName), aBufLen, 0, 0, aRelative); COsLayerData& osLayerData = COsLayerData::Instance(); osLayerData.StoreFhData(NULL, EFalse); //Convert the received file name to UTF16 @@ -2538,7 +2559,7 @@ { SQLUTRACE_PROFILER(aVfs); __OS_CALL(EOsVfsRandomness, 0, 0); - __OSTIME_COUNTER(TheOsCallTicks[EOsVfsRandomness], ::OsCallProfile(EFalse, EOsVfsRandomness), aBufLen, 0); + __OSTIME_COUNTER(TheOsCallTicks[EOsVfsRandomness], ::OsCallProfile(EFalse, EOsVfsRandomness), aBufLen, 0, 0, 0); COsLayerData& osLayerData = COsLayerData::Instance(); const TInt KRandIterations = aBufLen / sizeof(int); for(TInt i=0;iDes(); _LIT(KExt, ".DB"); - dbPath->Des().Copy(_L("C:")); - dbPath->Des().Append(KSecureUid.Name()); - TInt len = maxFileName + 1 - (dbPath->Length() + KExt().Length() + privatePath.Length()); + dbPathPtr.Copy(_L("C:")); + dbPathPtr.Append(KSecureUid.Name()); + TInt len = maxFileName + 1 - (dbPathPtr.Length() + KExt().Length() + privatePath.Length()); while(--len) { - dbPath->Des().Append(TChar('A')); + dbPathPtr.Append(TChar('A')); } - dbPath->Des().Append(KExt); - TEST(dbPath->Length() == (maxFileName - privatePath.Length())); - rc = db.Create(dbPath->Des(), securityPolicy); + dbPathPtr.Append(KExt); + TEST(dbPathPtr.Length() == (maxFileName - privatePath.Length())); + rc = db.Create(dbPathPtr, securityPolicy); TEST2(rc, KErrNone); db.Close(); - rc2 = RSqlDatabase::Delete(dbPath->Des()); + rc2 = RSqlDatabase::Delete(dbPathPtr); TEST2(rc2, KErrNone); // Private database with config @@ -330,19 +332,20 @@ //Public shared database file on an existing drive (C:). //Very long database file name. - dbPath->Des().Copy(_L("C:\\TEST\\D")); - len = maxFileName + 1 - (dbPath->Length() + KExt().Length()); + dbPathPtr.Copy(_L("C:\\TEST\\D")); + len = maxFileName + 1 - (dbPathPtr.Length() + KExt().Length()); while(--len) { - dbPath->Des().Append(TChar('A')); + dbPathPtr.Append(TChar('A')); } - dbPath->Des().Append(KExt); - TEST(dbPath->Length() == maxFileName); - rc = db.Create(dbPath->Des()); + dbPathPtr.Append(KExt); + TEST(dbPathPtr.Length() == maxFileName); + rc = db.Create(dbPathPtr); db.Close(); - rc2 = RSqlDatabase::Delete(dbPath->Des()); + rc2 = RSqlDatabase::Delete(dbPathPtr); - CleanupStack::PopAndDestroy(dbPath); + delete dbPath; + TEST2(rc, KErrNone); TEST2(rc2, KErrNone); @@ -410,6 +413,19 @@ TEST(rc==KSqlErrNotDb || rc==KErrNone); db.Close(); + //An attempt to open database with name containing non-convertible characters. + TBuf<6> invName; + invName.SetLength(6); + invName[0] = TChar('c'); + invName[1] = TChar(':'); + invName[2] = TChar('\\'); + invName[3] = TChar(0xD800); + invName[4] = TChar(0xFC00); + invName[5] = TChar(0x0000); + rc = db.Open(invName); + db.Close(); + TEST(rc != KErrNone); + //Copy the corrupted database file on drive C: TEST2(fs.Connect(), KErrNone); rc = BaflUtils::CopyFile(fs, KDbPath10, KTestDbName3); @@ -792,6 +808,7 @@ _LIT8(KStmt19, "INSERT INTO BBB(Fld1, Fld2, Fld3, Fld4, Fld5, Fld6)\ VALUES(:V1, :V2, :V3, :V4, :V5, :V6)"); _LIT8(KStmt20, "SELECT * FROM BBB"); +_LIT8(KStmt21, "SELECT fld1, fld2 FROM AAA;SELECT fld1, fld2 FROM AAA"); /** @SYMTestCaseID SYSLIB-SQL-CT-1606 @@ -824,6 +841,10 @@ ExecSqlStmt(db, stmt, KErrNone); stmt.Close(); + //String containg more than one SQL statement. + stmt = PrepareSqlStmt(db, KStmt21, KErrArgument); + stmt.Close(); + //SQL statement without parameters. Insert a record into the table. stmt = PrepareSqlStmt(db, KStmt13, KErrNone); ExecSqlStmt(db, stmt, KErrNone); @@ -1088,6 +1109,17 @@ rc = stmt.Next(); TEST2(rc, KSqlAtRow); + //An attempt to read integer column using binary stream + RSqlColumnReadStream strm2; + rc = strm2.ColumnBinary(stmt, 0); + strm2.Close(); + TEST2(rc, KErrArgument); + + //An attempt to read integer column using text stream + rc = strm2.ColumnText(stmt, 0); + strm2.Close(); + TEST2(rc, KErrArgument); + //Read the long text column using a stream RSqlColumnReadStream columnStream; rc = columnStream.ColumnText(stmt, 1); @@ -2358,6 +2390,48 @@ (void)RSqlDatabase::Delete(KTestDbName1); } +/** +@SYMTestCaseID PDS-SQL-CT-4205 +@SYMTestCaseDesc "PRAGMA count_changes" test. + When "count_changes" pragma is ON, sqlite3_step() is called two times by the + SQL server, before getting the SQLITE_DONE return code. + Everything else is the same (statement processing, etc.). +@SYMTestPriority High +@SYMTestActions "PRAGMA count_changes" test. +@SYMTestExpectedResults Test must not fail +*/ +void CountChangesTest() + { + (void)RSqlDatabase::Delete(KTestDbName1); + RSqlDatabase db; + TInt err = db.Create(KTestDbName1); + TEST2(err, KErrNone); + err = db.Exec(_L("CREATE TABLE A(I INTEGER)")); + TEST(err >= 0); + + err = db.Exec(_L("PRAGMA count_changes=ON")); + TEST(err >= 0); + + err = db.Exec(_L("INSERT INTO A VALUES(1)")); + TEST2(err, 1); + + err = db.Exec(_L8("INSERT INTO A VALUES(2)")); + TEST2(err, 1); + + RSqlStatement stmt; + err = stmt.Prepare(db, _L("DELETE FROM A WHERE I>=1 AND I<=2")); + TEST2(err, KErrNone); + err = stmt.Exec(); + TEST2(err, 2); + stmt.Close(); + + err = db.Exec(_L("PRAGMA count_changes=OFF")); + TEST(err >= 0); + + db.Close(); + (void)RSqlDatabase::Delete(KTestDbName1); + } + void DoTestsL() { TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-SQL-CT-1601 Create/Open/Close database tests ")); @@ -2427,6 +2501,9 @@ TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-SQL-UT-4041 RSqlDatabase::Size(RSqlDatabase::TSize&) - different compaction modes tests")); DiffCompactModeSize2Test(); + + TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-CT-4205 PRAGMA \"count_changes\" test")); + CountChangesTest(); } TInt E32Main() diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/sql/TEST/t_sqlcmdlineutil.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/sql/TEST/t_sqlcmdlineutil.cpp Fri May 14 13:32:10 2010 +0100 @@ -0,0 +1,313 @@ +// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// +#include +#include "t_sqlcmdlineutil.h" + +static void GetCmdLine(RTest& aTest, const TDesC& aTestName, TDes& aCmdLine) + { + User::CommandLine(aCmdLine); + aCmdLine.TrimAll(); + if(aCmdLine.Length() == 0) + { + aTest.Printf(_L("Usage: %S [ [/enc=<16/8>] /drv=:] [/page=<512/1024/2048/4096/8192/16384/32768>] ] [/cache=] [/hlimit=]\r\n"), &aTestName); + return; + } + aCmdLine.Append(TChar('/')); + } + +static void ExtractCmdLineParams(TDes& aCmdLine, RArray& aPrmNames, RArray& aPrmValues) + { + aPrmNames.Reset(); + aPrmValues.Reset(); + + enum TState{EWaitPrmStart, EReadPrmName, EReadPrmValue}; + TState state = EWaitPrmStart; + TInt startPos = -1; + TPtr prmName(0, 0); + TPtr prmValue(0, 0); + + aCmdLine.Append(TChar('/')); + + for(TInt i=0;i& aPrmNames, const RArray& aPrmValues, TCmdLineParams& aCmdLineParams) + { + __ASSERT_ALWAYS(aPrmNames.Count() == aPrmValues.Count(), User::Invariant()); + + aCmdLineParams.SetDefaults(); + + for(TInt i=0;i= TChar('a') && ch <= TChar('z')) + aCmdLineParams.iDriveName.Copy(aPrmValues[i]); + } + } + else if(aPrmNames[i].CompareF(_L("page")) == 0) + { + TLex lex(aPrmValues[i]); + TInt pageSize = 0; + TInt err = lex.Val(pageSize); + if(err == KErrNone && (pageSize == 512 || pageSize == 1024 || pageSize == 2048 || + pageSize == 4096 || pageSize == 8192 || pageSize == 16384 || pageSize == 32768)) + { + aCmdLineParams.iPageSize = pageSize; + } + } + else if(aPrmNames[i].CompareF(_L("cache")) == 0) + { + TLex lex(aPrmValues[i]); + TInt cacheSize = 0; + TInt err = lex.Val(cacheSize); + if(err == KErrNone && (cacheSize > 0 && cacheSize < 1000000000)) + { + aCmdLineParams.iCacheSize = cacheSize; + } + } + else if(aPrmNames[i].CompareF(_L("hlimit")) == 0) + { + TLex lex(aPrmValues[i]); + TInt softHeapLimit = 0; + TInt err = lex.Val(softHeapLimit); + if(err == KErrNone && (softHeapLimit >= 0 && softHeapLimit < 1000000000)) + { + aCmdLineParams.iSoftHeapLimitKb = softHeapLimit; + } + } + } + } + +static void PrepareSqlConfigString(RTest& aTest, const TCmdLineParams& aCmdLineParams, TDes8& aConfigStr) + { + aConfigStr.Zero(); + + if(aCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf8) + { + aTest.Printf(_L("--PRM--Database Encoding: UTF8\r\n")); + aConfigStr.Append(_L8("encoding=\"UTF-8\";")); + } + else + { + aTest.Printf(_L("--PRM--Database Encoding: UTF16\r\n")); + aConfigStr.Append(_L8("encoding=\"UTF-16\";")); + } + + aTest.Printf(_L("--PRM--Database page size: %d\r\n"), aCmdLineParams.iPageSize); + TBuf8<20> pageSizeBuf; + pageSizeBuf.Format(_L8("page_size=%d;"), aCmdLineParams.iPageSize); + aConfigStr.Append(pageSizeBuf); + + aTest.Printf(_L("--PRM--Database cache size: %d\r\n"), aCmdLineParams.iCacheSize); + TBuf8<20> cacheSizeBuf; + cacheSizeBuf.Format(_L8("cache_size=%d;"), aCmdLineParams.iCacheSize); + aConfigStr.Append(cacheSizeBuf); + + aTest.Printf(_L("--PRM--Database drive: %S\r\n"), &aCmdLineParams.iDriveName); + + if(aCmdLineParams.iSoftHeapLimitKb > 0) + { + aTest.Printf(_L("--PRM--Soft heap limit: %d Kb\r\n"), aCmdLineParams.iSoftHeapLimitKb); + } + else + { + aTest.Printf(_L("--PRM--Soft heap limit: default\r\n")); + } + } + +#ifdef SQL_SOFT_HEAP_LIMIT_TEST + +static TInt KillProcess(const TDesC& aProcessName) + { + TFullName name; + TBuf<64> pattern(aProcessName); + TInt length = pattern.Length(); + pattern += _L("*"); + TFindProcess procFinder(pattern); + + while (procFinder.Next(name) == KErrNone) + { + if (name.Length() > length) + {//If found name is a string containing aProcessName string. + TChar c(name[length]); + if (c.IsAlphaDigit() || + c == TChar('_') || + c == TChar('-')) + { + // If the found name is other valid application name + // starting with aProcessName string. + continue; + } + } + RProcess proc; + if (proc.Open(name) == KErrNone) + { + proc.Kill(0); + } + proc.Close(); + } + return KErrNone; + } + +_LIT(KSqlSrvName, "sqlsrv.exe"); +_LIT(KSqlSrvConfigFile, "c:\\test\\t_sqlserver.cfg"); + +static void ReplaceConfigFile(const TDesC16& aConfig) + { + RFs fs; + TInt err = fs.Connect(); + __ASSERT_ALWAYS(err == KErrNone, User::Invariant()); + + (void)KillProcess(KSqlSrvName); + + (void)fs.MkDirAll(KSqlSrvConfigFile); + (void)fs.Delete(KSqlSrvConfigFile); + + RFile file; + err = file.Create(fs, KSqlSrvConfigFile, EFileRead | EFileWrite); + __ASSERT_ALWAYS(err == KErrNone, User::Invariant()); + + TPtrC8 p((const TUint8*)aConfig.Ptr(), aConfig.Length() * sizeof(TUint16)); + err = file.Write(p); + file.Close(); + __ASSERT_ALWAYS(err == KErrNone, User::Invariant()); + + fs.Close(); + } + +static void DeleteConfigFile() + { + RFs fs; + TInt err = fs.Connect(); + __ASSERT_ALWAYS(err == KErrNone, User::Invariant()); + + (void)KillProcess(KSqlSrvName); + + (void)fs.MkDirAll(KSqlSrvConfigFile); + (void)fs.Delete(KSqlSrvConfigFile); + + fs.Close(); + } + +#endif //SQL_SOFT_HEAP_LIMIT_TEST + +void GetCmdLineParamsAndSqlConfigString(RTest& aTest, const TDesC& aTestName, TCmdLineParams& aCmdLineParams, TDes8& aConfigStr) + { + TBuf<200> cmdLine; + GetCmdLine(aTest, aTestName, cmdLine); + RArray prmNames; + RArray prmValues; + ExtractCmdLineParams(cmdLine, prmNames, prmValues); + ExtractParamNamesAndValues(prmNames, prmValues, aCmdLineParams); + prmValues.Close(); + prmNames.Close(); + PrepareSqlConfigString(aTest, aCmdLineParams, aConfigStr); + } + +void PrepareDbName(const TDesC& aDeafultDbName, const TDriveName& aDriveName, TDes& aDbName) + { + TParse parse; + parse.Set(aDriveName, &aDeafultDbName, 0); + const TDesC& dbFilePath = parse.FullName(); + aDbName.Copy(dbFilePath); + } + +void SetSoftHeapLimit(TInt aSoftHeapLimit) + { + if(aSoftHeapLimit > 0) + { +#ifdef SQL_SOFT_HEAP_LIMIT_TEST + TBuf<50> configBuf; + configBuf.Format(_L("soft_heap_limit_kb=%d"), aSoftHeapLimit); + ReplaceConfigFile(configBuf); +#else + RDebug::Print(_L("The soft heap limit cannot be set if \"SQL_SOFT_HEAP_LIMIT_TEST\" macro is not defined!\r\n")); +#endif + } + else if(aSoftHeapLimit < 0) + { + RDebug::Print(_L("Soft heap limit of %d Kb cannot be set!\r\n"), aSoftHeapLimit); + } + } + +void ResetSoftHeapLimit() + { +#ifdef SQL_SOFT_HEAP_LIMIT_TEST + DeleteConfigFile(); +#endif + } + diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/sql/TEST/t_sqlcmdlineutil.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/sql/TEST/t_sqlcmdlineutil.h Fri May 14 13:32:10 2010 +0100 @@ -0,0 +1,66 @@ +// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef T_SQLCMDLINEUTIL_H +#define T_SQLCMDLINEUTIL_H + +#include + +class RTest; + +struct TCmdLineParams + { + enum TDbEncoding + { + EDbUtf8, + EDbUtf16 + }; + + inline TCmdLineParams(TDbEncoding aDefaultEncoding = EDbUtf16, + TInt aDefaultPageSize = 1024, + TInt aDefaultCacheSize = 1000) : + iDefaultEncoding(aDefaultEncoding), + iDefaultPageSize(aDefaultPageSize), + iDefaultCacheSize(aDefaultCacheSize) + { + SetDefaults(); + } + + inline void SetDefaults() + { + iDbEncoding = iDefaultEncoding; + iPageSize = iDefaultPageSize; + iCacheSize = iDefaultCacheSize; + iDriveName.Copy(_L("c:")); + iSoftHeapLimitKb = 0; + } + + const TDbEncoding iDefaultEncoding; + const TInt iDefaultPageSize; + const TInt iDefaultCacheSize; + + TDbEncoding iDbEncoding; + TInt iPageSize; + TInt iCacheSize; + TDriveName iDriveName; + TInt iSoftHeapLimitKb; + }; + +void GetCmdLineParamsAndSqlConfigString(RTest& aTest, const TDesC& aTestName, TCmdLineParams& aCmdLineParams, TDes8& aConfigStr); +void PrepareDbName(const TDesC& aDeafultDbName, const TDriveName& aDriveName, TDes& aDbName); +void SetSoftHeapLimit(TInt aSoftHeapLimit); +void ResetSoftHeapLimit(); + +#endif//T_SQLCMDLINEUTIL_H diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/sql/TEST/t_sqlcompact1.cpp --- a/persistentstorage/sql/TEST/t_sqlcompact1.cpp Fri May 14 17:36:33 2010 +0300 +++ b/persistentstorage/sql/TEST/t_sqlcompact1.cpp Fri May 14 13:32:10 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -77,6 +77,39 @@ /////////////////////////////////////////////////////////////////////////////////////// +//t_sqlcompact1 timeouts in WDP builds. +//This function is used to check whether the time limit is reaqched or not. +TBool IsTimeLimitReached() + { + struct TStartTime + { + TStartTime() + { + iTime.HomeTime(); + } + TTime iTime; + }; + + static TStartTime startTime; + const TInt KTestTimeLimit = 100;//seconds + + TTime currTime; + currTime.HomeTime(); + + TTimeIntervalSeconds s; + TInt err = currTime.SecondsFrom(startTime.iTime, s); + TEST2(err, KErrNone); + return s.Int() > KTestTimeLimit; + } + +void GetHomeTimeAsString(TDes& aStr) + { + TTime time; + time.HomeTime(); + TDateTime dt = time.DateTime(); + aStr.Format(_L("%02d:%02d:%02d.%06d"), dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond()); + } + void CreateTestEnv() { RFs fs; @@ -116,6 +149,8 @@ { TInt err = TheDb.Open(aDbName); TEST2(err, KErrNone); + err = TheDb.Exec(_L("BEGIN TRANSACTION")); + TEST(err >= 0); TheText.SetLength(TheText.MaxLength()); TheText.Fill(TChar('A')); for(TInt i=0;i<100;++i) @@ -124,6 +159,8 @@ err = TheDb.Exec(TheSqlBuf); TEST2(err, 1); } + err = TheDb.Exec(_L("COMMIT TRANSACTION")); + TEST(err >= 0); TheDb.Close(); } @@ -132,6 +169,8 @@ TInt freePageCount = -1; TInt err = TheDb.Open(aDbName); TEST2(err, KErrNone); + err = TheDb.Exec(_L("BEGIN TRANSACTION")); + TEST(err >= 0); for(TInt i=0;;++i) { TheSqlBuf.Format(_L("DELETE FROM A WHERE I=%d"), i + 1); @@ -146,6 +185,8 @@ break; } } + err = TheDb.Exec(_L("COMMIT TRANSACTION")); + TEST(err >= 0); TheDb.Close(); return freePageCount; } @@ -177,6 +218,10 @@ TInt i; + TBuf<50> timeBuf; + GetHomeTimeAsString(timeBuf); + TheTest.Printf(_L("===Time1: %S\r\n"), &timeBuf); + //Create databases, tables, insert records, delete part of the just inserted records. for(i=0;i= 0); err = TheDb.Exec(_L("CREATE TABLE A(I INTEGER, T TEXT)")); TEST(err >= 0); //Insert records @@ -263,6 +322,8 @@ err = TheDb.Exec(TheSqlBuf); TEST2(err, 1); } + err = TheDb.Exec(_L("COMMIT TRANSACTION")); + TEST(err >= 0); //Delete all records making a lot of free pages. This operation should kick-off the background compaction err = TheDb.Exec(_L("DELETE FROM A WHERE 1")); TEST2(err, aRecordCount); @@ -288,11 +349,18 @@ */ void CompactDbTest2() { + TBuf<50> timeBuf; + GetHomeTimeAsString(timeBuf); + TheTest.Printf(_L("===Time1: %S\r\n"), &timeBuf); + const TInt KPageSize = 1024; //Number of records to be added and removed from database. Need to be increased when testing on a faster // hardware, otherwise at fastest case the background compaction could be finished in just 1 step. - const TInt KRecordCount = 2000; + const TInt KRecordCount = 2000; PrepareDb(KPageSize, KRecordCount); + + GetHomeTimeAsString(timeBuf); + TheTest.Printf(_L("===Time2: %S\r\n"), &timeBuf); //Check the free space-1 RSqlDatabase::TSize size1; @@ -321,6 +389,9 @@ { TEST(size2.iFree == size1.iFree); } + + GetHomeTimeAsString(timeBuf); + TheTest.Printf(_L("===Time3: %S\r\n"), &timeBuf); //Wait (KSqlCompactStepIntervalMs + KSqlCompactStepLengthMs) ms. During the pause only part of the free pages //should be removed (whatever can be completed for KSqlCompactStepLengthMs ms). @@ -335,6 +406,9 @@ TheTest.Printf(_L("WARNING: Background compaction finished in 1 step. Initial number of records need to be increased.\r\n")); } TEST(size3.iFree > 0 && size3.iFree < size2.iFree); + + GetHomeTimeAsString(timeBuf); + TheTest.Printf(_L("===Time4: %S\r\n"), &timeBuf); //Wait another (KSqlCompactStepIntervalMs + KSqlCompactStepLengthMs) ms. During the pause only part of the free pages //should be removed (whatever can be completed for KSqlCompactStepLengthMs ms). @@ -345,6 +419,9 @@ TEST2(err, KErrNone); TheTest.Printf(_L("===Free space after compaction-3, pages=%d\r\n"), size4.iFree / KPageSize); TEST((size4.iFree > 0 && size4.iFree < size3.iFree) || (size4.iFree == 0)); + + GetHomeTimeAsString(timeBuf); + TheTest.Printf(_L("===Time5: %S\r\n"), &timeBuf); //Cleanup TheDb.Close(); @@ -370,10 +447,17 @@ */ void CompactDbTest3() { + TBuf<50> timeBuf; + GetHomeTimeAsString(timeBuf); + TheTest.Printf(_L("===Time1: %S\r\n"), &timeBuf); + const TInt KPageSize = 1024; const TInt KRecordCount = 1000; PrepareDb(KPageSize, KRecordCount); + GetHomeTimeAsString(timeBuf); + TheTest.Printf(_L("===Time2: %S\r\n"), &timeBuf); + //Check the free space-1 RSqlDatabase::TSize size1; TInt err = TheDb.Size(size1); @@ -406,6 +490,10 @@ break; } } + + GetHomeTimeAsString(timeBuf); + TheTest.Printf(_L("===Time3: %S\r\n"), &timeBuf); + //Check the free space-2 RSqlDatabase::TSize size2; err = TheDb.Size(size2); @@ -432,10 +520,18 @@ */ void ManualCompactTest() { + TBuf<50> timeBuf; + GetHomeTimeAsString(timeBuf); + TheTest.Printf(_L("===Time1: %S\r\n"), &timeBuf); + //Create a database with 1000 free pages const TInt KPageSize = 1024; const TInt KRecordCount = 1000; PrepareDb(KPageSize, KRecordCount, ETrue);//create the database with manual compaction mode + + GetHomeTimeAsString(timeBuf); + TheTest.Printf(_L("===Time2: %S\r\n"), &timeBuf); + //Check the free space-1 RSqlDatabase::TSize size1; TInt err = TheDb.Size(size1); @@ -446,6 +542,10 @@ //Compact err = TheDb.Compact(RSqlDatabase::EMaxCompaction); TEST2(err, size1.iFree); + + GetHomeTimeAsString(timeBuf); + TheTest.Printf(_L("===Time3: %S\r\n"), &timeBuf); + //Cleanup TheDb.Close(); (void)RSqlDatabase::Delete(KDbName1); @@ -456,12 +556,30 @@ TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-SQL-UT-4072 Manual Compact() - attached databases, different page sizes")); CompactDbTest1(); + if(IsTimeLimitReached()) + { + TheTest.Printf(_L("===Test timeout!\r\n")); + return; + } + TheTest.Next( _L(" @SYMTestCaseID:SYSLIB-SQL-UT-4073 Background compaction steps test")); CompactDbTest2(); + if(IsTimeLimitReached()) + { + TheTest.Printf(_L("===Test timeout!\r\n")); + return; + } + TheTest.Next( _L(" @SYMTestCaseID:SYSLIB-SQL-UT-4074 Background compaction timer test")); CompactDbTest3(); + if(IsTimeLimitReached()) + { + TheTest.Printf(_L("===Test timeout!\r\n")); + return; + } + TheTest.Next( _L(" @SYMTestCaseID:SYSLIB-SQL-UT-4103 Big manual compaction test")); ManualCompactTest(); } diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/sql/TEST/t_sqlload.cpp --- a/persistentstorage/sql/TEST/t_sqlload.cpp Fri May 14 17:36:33 2010 +0300 +++ b/persistentstorage/sql/TEST/t_sqlload.cpp Fri May 14 13:32:10 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -69,6 +69,14 @@ RSqlDatabase::Delete(KTestDbName1); } +void GetHomeTimeAsString(TDes& aStr) + { + TTime time; + time.HomeTime(); + TDateTime dt = time.DateTime(); + aStr.Format(_L("%02d:%02d:%02d.%06d"), dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond()); + } + /////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////// //Test macros and functions @@ -115,6 +123,31 @@ /////////////////////////////////////////////////////////////////////////////////////// +//StatementMaxNumberTest() timeouts in WDP builds. +//This function is used to check whether the time limit is reaqched or not. +TBool IsTimeLimitReached() + { + struct TStartTime + { + TStartTime() + { + iTime.HomeTime(); + } + TTime iTime; + }; + + static TStartTime startTime; + const TInt KTestTimeLimit = 150;//seconds + + TTime currTime; + currTime.HomeTime(); + + TTimeIntervalSeconds s; + TInt err = currTime.SecondsFrom(startTime.iTime, s); + TEST2(err, KErrNone); + return s.Int() > KTestTimeLimit; + } + void CreateTestDir() { RFs fs; @@ -532,10 +565,125 @@ CloseTestThreads(threads, statuses, KTestThreadCnt); } +/** +@SYMTestCaseID PDS-SQL-CT-4201 +@SYMTestCaseDesc Max number of SQL statements test. +@SYMTestPriority High +@SYMTestActions The test creates a table with couple of records and then + creates as many as possible SQL statements. The expected result is + that either the statement creation process will fail with KErrNoMemory or + the max number of statements to be created is reached (100000). + Then the test deletes 1/2 of the created statements objects and + after that attempts to execute Next() on the rest of them. + Note that the test has a time limit of 500 seconds. Otherwise on some platforms + with WDP feature switched on the test may timeout. +@SYMTestExpectedResults Test must not fail +@SYMDEF DEF145236 +*/ +void StatementMaxNumberTest() + { + TBuf<30> time; + GetHomeTimeAsString(time); + TheTest.Printf(_L("=== %S: Create database\r\n"), &time); + + (void)RSqlDatabase::Delete(KTestDbName1); + RSqlDatabase db; + TInt err = db.Create(KTestDbName1); + TEST2(err, KErrNone); + err = db.Exec(_L("CREATE TABLE A(I INTEGER); INSERT INTO A(I) VALUES(1); INSERT INTO A(I) VALUES(2);")); + TEST(err >= 0); + + GetHomeTimeAsString(time); + TheTest.Printf(_L("=== %S: Create statements array\r\n"), &time); + + //Reserve memory for the statement objects + const TInt KMaxStmtCount = 100000; + RSqlStatement* stmt = new RSqlStatement[KMaxStmtCount]; + TEST(stmt != NULL); + + //Create as many statement objects as possible + TInt idx = 0; + err = KErrNone; + for(;idx=0 AND I<10")); + if(err != KErrNone) + { + break; + } + if((idx % 100) == 0) + { + GetHomeTimeAsString(time); + TheTest.Printf(_L("=== %S: Create % 5d statements\r\n"), &time, idx + 1); + if(IsTimeLimitReached()) + { + TheTest.Printf(_L("=== %S: The time limit reached.\r\n"), &time); + ++idx;//The idx-th statement is valid, the statement count is idx + 1. + break; + } + } + } + + TInt stmtCnt = idx; + TheTest.Printf(_L("%d created statement objects. Last error: %d.\r\n"), stmtCnt, err); + TEST(err == KErrNone || err == KErrNoMemory); + + //Close 1/2 of the statements to free some memory + idx = 0; + for(;idx<(stmtCnt/2);++idx) + { + stmt[idx].Close(); + if((idx % 100) == 0) + { + GetHomeTimeAsString(time); + TheTest.Printf(_L("=== %S: % 5d statements closed\r\n"), &time, idx + 1); + } + } + + //Now, there should be enough memory to be able to execute Next() on the rest of the statements + for(TInt j=0;idx +#include +#include +#include +#include +#include "t_sqlcmdlineutil.h" + +RTest TheTest(_L("t_sqlperformance5 test")); +RSqlDatabase TheDb; + +_LIT(KDbName, "c:\\test\\t_sqlperformance5.db"); + +TFileName TheDbFileName; +TBuf<200> TheTestTitle; +TCmdLineParams TheCmdLineParams(TCmdLineParams::EDbUtf16, 16384, 32); +TBuf8<200> TheSqlConfigString; + +_LIT(KUtf8, "UTF8 "); +_LIT(KUtf16, "UTF16"); + +const TInt KThumbnailCount = 60; +const TInt KMaxThumbnailSize = 40 * 1024; + +const TInt KThumbnailSizes[KThumbnailCount] = + { + //1 2 3 4 5 6 7 8 9 10 + 22054, 24076, 33281, 24733, 33094, 31443, 29264, 28725, 31798, 29322, //1 + 25002, 26926, 31097, 21988, 33659, 29081, 33050, 36857, 37686, 24034, //2 + 21093, 28314, 20186, 27222, 28600, 32735, 27279, 31898, 31380, 36316, //3 + 34295, 31642, 21829, 32912, 31584, 32557, 36601, 22744, 32808, 26130, //4 + 31222, 21545, 35899, 22257, 25856, 31169, 34893, 23496, 23034, 30381, //5 + 25810, 27123, 33442, 22275, 30260, 31028, 32415, 27345, 26614, 33704 //6 + }; + +TInt TheFastCounterFreq = 0; + +TInt TheCreateDbTime = 0; +TInt TheCreateTablesTime = 0; +TInt TheBindParamsTime = 0; +TInt TheStmtExecTime = 0; +TInt TheStmtResetTime = 0; +TInt ThePopulateTempTableTime = 0; +TInt TheFlushTime = 0; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +void TestEnvDestroy() + { + TheDb.Close(); + (void)RSqlDatabase::Delete(TheDbFileName); + ResetSoftHeapLimit(); + } + +/////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////// +//Test macros and functions +void Check1(TInt aValue, TInt aLine) + { + if(!aValue) + { + TestEnvDestroy(); + TheTest.Printf(_L("*** Line %d\r\n"), aLine); + TheTest(EFalse, aLine); + } + } +void Check2(TInt aValue, TInt aExpected, TInt aLine) + { + if(aValue != aExpected) + { + TSqlRetCodeClass cl = SqlRetCodeClass(aValue); + if(cl == ESqlDbError) + { + TPtrC errmsg = TheDb.LastErrorMessage(); + TheTest.Printf(_L("*** SQLite err=\"%S\"\r\n"), &errmsg); + } + TestEnvDestroy(); + TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue); + TheTest(EFalse, aLine); + } + } +#define TEST(arg) ::Check1((arg), __LINE__) +#define TEST2(aValue, aExpected) ::Check2(aValue, aExpected, __LINE__) + +/////////////////////////////////////////////////////////////////////////////////////// + +void TestEnvInit() + { + RFs fs; + TInt err = fs.Connect(); + TEST2(err, KErrNone); + err = fs.MkDirAll(TheDbFileName); + TEST(err == KErrNone || err == KErrAlreadyExists); + fs.Close(); + } + +TInt TimeDiffUs(TUint32 aStartTicks, TUint32 aEndTicks) + { + if(TheFastCounterFreq == 0) + { + TEST2(HAL::Get(HAL::EFastCounterFrequency, TheFastCounterFreq), KErrNone); + TheTest.Printf(_L("==Fast counter frequency: %d Hz\r\n"), TheFastCounterFreq); + } + TInt64 diffTicks = (TInt64)aEndTicks - (TInt64)aStartTicks; + if(diffTicks < 0) + { + diffTicks = KMaxTUint32 + diffTicks + 1; + } + const TInt KMicroSecIn1Sec = 1000000; + TInt us = (diffTicks * KMicroSecIn1Sec) / TheFastCounterFreq; + return us; + } + +void PrintTime(const TDesC& aFmt, TUint32 aStartTicks, TUint32 aEndTicks) + { + TInt us = TimeDiffUs(aStartTicks, aEndTicks); + TheTest.Printf(aFmt, us); + } + +//============================================================================= + +/** +@SYMTestCaseID PDS-SQL-CT-4205 +@SYMTestCaseDesc Thumbnail database performance test. +@SYMTestPriority Medium +@SYMTestActions The test executes statements to create the thumbnail database. +@SYMTestExpectedResults The test must not fail +@SYMDEF ou1cimx1#362240 +*/ +void CreateDb() + { + (void)RSqlDatabase::Delete(TheDbFileName); + + TUint32 fc1 = User::FastCounter(); + + TInt err = TheDb.Create(TheDbFileName, &TheSqlConfigString); + + TUint32 fc2 = User::FastCounter(); + TheCreateDbTime = TimeDiffUs(fc1, fc2); + + TEST2(err, KErrNone); + + fc1 = User::FastCounter(); + + err = TheDb.Exec(_L("CREATE TABLE ThumbnailInfo (Path TEXT COLLATE NOCASE,TNId INTEGER,Size INTEGER,Format INTEGER,TNPath TEXT COLLATE NOCASE,Width INTEGER,Height INTEGER,OrigWidth INTEGER,OrigHeight INTEGER,Flags INTEGER,VideoPosition INTEGER,Orientation INTEGER,humbFromPath INTEGER,Modified LARGEINT);")); + TEST(err >= 0); + + err = TheDb.Exec(_L("CREATE TABLE ThumbnailInfoData(Data BLOB);")); + TEST(err >= 0); + + err = TheDb.Exec(_L("CREATE TABLE ThumbnailDeleted(Path TEXT UNIQUE COLLATE NOCASE);")); + TEST(err >= 0); + + err = TheDb.Exec(_L("CREATE INDEX idx1 ON ThumbnailInfo(Path, Size);")); + TEST(err >= 0); + + err = TheDb.Exec(_L("CREATE INDEX idx4 ON ThumbnailDeleted(Path);")); + TEST(err >= 0); + + err = TheDb.Exec(_L("CREATE TABLE ThumbnailVersion (Major INTEGER,Minor INTEGER,IMEI TEXT COLLATE NOCASE);")); + TEST(err >= 0); + + fc2 = User::FastCounter(); + TheCreateTablesTime = TimeDiffUs(fc1, fc2); + + TheDb.Close(); + } + +void PoulateTempTables(RSqlStatement& aStmt1, RSqlStatement& aStmt2) + { + HBufC8* thumbnailBuf = HBufC8::New(KMaxThumbnailSize); + TEST(thumbnailBuf != NULL); + TPtr8 thumbnailData = thumbnailBuf->Des(); + thumbnailData.SetLength(KMaxThumbnailSize); + thumbnailData.Fill(TChar('A')); + + TUint32 fc3 = User::FastCounter(); + + for(TInt i=0;i= 0); + TInt err = aStmt1.BindText(paramIndex, _L("c:\\test\\abcdefgh123456789.jpg")); + TEST2(err, KErrNone); + + paramIndex = aStmt1.ParameterIndex(_L(":Width")); + TEST(paramIndex >= 0); + err = aStmt1.BindInt(paramIndex, 50); + TEST2(err, KErrNone); + + paramIndex = aStmt1.ParameterIndex(_L(":Height")); + TEST(paramIndex >= 0); + err = aStmt1.BindInt(paramIndex, 40); + TEST2(err, KErrNone); + + paramIndex = aStmt1.ParameterIndex(_L(":OrigWidth")); + TEST(paramIndex >= 0); + err = aStmt1.BindInt(paramIndex, 1000); + TEST2(err, KErrNone); + + paramIndex = aStmt1.ParameterIndex(_L(":OrigHeight")); + TEST(paramIndex >= 0); + err = aStmt1.BindInt(paramIndex, 2000); + TEST2(err, KErrNone); + + paramIndex = aStmt1.ParameterIndex(_L(":Format")); + TEST(paramIndex >= 0); + err = aStmt1.BindInt(paramIndex, 10); + TEST2(err, KErrNone); + + paramIndex = aStmt1.ParameterIndex(_L(":Flags")); + TEST(paramIndex >= 0); + err = aStmt1.BindInt(paramIndex, 0x1E); + TEST2(err, KErrNone); + + paramIndex = aStmt1.ParameterIndex(_L(":Size")); + TEST(paramIndex >= 0); + err = aStmt1.BindInt(paramIndex, 1200); + TEST2(err, KErrNone); + + paramIndex = aStmt1.ParameterIndex(_L(":Orient")); + TEST(paramIndex >= 0); + err = aStmt1.BindInt(paramIndex, 2); + TEST2(err, KErrNone); + + paramIndex = aStmt1.ParameterIndex(_L(":ThumbFromPath")); + TEST(paramIndex >= 0); + err = aStmt1.BindInt(paramIndex, 1); + TEST2(err, KErrNone); + + paramIndex = aStmt1.ParameterIndex(_L(":Modified")); + TEST(paramIndex >= 0); + err = aStmt1.BindInt64(paramIndex, 3212398543392LL); + TEST2(err, KErrNone); + + TUint32 fc2 = User::FastCounter(); + TheBindParamsTime += TimeDiffUs(fc1, fc2); + + fc1 = User::FastCounter(); + err = aStmt1.Exec(); + fc2 = User::FastCounter(); + TheStmtExecTime += TimeDiffUs(fc1, fc2); + + TEST2(err, 1); + + fc1 = User::FastCounter(); + err = aStmt1.Reset(); + fc2 = User::FastCounter(); + TheStmtResetTime += TimeDiffUs(fc1, fc2); + + TEST2(err, KErrNone); + + thumbnailData.SetLength(KThumbnailSizes[i]); + + fc1 = User::FastCounter(); + paramIndex = aStmt2.ParameterIndex(_L(":Data")); + TEST(paramIndex >= 0); + err = aStmt2.BindBinary(paramIndex, thumbnailData); + TEST2(err, KErrNone); + fc2 = User::FastCounter(); + TheBindParamsTime += TimeDiffUs(fc1, fc2); + + fc1 = User::FastCounter(); + err = aStmt2.Exec(); + fc2 = User::FastCounter(); + TheStmtExecTime += TimeDiffUs(fc1, fc2); + + TEST2(err, 1); + + fc1 = User::FastCounter(); + err = aStmt2.Reset(); + fc2 = User::FastCounter(); + TheStmtResetTime += TimeDiffUs(fc1, fc2); + + TEST2(err, KErrNone); + } + + TUint32 fc4 = User::FastCounter(); + ThePopulateTempTableTime += TimeDiffUs(fc3, fc4); + + delete thumbnailBuf; + } + +void FlushTemptTables() + { + TUint32 fc1 = User::FastCounter(); + + TInt err = TheDb.Exec(_L("BEGIN TRANSACTION")); + TEST(err >= 0); + + err = TheDb.Exec(_L("INSERT INTO ThumbnailInfo SELECT * FROM TempThumbnailInfo;")); + TEST2(err, KThumbnailCount); + + err = TheDb.Exec(_L("INSERT INTO ThumbnailInfoData SELECT * FROM TempThumbnailInfoData;")); + TEST2(err, KThumbnailCount); + + err = TheDb.Exec(_L("DELETE FROM TempThumbnailInfo;")); + TEST(err >= 0); + + err = TheDb.Exec(_L("DELETE FROM TempThumbnailInfoData;")); + TEST(err >= 0); + + err = TheDb.Exec(_L("COMMIT;")); + TEST(err >= 0); + + TUint32 fc2 = User::FastCounter(); + TheFlushTime += TimeDiffUs(fc1, fc2); + } + +/** +@SYMTestCaseID PDS-SQL-CT-4206 +@SYMTestCaseDesc Thumbnail database performance test. +@SYMTestPriority Medium +@SYMTestActions The test inserts 60 thumbnails with summary size of 1.7Mb into the thumbnail database. +@SYMTestExpectedResults The test must not fail +@SYMDEF ou1cimx1#362240 +*/ +void PopulateDb() + { + TInt dataToCommit = 0; + for(TInt i=0;i= 0); + + err = TheDb.Exec(_L("CREATE TEMP TABLE TempThumbnailInfoData (Data BLOB);")); + TEST(err >= 0); + + RSqlStatement stmt1; + err = stmt1.Prepare(TheDb, _L("INSERT INTO TempThumbnailInfo(Path,Size,Format,Width,Height,OrigWidth,OrigHeight,Flags,Orientation,ThumbFromPath,Modified) VALUES (:Path,:Size,:Format,:Width,:Height,:OrigWidth,:OrigHeight,:Flags,:Orient,:ThumbFromPath,:Modified);")); + TEST2(err, KErrNone); + + RSqlStatement stmt2; + err = stmt2.Prepare(TheDb, _L("INSERT INTO TempThumbnailInfoData (Data) VALUES (:Data);")); + TEST2(err, KErrNone); + + PoulateTempTables(stmt1, stmt2); + FlushTemptTables(); + + stmt2.Close(); + stmt1.Close(); + TheDb.Close(); + + TheTest.Printf(_L("==Create database, time=%d microseconds\r\n"), TheCreateDbTime); + TheTest.Printf(_L("==Create tables, time=%d microseconds\r\n"), TheCreateTablesTime); + TheTest.Printf(_L("==Bind parameters time, time=%d microseconds\r\n"), TheBindParamsTime); + TheTest.Printf(_L("==Temp tables, statement exec, time=%d microseconds\r\n"), TheStmtExecTime); + TheTest.Printf(_L("==Temp tables, statement reset, time=%d microseconds\r\n"), TheStmtResetTime); + TheTest.Printf(_L("==Populate temp tables, time=%d microseconds\r\n"), ThePopulateTempTableTime); + TheTest.Printf(_L("==Copy temp tables to main tables, time=%d microseconds\r\n"), TheFlushTime); + } + +void DoTestsL() + { + TheTestTitle.Format(_L("@SYMTestCaseID:PDS-SQL-CT-4205 Create database, encoding: \"%S\", page size: %d\r\n"), + TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize); + TheTest.Start(TheTestTitle); + CreateDb(); + + TheTestTitle.Format(_L("@SYMTestCaseID:PDS-SQL-CT-4206 Populate database, encoding: \"%S\", page size: %d\r\n"), + TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize); + TheTest.Next(TheTestTitle); + PopulateDb(); + + (void)RSqlDatabase::Delete(TheDbFileName); + } + +TInt E32Main() + { + TheTest.Title(); + + CTrapCleanup* tc = CTrapCleanup::New(); + TheTest(tc != NULL); + + __UHEAP_MARK; + + GetCmdLineParamsAndSqlConfigString(TheTest, _L("t_sqlperformance5"), TheCmdLineParams, TheSqlConfigString); + PrepareDbName(KDbName, TheCmdLineParams.iDriveName, TheDbFileName); + SetSoftHeapLimit(TheCmdLineParams.iSoftHeapLimitKb); + + TheTest.Printf(_L("==Databases: %S\r\n"), &TheDbFileName); + + TestEnvDestroy(); + TestEnvInit(); + TRAPD(err, DoTestsL()); + TestEnvDestroy(); + TEST2(err, KErrNone); + + __UHEAP_MARKEND; + + TheTest.End(); + TheTest.Close(); + + delete tc; + + User::Heap().Check(); + return KErrNone; + } diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/sqlite3api/GROUP/BLD.INF --- a/persistentstorage/sqlite3api/GROUP/BLD.INF Fri May 14 17:36:33 2010 +0300 +++ b/persistentstorage/sqlite3api/GROUP/BLD.INF Fri May 14 13:32:10 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -33,9 +33,414 @@ PRJ_TESTEXPORTS -../GROUP/sqlite3tests.iby /epoc32/rom/include/sqlite3tests.iby -../GROUP/sqlite3tests.bat /epoc32/data/z/system/test/sqlite3tests.bat -../GROUP/config.ini /epoc32/data/z/system/test/config.ini +../GROUP/sqlite3tests.iby /epoc32/rom/include/sqlite3tests.iby +../GROUP/sqlite3tests.bat z:/test/sqlite3tests.bat +../GROUP/config.ini z:/test/config.ini + +../TEST/TclScript/speed1p.explain z:/private/10285A82/speed1p.explain +../TEST/TclScript/speed4p.explain z:/private/10285A82/speed4p.explain +../TEST/TclScript/fuzz_common.tcl z:/private/10285A82/fuzz_common.tcl +../TEST/TclScript/malloc_common.tcl z:/private/10285A82/malloc_common.tcl +../TEST/TclScript/tester.tcl z:/private/10285A82/tester.tcl +../TEST/TclScript/thread_common.tcl z:/private/10285A82/thread_common.tcl +../TEST/TclScript/trans2.test.gz z:/private/10285A82/trans2.test.gz +../TEST/TclScript/aggerror.test z:/private/10285A82/aggerror.test +../TEST/TclScript/alias.test z:/private/10285A82/alias.test +../TEST/TclScript/all.test z:/private/10285A82/all.test +../TEST/TclScript/alter.test z:/private/10285A82/alter.test +../TEST/TclScript/alter2.test z:/private/10285A82/alter2.test +../TEST/TclScript/alter3.test z:/private/10285A82/alter3.test +../TEST/TclScript/altermalloc.test z:/private/10285A82/altermalloc.test +../TEST/TclScript/analyze.test z:/private/10285A82/analyze.test +../TEST/TclScript/async.test z:/private/10285A82/async.test +../TEST/TclScript/async2.test z:/private/10285A82/async2.test +../TEST/TclScript/async3.test z:/private/10285A82/async3.test +../TEST/TclScript/attach.test z:/private/10285A82/attach.test +../TEST/TclScript/attach2.test z:/private/10285A82/attach2.test +../TEST/TclScript/attach3.test z:/private/10285A82/attach3.test +../TEST/TclScript/attachmalloc.test z:/private/10285A82/attachmalloc.test +../TEST/TclScript/auth.test z:/private/10285A82/auth.test +../TEST/TclScript/auth2.test z:/private/10285A82/auth2.test +../TEST/TclScript/autoinc.test z:/private/10285A82/autoinc.test +../TEST/TclScript/autovacuum.test z:/private/10285A82/autovacuum.test +../TEST/TclScript/autovacuum_ioerr2.test z:/private/10285A82/autovacuum_ioerr2.test +../TEST/TclScript/avtrans.test z:/private/10285A82/avtrans.test +../TEST/TclScript/badutf.test z:/private/10285A82/badutf.test +../TEST/TclScript/between.test z:/private/10285A82/between.test +../TEST/TclScript/bigfile.test z:/private/10285A82/bigfile.test +../TEST/TclScript/bigrow.test z:/private/10285A82/bigrow.test +../TEST/TclScript/bind.test z:/private/10285A82/bind.test +../TEST/TclScript/bindxfer.test z:/private/10285A82/bindxfer.test +../TEST/TclScript/bitvec.test z:/private/10285A82/bitvec.test +../TEST/TclScript/blob.test z:/private/10285A82/blob.test +../TEST/TclScript/busy.test z:/private/10285A82/busy.test +../TEST/TclScript/cache.test z:/private/10285A82/cache.test +../TEST/TclScript/capi2.test z:/private/10285A82/capi2.test +../TEST/TclScript/capi3.test z:/private/10285A82/capi3.test +../TEST/TclScript/capi3b.test z:/private/10285A82/capi3b.test +../TEST/TclScript/capi3c.test z:/private/10285A82/capi3c.test +../TEST/TclScript/capi3d.test z:/private/10285A82/capi3d.test +../TEST/TclScript/cast.test z:/private/10285A82/cast.test +../TEST/TclScript/check.test z:/private/10285A82/check.test +../TEST/TclScript/collate1.test z:/private/10285A82/collate1.test +../TEST/TclScript/collate2.test z:/private/10285A82/collate2.test +../TEST/TclScript/collate3.test z:/private/10285A82/collate3.test +../TEST/TclScript/collate4.test z:/private/10285A82/collate4.test +../TEST/TclScript/collate5.test z:/private/10285A82/collate5.test +../TEST/TclScript/collate6.test z:/private/10285A82/collate6.test +../TEST/TclScript/collate7.test z:/private/10285A82/collate7.test +../TEST/TclScript/collate8.test z:/private/10285A82/collate8.test +../TEST/TclScript/collate9.test z:/private/10285A82/collate9.test +../TEST/TclScript/collateA.test z:/private/10285A82/collateA.test +../TEST/TclScript/colmeta.test z:/private/10285A82/colmeta.test +../TEST/TclScript/colname.test z:/private/10285A82/colname.test +../TEST/TclScript/conflict.test z:/private/10285A82/conflict.test +../TEST/TclScript/corrupt.test z:/private/10285A82/corrupt.test +../TEST/TclScript/corrupt2.test z:/private/10285A82/corrupt2.test +../TEST/TclScript/corrupt3.test z:/private/10285A82/corrupt3.test +../TEST/TclScript/corrupt4.test z:/private/10285A82/corrupt4.test +../TEST/TclScript/corrupt5.test z:/private/10285A82/corrupt5.test +../TEST/TclScript/corrupt6.test z:/private/10285A82/corrupt6.test +../TEST/TclScript/corrupt7.test z:/private/10285A82/corrupt7.test +../TEST/TclScript/corrupt8.test z:/private/10285A82/corrupt8.test +../TEST/TclScript/corrupt9.test z:/private/10285A82/corrupt9.test +../TEST/TclScript/corruptA.test z:/private/10285A82/corruptA.test +../TEST/TclScript/crash.test z:/private/10285A82/crash.test +../TEST/TclScript/crash2.test z:/private/10285A82/crash2.test +../TEST/TclScript/crash3.test z:/private/10285A82/crash3.test +../TEST/TclScript/crash4.test z:/private/10285A82/crash4.test +../TEST/TclScript/crash5.test z:/private/10285A82/crash5.test +../TEST/TclScript/crash6.test z:/private/10285A82/crash6.test +../TEST/TclScript/crash7.test z:/private/10285A82/crash7.test +../TEST/TclScript/createtab.test z:/private/10285A82/createtab.test +../TEST/TclScript/cse.test z:/private/10285A82/cse.test +../TEST/TclScript/date.test z:/private/10285A82/date.test +../TEST/TclScript/default.test z:/private/10285A82/default.test +../TEST/TclScript/delete.test z:/private/10285A82/delete.test +../TEST/TclScript/delete2.test z:/private/10285A82/delete2.test +../TEST/TclScript/delete3.test z:/private/10285A82/delete3.test +../TEST/TclScript/descidx1.test z:/private/10285A82/descidx1.test +../TEST/TclScript/descidx2.test z:/private/10285A82/descidx2.test +../TEST/TclScript/descidx3.test z:/private/10285A82/descidx3.test +../TEST/TclScript/diskfull.test z:/private/10285A82/diskfull.test +../TEST/TclScript/distinctagg.test z:/private/10285A82/distinctagg.test +../TEST/TclScript/enc.test z:/private/10285A82/enc.test +../TEST/TclScript/enc2.test z:/private/10285A82/enc2.test +../TEST/TclScript/enc3.test z:/private/10285A82/enc3.test +../TEST/TclScript/eval.test z:/private/10285A82/eval.test +../TEST/TclScript/exclusive.test z:/private/10285A82/exclusive.test +../TEST/TclScript/exclusive2.test z:/private/10285A82/exclusive2.test +../TEST/TclScript/exec.test z:/private/10285A82/exec.test +../TEST/TclScript/expr.test z:/private/10285A82/expr.test +../TEST/TclScript/filectrl.test z:/private/10285A82/filectrl.test +../TEST/TclScript/filefmt.test z:/private/10285A82/filefmt.test +../TEST/TclScript/fkey1.test z:/private/10285A82/fkey1.test +../TEST/TclScript/format4.test z:/private/10285A82/format4.test +../TEST/TclScript/fts1a.test z:/private/10285A82/fts1a.test +../TEST/TclScript/fts1b.test z:/private/10285A82/fts1b.test +../TEST/TclScript/fts1c.test z:/private/10285A82/fts1c.test +../TEST/TclScript/fts1d.test z:/private/10285A82/fts1d.test +../TEST/TclScript/fts1e.test z:/private/10285A82/fts1e.test +../TEST/TclScript/fts1f.test z:/private/10285A82/fts1f.test +../TEST/TclScript/fts1i.test z:/private/10285A82/fts1i.test +../TEST/TclScript/fts1j.test z:/private/10285A82/fts1j.test +../TEST/TclScript/fts1k.test z:/private/10285A82/fts1k.test +../TEST/TclScript/fts1l.test z:/private/10285A82/fts1l.test +../TEST/TclScript/fts1m.test z:/private/10285A82/fts1m.test +../TEST/TclScript/fts1n.test z:/private/10285A82/fts1n.test +../TEST/TclScript/fts1o.test z:/private/10285A82/fts1o.test +../TEST/TclScript/fts1porter.test z:/private/10285A82/fts1porter.test +../TEST/TclScript/fts2.test z:/private/10285A82/fts2.test +../TEST/TclScript/fts2a.test z:/private/10285A82/fts2a.test +../TEST/TclScript/fts2b.test z:/private/10285A82/fts2b.test +../TEST/TclScript/fts2c.test z:/private/10285A82/fts2c.test +../TEST/TclScript/fts2d.test z:/private/10285A82/fts2d.test +../TEST/TclScript/fts2e.test z:/private/10285A82/fts2e.test +../TEST/TclScript/fts2f.test z:/private/10285A82/fts2f.test +../TEST/TclScript/fts2g.test z:/private/10285A82/fts2g.test +../TEST/TclScript/fts2h.test z:/private/10285A82/fts2h.test +../TEST/TclScript/fts2i.test z:/private/10285A82/fts2i.test +../TEST/TclScript/fts2j.test z:/private/10285A82/fts2j.test +../TEST/TclScript/fts2k.test z:/private/10285A82/fts2k.test +../TEST/TclScript/fts2l.test z:/private/10285A82/fts2l.test +../TEST/TclScript/fts2m.test z:/private/10285A82/fts2m.test +../TEST/TclScript/fts2n.test z:/private/10285A82/fts2n.test +../TEST/TclScript/fts2o.test z:/private/10285A82/fts2o.test +../TEST/TclScript/fts2p.test z:/private/10285A82/fts2p.test +../TEST/TclScript/fts2q.test z:/private/10285A82/fts2q.test +../TEST/TclScript/fts2r.test z:/private/10285A82/fts2r.test +../TEST/TclScript/fts2token.test z:/private/10285A82/fts2token.test +../TEST/TclScript/fts3.test z:/private/10285A82/fts3.test +../TEST/TclScript/fts3aa.test z:/private/10285A82/fts3aa.test +../TEST/TclScript/fts3ab.test z:/private/10285A82/fts3ab.test +../TEST/TclScript/fts3ac.test z:/private/10285A82/fts3ac.test +../TEST/TclScript/fts3ad.test z:/private/10285A82/fts3ad.test +../TEST/TclScript/fts3ae.test z:/private/10285A82/fts3ae.test +../TEST/TclScript/fts3af.test z:/private/10285A82/fts3af.test +../TEST/TclScript/fts3ag.test z:/private/10285A82/fts3ag.test +../TEST/TclScript/fts3ah.test z:/private/10285A82/fts3ah.test +../TEST/TclScript/fts3ai.test z:/private/10285A82/fts3ai.test +../TEST/TclScript/fts3aj.test z:/private/10285A82/fts3aj.test +../TEST/TclScript/fts3ak.test z:/private/10285A82/fts3ak.test +../TEST/TclScript/fts3al.test z:/private/10285A82/fts3al.test +../TEST/TclScript/fts3am.test z:/private/10285A82/fts3am.test +../TEST/TclScript/fts3an.test z:/private/10285A82/fts3an.test +../TEST/TclScript/fts3ao.test z:/private/10285A82/fts3ao.test +../TEST/TclScript/fts3atoken.test z:/private/10285A82/fts3atoken.test +../TEST/TclScript/fts3b.test z:/private/10285A82/fts3b.test +../TEST/TclScript/fts3c.test z:/private/10285A82/fts3c.test +../TEST/TclScript/fts3d.test z:/private/10285A82/fts3d.test +../TEST/TclScript/fts3e.test z:/private/10285A82/fts3e.test +../TEST/TclScript/fts3near.test z:/private/10285A82/fts3near.test +../TEST/TclScript/func.test z:/private/10285A82/func.test +../TEST/TclScript/fuzz.test z:/private/10285A82/fuzz.test +../TEST/TclScript/fuzz2.test z:/private/10285A82/fuzz2.test +../TEST/TclScript/fuzz_malloc.test z:/private/10285A82/fuzz_malloc.test +../TEST/TclScript/hook.test z:/private/10285A82/hook.test +../TEST/TclScript/icu.test z:/private/10285A82/icu.test +../TEST/TclScript/in.test z:/private/10285A82/in.test +../TEST/TclScript/in2.test z:/private/10285A82/in2.test +../TEST/TclScript/in3.test z:/private/10285A82/in3.test +../TEST/TclScript/incrblob.test z:/private/10285A82/incrblob.test +../TEST/TclScript/incrblob2.test z:/private/10285A82/incrblob2.test +../TEST/TclScript/incrblob_err.test z:/private/10285A82/incrblob_err.test +../TEST/TclScript/incrvacuum.test z:/private/10285A82/incrvacuum.test +../TEST/TclScript/incrvacuum2.test z:/private/10285A82/incrvacuum2.test +../TEST/TclScript/incrvacuum_ioerr.test z:/private/10285A82/incrvacuum_ioerr.test +../TEST/TclScript/index.test z:/private/10285A82/index.test +../TEST/TclScript/index2.test z:/private/10285A82/index2.test +../TEST/TclScript/index3.test z:/private/10285A82/index3.test +../TEST/TclScript/insert.test z:/private/10285A82/insert.test +../TEST/TclScript/insert2.test z:/private/10285A82/insert2.test +../TEST/TclScript/insert3.test z:/private/10285A82/insert3.test +../TEST/TclScript/insert4.test z:/private/10285A82/insert4.test +../TEST/TclScript/insert5.test z:/private/10285A82/insert5.test +../TEST/TclScript/interrupt.test z:/private/10285A82/interrupt.test +../TEST/TclScript/intpkey.test z:/private/10285A82/intpkey.test +../TEST/TclScript/io.test z:/private/10285A82/io.test +../TEST/TclScript/ioerr.test z:/private/10285A82/ioerr.test +../TEST/TclScript/ioerr2.test z:/private/10285A82/ioerr2.test +../TEST/TclScript/ioerr3.test z:/private/10285A82/ioerr3.test +../TEST/TclScript/ioerr4.test z:/private/10285A82/ioerr4.test +../TEST/TclScript/ioerr5.test z:/private/10285A82/ioerr5.test +../TEST/TclScript/join.test z:/private/10285A82/join.test +../TEST/TclScript/join2.test z:/private/10285A82/join2.test +../TEST/TclScript/join3.test z:/private/10285A82/join3.test +../TEST/TclScript/join4.test z:/private/10285A82/join4.test +../TEST/TclScript/join5.test z:/private/10285A82/join5.test +../TEST/TclScript/journal1.test z:/private/10285A82/journal1.test +../TEST/TclScript/jrnlmode.test z:/private/10285A82/jrnlmode.test +../TEST/TclScript/lastinsert.test z:/private/10285A82/lastinsert.test +../TEST/TclScript/laststmtchanges.test z:/private/10285A82/laststmtchanges.test +../TEST/TclScript/like.test z:/private/10285A82/like.test +../TEST/TclScript/like2.test z:/private/10285A82/like2.test +../TEST/TclScript/limit.test z:/private/10285A82/limit.test +../TEST/TclScript/loadext.test z:/private/10285A82/loadext.test +../TEST/TclScript/loadext2.test z:/private/10285A82/loadext2.test +../TEST/TclScript/lock.test z:/private/10285A82/lock.test +../TEST/TclScript/lock2.test z:/private/10285A82/lock2.test +../TEST/TclScript/lock3.test z:/private/10285A82/lock3.test +../TEST/TclScript/lock4.test z:/private/10285A82/lock4.test +../TEST/TclScript/lock5.test z:/private/10285A82/lock5.test +../TEST/TclScript/lookaside.test z:/private/10285A82/lookaside.test +../TEST/TclScript/main.test z:/private/10285A82/main.test +../TEST/TclScript/malloc.test z:/private/10285A82/malloc.test +../TEST/TclScript/malloc3.test z:/private/10285A82/malloc3.test +../TEST/TclScript/malloc4.test z:/private/10285A82/malloc4.test +../TEST/TclScript/malloc5.test z:/private/10285A82/malloc5.test +../TEST/TclScript/malloc6.test z:/private/10285A82/malloc6.test +../TEST/TclScript/malloc7.test z:/private/10285A82/malloc7.test +../TEST/TclScript/malloc8.test z:/private/10285A82/malloc8.test +../TEST/TclScript/malloc9.test z:/private/10285A82/malloc9.test +../TEST/TclScript/mallocA.test z:/private/10285A82/mallocA.test +../TEST/TclScript/mallocAll.test z:/private/10285A82/mallocAll.test +../TEST/TclScript/mallocB.test z:/private/10285A82/mallocB.test +../TEST/TclScript/mallocC.test z:/private/10285A82/mallocC.test +../TEST/TclScript/mallocD.test z:/private/10285A82/mallocD.test +../TEST/TclScript/mallocE.test z:/private/10285A82/mallocE.test +../TEST/TclScript/mallocF.test z:/private/10285A82/mallocF.test +../TEST/TclScript/mallocG.test z:/private/10285A82/mallocG.test +../TEST/TclScript/mallocH.test z:/private/10285A82/mallocH.test +../TEST/TclScript/mallocI.test z:/private/10285A82/mallocI.test +../TEST/TclScript/manydb.test z:/private/10285A82/manydb.test +../TEST/TclScript/memdb.test z:/private/10285A82/memdb.test +../TEST/TclScript/memleak.test z:/private/10285A82/memleak.test +../TEST/TclScript/memsubsys1.test z:/private/10285A82/memsubsys1.test +../TEST/TclScript/memsubsys2.test z:/private/10285A82/memsubsys2.test +../TEST/TclScript/minmax.test z:/private/10285A82/minmax.test +../TEST/TclScript/minmax2.test z:/private/10285A82/minmax2.test +../TEST/TclScript/minmax3.test z:/private/10285A82/minmax3.test +../TEST/TclScript/misc1.test z:/private/10285A82/misc1.test +../TEST/TclScript/misc2.test z:/private/10285A82/misc2.test +../TEST/TclScript/misc3.test z:/private/10285A82/misc3.test +../TEST/TclScript/misc4.test z:/private/10285A82/misc4.test +../TEST/TclScript/misc5.test z:/private/10285A82/misc5.test +../TEST/TclScript/misc6.test z:/private/10285A82/misc6.test +../TEST/TclScript/misc7.test z:/private/10285A82/misc7.test +../TEST/TclScript/misuse.test z:/private/10285A82/misuse.test +../TEST/TclScript/mutex1.test z:/private/10285A82/mutex1.test +../TEST/TclScript/mutex2.test z:/private/10285A82/mutex2.test +../TEST/TclScript/nan.test z:/private/10285A82/nan.test +../TEST/TclScript/notnull.test z:/private/10285A82/notnull.test +../TEST/TclScript/null.test z:/private/10285A82/null.test +../TEST/TclScript/openv2.test z:/private/10285A82/openv2.test +../TEST/TclScript/pager.test z:/private/10285A82/pager.test +../TEST/TclScript/pager2.test z:/private/10285A82/pager2.test +../TEST/TclScript/pager3.test z:/private/10285A82/pager3.test +../TEST/TclScript/pageropt.test z:/private/10285A82/pageropt.test +../TEST/TclScript/pagesize.test z:/private/10285A82/pagesize.test +../TEST/TclScript/pcache.test z:/private/10285A82/pcache.test +../TEST/TclScript/permutations.test z:/private/10285A82/permutations.test +../TEST/TclScript/pragma.test z:/private/10285A82/pragma.test +../TEST/TclScript/pragma2.test z:/private/10285A82/pragma2.test +../TEST/TclScript/printf.test z:/private/10285A82/printf.test +../TEST/TclScript/progress.test z:/private/10285A82/progress.test +../TEST/TclScript/ptrchng.test z:/private/10285A82/ptrchng.test +../TEST/TclScript/quick.test z:/private/10285A82/quick.test +../TEST/TclScript/quote.test z:/private/10285A82/quote.test +../TEST/TclScript/rdonly.test z:/private/10285A82/rdonly.test +../TEST/TclScript/reindex.test z:/private/10285A82/reindex.test +../TEST/TclScript/rollback.test z:/private/10285A82/rollback.test +../TEST/TclScript/rowid.test z:/private/10285A82/rowid.test +../TEST/TclScript/rtree.test z:/private/10285A82/rtree.test +../TEST/TclScript/safety.test z:/private/10285A82/safety.test +../TEST/TclScript/schema.test z:/private/10285A82/schema.test +../TEST/TclScript/schema2.test z:/private/10285A82/schema2.test +../TEST/TclScript/select1.test z:/private/10285A82/select1.test +../TEST/TclScript/select2.test z:/private/10285A82/select2.test +../TEST/TclScript/select3.test z:/private/10285A82/select3.test +../TEST/TclScript/select4.test z:/private/10285A82/select4.test +../TEST/TclScript/select5.test z:/private/10285A82/select5.test +../TEST/TclScript/select6.test z:/private/10285A82/select6.test +../TEST/TclScript/select7.test z:/private/10285A82/select7.test +../TEST/TclScript/select8.test z:/private/10285A82/select8.test +../TEST/TclScript/select9.test z:/private/10285A82/select9.test +../TEST/TclScript/selectA.test z:/private/10285A82/selectA.test +../TEST/TclScript/selectB.test z:/private/10285A82/selectB.test +../TEST/TclScript/server1.test z:/private/10285A82/server1.test +../TEST/TclScript/shared.test z:/private/10285A82/shared.test +../TEST/TclScript/shared2.test z:/private/10285A82/shared2.test +../TEST/TclScript/shared3.test z:/private/10285A82/shared3.test +../TEST/TclScript/shared4.test z:/private/10285A82/shared4.test +../TEST/TclScript/shared_err.test z:/private/10285A82/shared_err.test +../TEST/TclScript/shortread1.test z:/private/10285A82/shortread1.test +../TEST/TclScript/sidedelete.test z:/private/10285A82/sidedelete.test +../TEST/TclScript/soak.test z:/private/10285A82/soak.test +../TEST/TclScript/softheap1.test z:/private/10285A82/softheap1.test +../TEST/TclScript/sort.test z:/private/10285A82/sort.test +../TEST/TclScript/speed1.test z:/private/10285A82/speed1.test +../TEST/TclScript/speed1p.test z:/private/10285A82/speed1p.test +../TEST/TclScript/speed2.test z:/private/10285A82/speed2.test +../TEST/TclScript/speed3.test z:/private/10285A82/speed3.test +../TEST/TclScript/speed4.test z:/private/10285A82/speed4.test +../TEST/TclScript/speed4p.test z:/private/10285A82/speed4p.test +../TEST/TclScript/sqllimits1.test z:/private/10285A82/sqllimits1.test +../TEST/TclScript/subquery.test z:/private/10285A82/subquery.test +../TEST/TclScript/subselect.test z:/private/10285A82/subselect.test +../TEST/TclScript/substr.test z:/private/10285A82/substr.test +../TEST/TclScript/sync.test z:/private/10285A82/sync.test +../TEST/TclScript/table.test z:/private/10285A82/table.test +../TEST/TclScript/tableapi.test z:/private/10285A82/tableapi.test +../TEST/TclScript/tclsqlite.test z:/private/10285A82/tclsqlite.test +../TEST/TclScript/tempdb.test z:/private/10285A82/tempdb.test +../TEST/TclScript/temptable.test z:/private/10285A82/temptable.test +../TEST/TclScript/thread001.test z:/private/10285A82/thread001.test +../TEST/TclScript/thread002.test z:/private/10285A82/thread002.test +../TEST/TclScript/thread003.test z:/private/10285A82/thread003.test +../TEST/TclScript/thread1.test z:/private/10285A82/thread1.test +../TEST/TclScript/thread2.test z:/private/10285A82/thread2.test +../TEST/TclScript/tkt1435.test z:/private/10285A82/tkt1435.test +../TEST/TclScript/tkt1443.test z:/private/10285A82/tkt1443.test +../TEST/TclScript/tkt1444.test z:/private/10285A82/tkt1444.test +../TEST/TclScript/tkt1449.test z:/private/10285A82/tkt1449.test +../TEST/TclScript/tkt1473.test z:/private/10285A82/tkt1473.test +../TEST/TclScript/tkt1501.test z:/private/10285A82/tkt1501.test +../TEST/TclScript/tkt1512.test z:/private/10285A82/tkt1512.test +../TEST/TclScript/tkt1514.test z:/private/10285A82/tkt1514.test +../TEST/TclScript/tkt1536.test z:/private/10285A82/tkt1536.test +../TEST/TclScript/tkt1537.test z:/private/10285A82/tkt1537.test +../TEST/TclScript/tkt1567.test z:/private/10285A82/tkt1567.test +../TEST/TclScript/tkt1644.test z:/private/10285A82/tkt1644.test +../TEST/TclScript/tkt1667.test z:/private/10285A82/tkt1667.test +../TEST/TclScript/tkt1873.test z:/private/10285A82/tkt1873.test +../TEST/TclScript/tkt2141.test z:/private/10285A82/tkt2141.test +../TEST/TclScript/tkt2192.test z:/private/10285A82/tkt2192.test +../TEST/TclScript/tkt2213.test z:/private/10285A82/tkt2213.test +../TEST/TclScript/tkt2251.test z:/private/10285A82/tkt2251.test +../TEST/TclScript/tkt2285.test z:/private/10285A82/tkt2285.test +../TEST/TclScript/tkt2332.test z:/private/10285A82/tkt2332.test +../TEST/TclScript/tkt2339.test z:/private/10285A82/tkt2339.test +../TEST/TclScript/tkt2391.test z:/private/10285A82/tkt2391.test +../TEST/TclScript/tkt2409.test z:/private/10285A82/tkt2409.test +../TEST/TclScript/tkt2450.test z:/private/10285A82/tkt2450.test +../TEST/TclScript/tkt2640.test z:/private/10285A82/tkt2640.test +../TEST/TclScript/tkt2643.test z:/private/10285A82/tkt2643.test +../TEST/TclScript/tkt2686.test z:/private/10285A82/tkt2686.test +../TEST/TclScript/tkt2767.test z:/private/10285A82/tkt2767.test +../TEST/TclScript/tkt2817.test z:/private/10285A82/tkt2817.test +../TEST/TclScript/tkt2820.test z:/private/10285A82/tkt2820.test +../TEST/TclScript/tkt2822.test z:/private/10285A82/tkt2822.test +../TEST/TclScript/tkt2832.test z:/private/10285A82/tkt2832.test +../TEST/TclScript/tkt2854.test z:/private/10285A82/tkt2854.test +../TEST/TclScript/tkt2920.test z:/private/10285A82/tkt2920.test +../TEST/TclScript/tkt2927.test z:/private/10285A82/tkt2927.test +../TEST/TclScript/tkt2942.test z:/private/10285A82/tkt2942.test +../TEST/TclScript/tkt3080.test z:/private/10285A82/tkt3080.test +../TEST/TclScript/tkt3093.test z:/private/10285A82/tkt3093.test +../TEST/TclScript/tkt3121.test z:/private/10285A82/tkt3121.test +../TEST/TclScript/tkt3201.test z:/private/10285A82/tkt3201.test +../TEST/TclScript/tkt3292.test z:/private/10285A82/tkt3292.test +../TEST/TclScript/tkt3298.test z:/private/10285A82/tkt3298.test +../TEST/TclScript/tkt3334.test z:/private/10285A82/tkt3334.test +../TEST/TclScript/tokenize.test z:/private/10285A82/tokenize.test +../TEST/TclScript/trace.test z:/private/10285A82/trace.test +../TEST/TclScript/trans.test z:/private/10285A82/trans.test +../TEST/TclScript/trans2.test z:/private/10285A82/trans2.test +../TEST/TclScript/trigger1.test z:/private/10285A82/trigger1.test +../TEST/TclScript/trigger2.test z:/private/10285A82/trigger2.test +../TEST/TclScript/trigger3.test z:/private/10285A82/trigger3.test +../TEST/TclScript/trigger4.test z:/private/10285A82/trigger4.test +../TEST/TclScript/trigger5.test z:/private/10285A82/trigger5.test +../TEST/TclScript/trigger6.test z:/private/10285A82/trigger6.test +../TEST/TclScript/trigger7.test z:/private/10285A82/trigger7.test +../TEST/TclScript/trigger8.test z:/private/10285A82/trigger8.test +../TEST/TclScript/trigger9.test z:/private/10285A82/trigger9.test +../TEST/TclScript/triggerA.test z:/private/10285A82/triggerA.test +../TEST/TclScript/triggerB.test z:/private/10285A82/triggerB.test +../TEST/TclScript/types.test z:/private/10285A82/types.test +../TEST/TclScript/types2.test z:/private/10285A82/types2.test +../TEST/TclScript/types3.test z:/private/10285A82/types3.test +../TEST/TclScript/unique.test z:/private/10285A82/unique.test +../TEST/TclScript/update.test z:/private/10285A82/update.test +../TEST/TclScript/utf16align.test z:/private/10285A82/utf16align.test +../TEST/TclScript/vacuum.test z:/private/10285A82/vacuum.test +../TEST/TclScript/vacuum2.test z:/private/10285A82/vacuum2.test +../TEST/TclScript/vacuum3.test z:/private/10285A82/vacuum3.test +../TEST/TclScript/varint.test z:/private/10285A82/varint.test +../TEST/TclScript/veryquick.test z:/private/10285A82/veryquick.test +../TEST/TclScript/view.test z:/private/10285A82/view.test +../TEST/TclScript/vtab1.test z:/private/10285A82/vtab1.test +../TEST/TclScript/vtab2.test z:/private/10285A82/vtab2.test +../TEST/TclScript/vtab3.test z:/private/10285A82/vtab3.test +../TEST/TclScript/vtab4.test z:/private/10285A82/vtab4.test +../TEST/TclScript/vtab5.test z:/private/10285A82/vtab5.test +../TEST/TclScript/vtab6.test z:/private/10285A82/vtab6.test +../TEST/TclScript/vtab7.test z:/private/10285A82/vtab7.test +../TEST/TclScript/vtab8.test z:/private/10285A82/vtab8.test +../TEST/TclScript/vtab9.test z:/private/10285A82/vtab9.test +../TEST/TclScript/vtabA.test z:/private/10285A82/vtabA.test +../TEST/TclScript/vtabB.test z:/private/10285A82/vtabB.test +../TEST/TclScript/vtabC.test z:/private/10285A82/vtabC.test +../TEST/TclScript/vtab_alter.test z:/private/10285A82/vtab_alter.test +../TEST/TclScript/vtab_err.test z:/private/10285A82/vtab_err.test +../TEST/TclScript/vtab_shared.test z:/private/10285A82/vtab_shared.test +../TEST/TclScript/where.test z:/private/10285A82/where.test +../TEST/TclScript/where2.test z:/private/10285A82/where2.test +../TEST/TclScript/where3.test z:/private/10285A82/where3.test +../TEST/TclScript/where4.test z:/private/10285A82/where4.test +../TEST/TclScript/where5.test z:/private/10285A82/where5.test +../TEST/TclScript/where6.test z:/private/10285A82/where6.test +../TEST/TclScript/zeroblob.test z:/private/10285A82/zeroblob.test PRJ_TESTMMPFILES @@ -52,8 +457,3 @@ ../GROUP/t_sqliteperf2.mmp ../GROUP/t_sqlitedef.mmp ../GROUP/t_sqlitedb64.mmp manual - - -PRJ_TESTEXTENSIONS -start extension syslibs/test/sqlite3_copysqlite3testfiles -end diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/sqlite3api/GROUP/sqlite3tests.iby --- a/persistentstorage/sqlite3api/GROUP/sqlite3tests.iby Fri May 14 17:36:33 2010 +0300 +++ b/persistentstorage/sqlite3api/GROUP/sqlite3tests.iby Fri May 14 13:32:10 2010 +0100 @@ -20,6 +20,8 @@ REM SQLITE3 +#include + #ifndef __STDIOSERVER_EXE__ #define __STDIOSERVER_EXE__ file=ABI_DIR\BUILD_DIR\StdioServer.exe sys\bin\StdioServer.exe @@ -27,10 +29,10 @@ #ifndef __TCLSQLITE3_CONFIG_INI__ #define __TCLSQLITE3_CONFIG_INI__ -data=ZSYSTEM\test\config.ini system\data\config.ini +data=DATAZ_\test\config.ini system\data\config.ini #endif -data=ZSYSTEM\test\sqlite3Tests.bat \TEST\sqlite3Tests.bat +data=DATAZ_\test\sqlite3Tests.bat \TEST\sqlite3Tests.bat data=ZPRIVATE\10285A82\speed1p.explain \PRIVATE\10285A82\speed1p.explain data=ZPRIVATE\10285A82\speed4p.explain \PRIVATE\10285A82\speed4p.explain diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/store/INC/S32FILE.INL --- a/persistentstorage/store/INC/S32FILE.INL Fri May 14 17:36:33 2010 +0300 +++ b/persistentstorage/store/INC/S32FILE.INL Fri May 14 13:32:10 2010 +0100 @@ -290,7 +290,11 @@ @param aFs Handle to a file server session. @param aName The full path name of the file containing the store. @param aFileMode The mode in which the file is to be accessed. The mode is -defined by the TFileMode type. +defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO +bit. It is because that When the file cache in file server is on, the +order of file writing is not guaranteed which could cause data inconsistency in some +circumstances, for example, when the power is lost in the middle of data transaction. +Therefore, the file write cache should be switched off to maintain the file integrity. @return A pointer to the new permanent file store object. @see TFileMode */ {return STATIC_CAST(CPermanentFileStore*,CFileStore::OpenL(aFs,aName,aFileMode,KPermanentFileStoreFactoryFunction));} @@ -301,7 +305,11 @@ @param aFs Handle to a file server session. @param aName The full path name of the file containing the store. @param aFileMode The mode in which the file is to be accessed. The mode is -defined by the TFileMode type. +defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO +bit. It is because that When the file cache in file server is on, the +order of file writing is not guaranteed which could cause data inconsistency in some +circumstances, for example, when the power is lost in the middle of data transaction. +Therefore, the file write cache should be switched off to maintain the file integrity. @return A pointer to the new permanent file store object. @see TFileMode */ {return STATIC_CAST(CPermanentFileStore*,CFileStore::OpenLC(aFs,aName,aFileMode,KPermanentFileStoreFactoryFunction));} @@ -313,7 +321,11 @@ @param aName The full path name of the new file. A file with this name must not already exist, otherwise the function leaves. @param aFileMode The mode in which the new file is to be accessed. This mode -is defined by the TFileMode type. +is defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO +bit. It is because that When the file cache in file server is on, the +order of file writing is not guaranteed which could cause data inconsistency in some +circumstances, for example, when the power is lost in the middle of data transaction. +Therefore, the file write cache should be switched off to maintain the file integrity. @return A pointer to the new permanent file store object. @see TFileMode */ {return STATIC_CAST(CPermanentFileStore*,CFileStore::CreateL(aFs,aName,aFileMode,&DoNewL));} @@ -325,7 +337,11 @@ @param aName The full path name of the new file. A file with this name must not already exist, otherwise the function leaves. @param aFileMode The mode in which the new file is to be accessed. This mode -is defined by the TFileMode type. +is defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO +bit. It is because that when the file cache in file server is on, the +order of file writing is not guaranteed which could cause data inconsistency in some +circumstances, for example, when the power is lost in the middle of data transaction. +Therefore, the file write cache should be switched off to maintain the file integrity. @return A pointer to the new permanent file store object. @see TFileMode */ {return STATIC_CAST(CPermanentFileStore*,CFileStore::CreateLC(aFs,aName,aFileMode,&DoNewL));} @@ -338,7 +354,11 @@ @param aFs Handle to a file server session. @param aName The full path name of the file to be replaced. @param aFileMode The mode in which the file is to be accessed. The mode is -defined by the TFileMode type. +defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO +bit. It is because that when the file cache in file server is on, the +order of file writing is not guaranteed which could cause data inconsistency in some +circumstances, for example, when the power is lost in the middle of data transaction. +Therefore, the file write cache should be switched off to maintain the file integrity. @return A pointer to the new permanent file store object. @see TFileMode */ {return STATIC_CAST(CPermanentFileStore*,CFileStore::ReplaceL(aFs,aName,aFileMode,&DoNewL));} @@ -351,7 +371,11 @@ @param aFs Handle to a file server session. @param aName The full path name of the file to be replaced. @param aFileMode The mode in which the file is to be accessed. The mode is -defined by the TFileMode type. +defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO +bit. It is because that when the file cache in file server is on, the +order of file writing is not guaranteed which could cause data inconsistency in some +circumstances, for example, when the power is lost in the middle of data transaction. +Therefore, the file write cache should be switched off to maintain the file integrity. @return A pointer to the new permanent file store object. @see TFileMode */ {return STATIC_CAST(CPermanentFileStore*,CFileStore::ReplaceLC(aFs,aName,aFileMode,&DoNewL));} @@ -387,18 +411,27 @@ @param aPath The path where the new file is to be created. @param aName On return, contains the full path name of the new file. @param aFileMode The mode in which the file is to be accessed. The mode is -defined by the TFileMode type. +defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO +bit. It is because that When the file cache in file server is on, the +order of file writing is not guaranteed which could cause data inconsistency in some +circumstances, for example, when the power is lost in the middle of data transaction. +Therefore, the file write cache should be switched off to maintain the file integrity. @return A pointer to the new permanent file store object. @see TFileMode */ {return STATIC_CAST(CPermanentFileStore*,CFileStore::TempLC(aFs,aPath,aName,aFileMode,&DoNewL));} inline CPermanentFileStore* CPermanentFileStore::FromL(RFile& aFile) -/** Constructs a permanent file store object from an already opened file. +/** Constructs a permanent file store object from an already opened file. It is strongly recommended to set EFileWriteDirectIO +bit when opening the file. It is because that when the file cache in file server is on, the +order of file writing is not guaranteed which could cause data inconsistency in some +circumstances, for example, when the power is lost in the middle of data transaction. +Therefore, the file write cache should be switched off to maintain the file integrity. The file must already be open before calling this function. Note that ownership of the file passes to the store. The referenced RFile is cleared and is no longer valid. + @param aFile A reference to the opened file. @return A pointer to the new permanent file store object. */ {return STATIC_CAST(CPermanentFileStore*,CFileStore::FromL(aFile,KPermanentFileStoreFactoryFunction));} @@ -406,7 +439,11 @@ /** Constructs a permanent file store object from an already opened file, and places the pointer onto the cleanup stack. -The file must already be open before calling this function. +The file must already be open before calling this function. It is strongly recommended to set EFileWriteDirectIO +bit when opening the file. It is because that when the file cache in file server is on, the +order of file writing is not guaranteed which could cause data inconsistency in some +circumstances, for example, when the power is lost in the middle of data transaction. +Therefore, the file write cache should be switched off to maintain the file integrity. Note that ownership of the file passes to the store. The referenced RFile is cleared and is no longer valid. @@ -418,7 +455,11 @@ /** Constructs a new permanent file store object in an already opened file. The file must already be open before calling this function. The existing content -of the file is discarded. +of the file is discarded. It is strongly recommended to set EFileWriteDirectIO +bit when opening the file. It is because that when the file cache in file server is on, the +order of file writing is not guaranteed which could cause data inconsistency in some +circumstances, for example, when the power is lost in the middle of data transaction. +Therefore, the file write cache should be switched off to maintain the file integrity. Note that ownership of the file passes to the store. The referenced RFile is cleared and is no longer valid. @@ -431,7 +472,11 @@ places the pointer onto the cleanup stack. The file must already be open before calling this function.The existing content -of the file is discarded. +of the file is discarded. It is strongly recommended to set EFileWriteDirectIO +bit when opening the file. It is because that when the file cache in file server is on, the +order of file writing is not guaranteed which could cause data inconsistency in some +circumstances, for example, when the power is lost in the middle of data transaction. +Therefore, the file write cache should be switched off to maintain the file integrity. Note that ownership of the file passes to the store. The referenced RFile is cleared and is no longer valid. diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/store/INC/S32FILEBUFSIZE.H --- a/persistentstorage/store/INC/S32FILEBUFSIZE.H Fri May 14 17:36:33 2010 +0300 +++ b/persistentstorage/store/INC/S32FILEBUFSIZE.H Fri May 14 13:32:10 2010 +0100 @@ -17,7 +17,8 @@ #define S32FILEBUFSIZE_H #ifndef DEFAULT_FILE_BUF_SIZE - #define DEFAULT_FILE_BUF_SIZE 4096 + #define DEFAULT_FILE_BUF_SIZE 16384 + #else #if DEFAULT_FILE_BUF_SIZE < 1536 #error "DEFAULT_FILE_BUF_SIZE macro value can't be less than 1536" diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/store/ROM/StoreTests.IBY --- a/persistentstorage/store/ROM/StoreTests.IBY Fri May 14 17:36:33 2010 +0300 +++ b/persistentstorage/store/ROM/StoreTests.IBY Fri May 14 13:32:10 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -23,7 +23,7 @@ #include "pbe.iby" // batch file that runs all automatic store tests -data=ZSYSTEM\test\StoreTests.bat Test\StoreTests.bat +data=DATAZ_\test\StoreTests.bat Test\StoreTests.bat file=ABI_DIR\BUILD_DIR\t_storset.exe Test\t_storset.exe file=ABI_DIR\BUILD_DIR\t_storcrypt.exe Test\t_storcrypt.exe diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/store/USTOR/UT_COLL.CPP --- a/persistentstorage/store/USTOR/UT_COLL.CPP Fri May 14 17:36:33 2010 +0300 +++ b/persistentstorage/store/USTOR/UT_COLL.CPP Fri May 14 13:32:10 2010 +0100 @@ -905,15 +905,41 @@ } void CPermanentStoreCollector::RelocateStreamL(const CPermanentStoreCollector::TEntry& aReloc, TInt aExtent) -// -// relocate a stream into [iFree, aExtent) -// +/* relocate a stream into [iFree, aExtent) + +During compaction the sequence of operations is: + +1. Copy stream S1 content from position A1 to position B1 . The copy never overlaps so the old stream content is still good at this point. +2. Optionally rewrite the file header to state that stream S1 is being relocated to B1 (more about the ‘optional below’) +3. Overwrite the TOC entry for S1 to state that the content is now at B1 +4. Carry on with stream S2 +5. … etc + + +First consider the impact of a mid-write failure in any of these steps (when write caching is disabled): +1. If step #1 only partially completes the file is good as the original content is intact and the new content was being written to otherwise free space +2. If step #2 only partially completes the header CRC fails and only the TOC reference is considered valid (so the corrupt stream relocation record is ignored). The TOC will be good because it is being overwritten with the same content. +3. If step #3 only partially completes the entry for S1 in the TOC is corrupt, BUT the relocation record for S1 in the file header is good and will override the entry in the TOC. + +In all cases the file is never broken by a crash in mid-compaction. + +Step #2 is optional – there are many cases when step #3 cannot fail ‘halfway through’ because the underlying media makes atomic block/page based updates and the write does not cross any block boundaries. In STORE we assume that blocks cannot be smaller than 512 bytes and any flash based media provides the required behavior. Thus 99% of the step #2 writes are eliminated. + +Note that sequencing MATTERS even for just one stream. If the TOC update hits the disk before the content is moved, and then the device fails we will have a broken file: S1 points to B1 which contains garbage. Equally in the case where step #2 is required (i.e. when step #3 straddles a block boundary and could fail) step 2 has to go before the step 3. Otherwise write #3 could go to disk and fail part way through before write #2 and leave the TOC corrupt with no recovery in the file header. + +Consider the case that step 2 was omitted, so the Store relies on step 3 being completed in order to know that S1 is in location B1; and that no flush is done after step 3. In step 4 the stream S2 is moved – at this point the old space for stream S1 at A1 is considered empty – and suppose it gets moved from A2 to B2 where B2 overlaps/overwrites A1. If the writes in step 3 and step 4 are re-ordered and the step 3 write does not happen – then the TOC will claim that S1 is still at A1 but this location in the file has been overwritten with data from S2. A corrupted file. + +Based on the knowledge above, it is strongly recommended to set EFileWriteDirectIO bit when opening the file so that the order is maintained when writing to the file. + +*/ { if (Coord().Accessed()) // must have exclusive access to relocate the stream __LEAVE(KErrInUse); // TInt end=RelocateL(aReloc.entry.ref,aReloc.len,aReloc.entry.handle == KHandleTocBase ? EFrameDescriptive16 : EFrameData16, aExtent); + //Step 1, 4,.... Coord().RelocateL(aReloc.entry.handle, iFree); + // Step 2 & 3, 5 & 6,... iCoordGen=Coord().Generation(); // changed by relocation iFree = end; } diff -r d6ef85bc5971 -r 7a522c0700d3 persistentstorage/store/group/BLD.INF --- a/persistentstorage/store/group/BLD.INF Fri May 14 17:36:33 2010 +0300 +++ b/persistentstorage/store/group/BLD.INF Fri May 14 13:32:10 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -72,7 +72,7 @@ PRJ_TESTEXPORTS ../ROM/StoreTests.IBY /epoc32/rom/include/storetests.iby -../ROM/StoreTests.BAT /epoc32/data/z/system/test/storetests.bat +../ROM/StoreTests.BAT z:/test/storetests.bat PRJ_TESTMMPFILES diff -r d6ef85bc5971 -r 7a522c0700d3 traceservices/commsdebugutility/TE_commsdebugutility/group/designexample.mmp --- a/traceservices/commsdebugutility/TE_commsdebugutility/group/designexample.mmp Fri May 14 17:36:33 2010 +0300 +++ b/traceservices/commsdebugutility/TE_commsdebugutility/group/designexample.mmp Fri May 14 13:32:10 2010 +0100 @@ -25,7 +25,7 @@ USERINCLUDE ../inc OS_LAYER_SYSTEMINCLUDE_SYMBIAN -#include "comms-infras/commsdebugutility.mmh" +#include "../group/commsdebugutility.mmh" SOURCEPATH ../src SOURCE designexample.cpp diff -r d6ef85bc5971 -r 7a522c0700d3 traceservices/commsdebugutility/TE_commsdebugutility/group/tlog1.mmp --- a/traceservices/commsdebugutility/TE_commsdebugutility/group/tlog1.mmp Fri May 14 17:36:33 2010 +0300 +++ b/traceservices/commsdebugutility/TE_commsdebugutility/group/tlog1.mmp Fri May 14 13:32:10 2010 +0100 @@ -22,7 +22,7 @@ CAPABILITY ALL -Tcb SMPSAFE -#include "comms-infras/commsdebugutility.mmh" +#include "../group/commsdebugutility.mmh" USERINCLUDE ../inc OS_LAYER_SYSTEMINCLUDE_SYMBIAN diff -r d6ef85bc5971 -r 7a522c0700d3 traceservices/commsdebugutility/TE_commsdebugutility/group/tlog3.mmp --- a/traceservices/commsdebugutility/TE_commsdebugutility/group/tlog3.mmp Fri May 14 17:36:33 2010 +0300 +++ b/traceservices/commsdebugutility/TE_commsdebugutility/group/tlog3.mmp Fri May 14 13:32:10 2010 +0100 @@ -21,7 +21,7 @@ CAPABILITY ALL -Tcb SMPSAFE -#include "comms-infras/commsdebugutility.mmh" +#include "../group/commsdebugutility.mmh" USERINCLUDE ../inc OS_LAYER_SYSTEMINCLUDE_SYMBIAN diff -r d6ef85bc5971 -r 7a522c0700d3 traceservices/commsdebugutility/TE_commsdebugutility/group/tlog4.mmp --- a/traceservices/commsdebugutility/TE_commsdebugutility/group/tlog4.mmp Fri May 14 17:36:33 2010 +0300 +++ b/traceservices/commsdebugutility/TE_commsdebugutility/group/tlog4.mmp Fri May 14 13:32:10 2010 +0100 @@ -23,7 +23,7 @@ #define __FLOGGER_UREL MACRO __FLOG_SUPPRESS_REL_WARNING -#include "comms-infras/commsdebugutility.mmh" +#include "../group/commsdebugutility.mmh" USERINCLUDE ../inc OS_LAYER_SYSTEMINCLUDE_SYMBIAN