Revision: 201021 RCL_3 PDK_3.0.0
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 25 May 2010 14:35:19 +0300
branchRCL_3
changeset 15 fcc16690f446
parent 14 04ec7606545c
child 16 b6ab70c1385f
Revision: 201021 Kit: 2010121
loggingservices/eventlogger/Rom/logengtest.iby
loggingservices/eventlogger/group/BLD.INF
loggingservices/eventlogger/test/contacttestmanualpost.bat
loggingservices/eventlogger/test/contacttestmanualpre.bat
loggingservices/eventlogger/test/logservcntmatch.rsc
loggingservices/eventlogger/test/src/CntModel.ini
loggingservices/eventlogger/test/src/SQLite__Contacts.cdb
loggingservices/eventlogger/test/src/t_logapi.cpp
loggingservices/eventlogger/test/src/t_loghicaphelper.cpp
loggingservices/filelogger/SCLI/FLOGCLI.CPP
persistentstorage/dbms/group/BLD.INF
persistentstorage/dbms/group/DBMSTests.iby
persistentstorage/sql/GROUP/BLD.INF
persistentstorage/sql/GROUP/sqltests.bat
persistentstorage/sql/GROUP/sqltests.iby
persistentstorage/sql/GROUP/t_sqlcompact.mmp
persistentstorage/sql/GROUP/t_sqlcorrupt.mmp
persistentstorage/sql/GROUP/t_sqlperformance.mmp
persistentstorage/sql/GROUP/t_sqlperformance2.mmp
persistentstorage/sql/GROUP/t_sqlperformance3.mmp
persistentstorage/sql/GROUP/t_sqlperformance4.mmp
persistentstorage/sql/GROUP/t_sqlperformance5.mmp
persistentstorage/sql/OsLayer/FileBuf64.cpp
persistentstorage/sql/OsLayer/FileBuf64.h
persistentstorage/sql/OsLayer/os_symbian.cpp
persistentstorage/sql/SQLite/callback.c
persistentstorage/sql/SRC/Common/SqlBufIterator.cpp
persistentstorage/sql/SRC/Security/SqlSecurity.cpp
persistentstorage/sql/SRC/Security/SqlSecurityImpl.cpp
persistentstorage/sql/SRC/Security/SqlSecurityImpl.h
persistentstorage/sql/SRC/Server/SqlSrvConfig.h
persistentstorage/sql/SRC/Server/SqlSrvDatabase.cpp
persistentstorage/sql/SRC/Server/SqlSrvDbSysSettings.cpp
persistentstorage/sql/SRC/Server/SqlSrvDbSysSettings.h
persistentstorage/sql/SRC/Server/SqlSrvResourceProfiler.cpp
persistentstorage/sql/SRC/Server/SqlSrvStatement.cpp
persistentstorage/sql/SRC/Server/SqlSrvStatementUtil.cpp
persistentstorage/sql/SRC/Server/SqlSrvStrings.h
persistentstorage/sql/TEST/t_sqlapi.cpp
persistentstorage/sql/TEST/t_sqlapi2.cpp
persistentstorage/sql/TEST/t_sqlcmdlineutil.cpp
persistentstorage/sql/TEST/t_sqlcmdlineutil.h
persistentstorage/sql/TEST/t_sqlcompact1.cpp
persistentstorage/sql/TEST/t_sqlcorrupt.cpp
persistentstorage/sql/TEST/t_sqlenvcreate.cpp
persistentstorage/sql/TEST/t_sqlenvdestroy.cpp
persistentstorage/sql/TEST/t_sqlfilebuf64.cpp
persistentstorage/sql/TEST/t_sqlload.cpp
persistentstorage/sql/TEST/t_sqloom.h
persistentstorage/sql/TEST/t_sqloom2.cpp
persistentstorage/sql/TEST/t_sqlperformance.cpp
persistentstorage/sql/TEST/t_sqlperformance2.cpp
persistentstorage/sql/TEST/t_sqlperformance3.cpp
persistentstorage/sql/TEST/t_sqlperformance4.cpp
persistentstorage/sql/TEST/t_sqlperformance5.cpp
persistentstorage/sql/TEST/t_sqlscalarfullselect.cpp
persistentstorage/sql/TEST/t_sqlsecurity6.cpp
persistentstorage/sql/TEST/testexecute/SQLite/config/Configuration.ini
persistentstorage/sql/TEST/testexecute/SQLite/src/cdtest.cpp
persistentstorage/sqlite3api/GROUP/BLD.INF
persistentstorage/sqlite3api/GROUP/sqlite3tests.iby
persistentstorage/store/ROM/StoreTests.IBY
persistentstorage/store/group/BLD.INF
--- a/loggingservices/eventlogger/Rom/logengtest.iby	Tue May 11 17:49:39 2010 +0300
+++ b/loggingservices/eventlogger/Rom/logengtest.iby	Tue May 25 14:35:19 2010 +0300
@@ -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
--- a/loggingservices/eventlogger/group/BLD.INF	Tue May 11 17:49:39 2010 +0300
+++ b/loggingservices/eventlogger/group/BLD.INF	Tue May 25 14:35:19 2010 +0300
@@ -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
@@ -96,13 +101,9 @@
 ../test/t_logsecureview_hicap.mmp
 ../test/T_LogSecurity.mmp
 ../test/t_logservIPC.mmp
-../test/t_logapi_helper.mmp			support
+../test/t_logapi_helper.mmp		support
 ../test/t_logcompat.mmp
 ../test/t_logsimid.mmp
 ../test/t_logcntmatchplugin.mmp		support
 
-PRJ_TESTEXTENSIONS
-start extension syslibs/test/logeng_copytestfiles
-end
-
 #include "../test/tef/group/bld.inf"
--- a/loggingservices/eventlogger/test/contacttestmanualpost.bat	Tue May 11 17:49:39 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
--- a/loggingservices/eventlogger/test/contacttestmanualpre.bat	Tue May 11 17:49:39 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.
Binary file loggingservices/eventlogger/test/logservcntmatch.rsc has changed
Binary file loggingservices/eventlogger/test/src/CntModel.ini has changed
Binary file loggingservices/eventlogger/test/src/SQLite__Contacts.cdb has changed
--- a/loggingservices/eventlogger/test/src/t_logapi.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/loggingservices/eventlogger/test/src/t_logapi.cpp	Tue May 25 14:35:19 2010 +0300
@@ -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();	 
--- a/loggingservices/eventlogger/test/src/t_loghicaphelper.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/loggingservices/eventlogger/test/src/t_loghicaphelper.cpp	Tue May 25 14:35:19 2010 +0300
@@ -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)
--- a/loggingservices/filelogger/SCLI/FLOGCLI.CPP	Tue May 11 17:49:39 2010 +0300
+++ b/loggingservices/filelogger/SCLI/FLOGCLI.CPP	Tue May 25 14:35:19 2010 +0300
@@ -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<TLogFile> logFilePckg(iLogFile);
-			iLastError=SendReceive(EWriteLog,TIpcArgs (&logFilePckg, &aBuf));
-			}
+		} 
+	else 		
+		{
+		TPckg<TLogFile> 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<const TDesC16> aFmt, VA_LIST& aList)
--- a/persistentstorage/dbms/group/BLD.INF	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/dbms/group/BLD.INF	Tue May 25 14:35:19 2010 +0300
@@ -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
--- a/persistentstorage/dbms/group/DBMSTests.iby	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/dbms/group/DBMSTests.iby	Tue May 25 14:35:19 2010 +0300
@@ -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 <dbms.iby>
 
-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
--- a/persistentstorage/sql/GROUP/BLD.INF	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/GROUP/BLD.INF	Tue May 25 14:35:19 2010 +0300
@@ -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
 
@@ -85,6 +111,7 @@
 t_sqlperformance2.mmp
 t_sqlperformance3.mmp
 t_sqlperformance4.mmp
+t_sqlperformance5.mmp
 t_sqlood.mmp
 t_sqloslayer.mmp
 t_sqldefect.mmp
@@ -110,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"
 
--- a/persistentstorage/sql/GROUP/sqltests.bat	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/GROUP/sqltests.bat	Tue May 25 14:35:19 2010 +0300
@@ -42,6 +42,7 @@
 T_SQLPERFORMANCE2.EXE
 T_SQLPERFORMANCE3.EXE
 T_SQLPERFORMANCE4.EXE
+T_SQLPERFORMANCE5.EXE
 T_SQLOOD.EXE
 T_SQLOSLAYER.EXE
 T_SQLDEFECT.EXE
@@ -62,4 +63,5 @@
 T_SQLFILEBUF64.EXE
 T_SQLAUTHORIZER.EXE
 T_SQLSTARTUP.EXE
+T_SQLCORRUPT.EXE
 T_SQLENVDESTROY.EXE
--- a/persistentstorage/sql/GROUP/sqltests.iby	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/GROUP/sqltests.iby	Tue May 25 14:35:19 2010 +0300
@@ -22,8 +22,6 @@
 #include <testlocale.iby>
 #include <charconv.iby>
 #include <sql.iby>
-#include <ezlib.iby>
-
 
 //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 <uloggerclttool.iby>
 //#include <ulogger.iby>
 
-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
@@ -87,6 +85,7 @@
 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
@@ -110,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
--- a/persistentstorage/sql/GROUP/t_sqlcompact.mmp	Tue May 11 17:49:39 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/sql/GROUP/t_sqlcorrupt.mmp	Tue May 25 14:35:19 2010 +0300
@@ -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:
+//
+#include <e32utrace.mmh>
+
+TARGET			t_sqlcorrupt.exe
+TARGETTYPE		EXE
+CAPABILITY		ProtServ AllFiles
+
+USERINCLUDE 	.
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+SOURCEPATH		../TEST
+SOURCE			t_sqlcorrupt.cpp
+
+LIBRARY			euser.lib 
+LIBRARY			efsrv.lib
+LIBRARY			sqldb.lib 
+LIBRARY			bafl.lib 
+LIBRARY 		estor.lib 
+
+UID				0 0x08770000
+VENDORID		0x70000001
+
+SMPSAFE
\ No newline at end of file
--- a/persistentstorage/sql/GROUP/t_sqlperformance.mmp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/GROUP/t_sqlperformance.mmp	Tue May 25 14:35:19 2010 +0300
@@ -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"
@@ -40,7 +40,7 @@
 #endif
 
 SOURCEPATH		../TEST
-SOURCE			t_sqlperformance.cpp
+SOURCE			t_sqlperformance.cpp t_sqlcmdlineutil.cpp
 
 SOURCEPATH		../SRC/Common
 SOURCE			SqlUtil.cpp
--- a/persistentstorage/sql/GROUP/t_sqlperformance2.mmp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/GROUP/t_sqlperformance2.mmp	Tue May 25 14:35:19 2010 +0300
@@ -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"
@@ -22,7 +22,7 @@
 EPOCHEAPSIZE	0x00200000 0x02000000	//2Mb initial heap size
 
 SOURCEPATH		../TEST
-SOURCE			t_sqlperformance2.cpp
+SOURCE			t_sqlperformance2.cpp  t_sqlcmdlineutil.cpp
 
 LIBRARY			euser.lib 
 LIBRARY			efsrv.lib
--- a/persistentstorage/sql/GROUP/t_sqlperformance3.mmp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/GROUP/t_sqlperformance3.mmp	Tue May 25 14:35:19 2010 +0300
@@ -1,4 +1,4 @@
-// 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"
@@ -21,7 +21,7 @@
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 
 SOURCEPATH		../TEST
-SOURCE			t_sqlperformance3.cpp
+SOURCE			t_sqlperformance3.cpp t_sqlcmdlineutil.cpp
 
 LIBRARY			euser.lib 
 LIBRARY			efsrv.lib
--- a/persistentstorage/sql/GROUP/t_sqlperformance4.mmp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/GROUP/t_sqlperformance4.mmp	Tue May 25 14:35:19 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-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 @@
 EPOCHEAPSIZE	0x00200000 0x02000000	//2Mb initial heap size
 
 SOURCEPATH		../TEST
-SOURCE			t_sqlperformance4.cpp
+SOURCE			t_sqlperformance4.cpp t_sqlcmdlineutil.cpp
 
 LIBRARY			euser.lib 
 LIBRARY			efsrv.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/sql/GROUP/t_sqlperformance5.mmp	Tue May 25 14:35:19 2010 +0300
@@ -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
--- a/persistentstorage/sql/OsLayer/FileBuf64.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/OsLayer/FileBuf64.cpp	Tue May 25 14:35:19 2010 +0300
@@ -28,7 +28,7 @@
 		if(TheOsCallTimeDetailedProfileEnabled) \
 			{ \
 			++iFileReadCount; iFileReadAmount += (amount); \
-			RDebug::Print(_L("[SQL-FBUF]¬RD¬%X¬%d¬%ld¬%d¬%ld¬%d\r\n"), (TUint32)this, iFileReadCount, pos, amount, iFileReadAmount, err); \
+			RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬Read¬%d¬%ld¬%d¬%ld¬%d\r\n"), (TUint32)this, iFileReadCount, pos, amount, iFileReadAmount, err); \
 			} \
 		} while(0)
 	
@@ -38,7 +38,7 @@
 		if(TheOsCallTimeDetailedProfileEnabled) \
 			{ \
 			++iFileWriteCount; iFileWriteAmount += (amount); \
-			RDebug::Print(_L("[SQL-FBUF]¬WR¬%X¬%d¬%ld¬%d¬%ld¬%d\r\n"), (TUint32)this, iFileWriteCount, pos, amount, iFileWriteAmount, err); \
+			RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬Write¬%d¬%ld¬%d¬%ld¬%d\r\n"), (TUint32)this, iFileWriteCount, pos, amount, iFileWriteAmount, err); \
 			} \
 		} while(0)
 
@@ -48,7 +48,7 @@
 		if(TheOsCallTimeDetailedProfileEnabled) \
 			{ \
 			++iFileSizeCount; \
-			RDebug::Print(_L("[SQL-FBUF]¬SZ¬%X¬%d¬%ld¬%d¬%ld¬%d\r\n"), (TUint32)this, iFileSizeCount, size, 0, 0LL, err); \
+			RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬Size¬%d¬%ld¬¬¬%d\r\n"), (TUint32)this, iFileSizeCount, size, err); \
 			} \
 		} while(0)
 
@@ -58,7 +58,7 @@
 		if(TheOsCallTimeDetailedProfileEnabled) \
 			{ \
 			++iFileSetSizeCount; \
-			RDebug::Print(_L("[SQL-FBUF]¬SS¬%X¬%d¬%ld¬%d¬%ld¬%d\r\n"), (TUint32)this, iFileSetSizeCount, size, 0, 0LL, err); \
+			RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬SetSize¬%d¬%ld¬¬¬%d\r\n"), (TUint32)this, iFileSetSizeCount, size, err); \
 			} \
 		} while(0)
 
@@ -68,7 +68,7 @@
 		if(TheOsCallTimeDetailedProfileEnabled) \
 			{ \
 			++iFileFlushCount; \
-			RDebug::Print(_L("[SQL-FBUF]¬SY¬%X¬%d¬%ld¬%d¬%ld¬%d\r\n"), (TUint32)this, iFileFlushCount, 0LL, 0, 0LL, err); \
+			RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬Flush¬%d¬¬¬¬%d\r\n"), (TUint32)this, iFileFlushCount, err); \
 			} \
 		} while(0)
 
@@ -77,7 +77,7 @@
 		{ \
 		if(TheOsCallTimeDetailedProfileEnabled) \
 			{ \
-			RDebug::Print(_L("[SQL-FBUF]¬CR¬%X¬%S¬%d\r\n"), (TUint32)this, &fname, err); \
+			RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬Create¬¬¬¬¬%d¬%S\r\n"), (TUint32)this, err, &fname); \
 			} \
 		} while(0)
 
@@ -86,7 +86,7 @@
 		{ \
 		if(TheOsCallTimeDetailedProfileEnabled) \
 			{ \
-			RDebug::Print(_L("[SQL-FBUF]¬OP¬%X¬%S¬%d\r\n"), (TUint32)this, &fname, err); \
+			RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬Open¬¬¬¬¬%d¬%S\r\n"), (TUint32)this, err, &fname); \
 			} \
 		} while(0)
 
@@ -95,7 +95,7 @@
 		{ \
 		if(TheOsCallTimeDetailedProfileEnabled) \
 			{ \
-			RDebug::Print(_L("[SQL-FBUF]¬TP¬%X¬%S¬%d\r\n"), (TUint32)this, &fname, err); \
+			RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬Temp¬¬¬¬¬%d¬%S\r\n"), (TUint32)this, err, &fname); \
 			} \
 		} while(0)
 
@@ -104,7 +104,7 @@
 		{ \
 		if(TheOsCallTimeDetailedProfileEnabled) \
 			{ \
-			RDebug::Print(_L("[SQL-FBUF]¬AT¬%X¬%S¬%d\r\n"), (TUint32)this, &fname, err); \
+			RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬Adopt¬¬¬¬¬%d¬%S\r\n"), (TUint32)this, err, &fname); \
 			} \
 		} while(0)
 
@@ -113,7 +113,7 @@
 		{ \
 		if(TheOsCallTimeDetailedProfileEnabled) \
 			{ \
-			RDebug::Print(_L("[SQL-FBUF]¬CL¬%X\r\n"), (TUint32)this); \
+			RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬Close¬¬¬¬¬¬\r\n"), (TUint32)this); \
 			} \
 		} while(0)
 
@@ -195,6 +195,7 @@
 	EFBufPanicNextReadFilePos,
 	EFBufPanicNextReadFilePosHits,
 	EFBufPanicFileBlockSize,			//15
+	EFBufPanicRwDataLength,
 	};
 
 /**
@@ -249,15 +250,16 @@
 /**
 Initializes RFileBuf64 data members with their default values.
 
-@param aSize Max file buffer size (capacity) in bytes.
+@param aMinCapacity Minimal file buffer size (capacity) in bytes.
 
-@panic FBuf64 1 In _DEBUG mode - aSize is 0 or negative.
+@panic FBuf64 1 In _DEBUG mode - aMinCapacity is 0 or negative.
 */
-RFileBuf64::RFileBuf64(TInt aSize) :
-	iCapacity(aSize),
-	iReadAheadSize(RFileBuf64::KDefaultReadAheadSize)
+RFileBuf64::RFileBuf64(TInt aMinCapacity) :
+	iCapacity(aMinCapacity),
+	iReadAheadSize(RFileBuf64::KDefaultReadAheadSize),
+	iOptimized(EFalse)
 	{
-	__FBUF64_ASSERT(aSize > 0, EFBufPanicCapacity);
+	__FBUF64_ASSERT(aMinCapacity > 0, EFBufPanicCapacity);
 	}
 
 /**
@@ -473,21 +475,26 @@
 	__FBUF64_ASSERT(aFilePos >= 0, EFBufPanicFilePos);
 	__FILEBUF64_INVARIANT();
 	aDes.SetLength(0);
-	//1. The output buffer max len is 0
+	//0. The output buffer max len is 0
 	if(aDes.MaxLength() == 0)
 		{
 		__FILEBUF64_INVARIANT();
 		return KErrNone;	
 		}
-	//2. Initialize the "iFileSize" if it is not initialized yet
+	//1. Initialize the "iFileSize" if it is not initialized yet
 	TInt err = DoFileSize();
 	if(err != KErrNone)
 		{
 		__FILEBUF64_INVARIANT();
 		return err;	
 		}
+	//2. Optimize the buffer capacity
+	TInt len = aDes.MaxLength();
+	if((err = DoSetCapacity(len)) != KErrNone)
+		{
+		return err;
+		}
 	//3. Too big "read" request - read directly from the file
-	TInt len = aDes.MaxLength();
 	if(len > iCapacity)
 		{
 		if((aFilePos + len) > iFilePos && aFilePos < (iFilePos + iLength))
@@ -537,7 +544,7 @@
 				break;
 				}
 			//The guessed from the previous "file read" operation file pos is correct. Start reading-ahead.
-			const TInt KMaxReadFilePosHits = 8;//The max read-ahead buffer size can be up to 2^8 times the iReadAheadSize
+			const TInt KMaxReadFilePosHits = 4;//The max read-ahead buffer size can be up to 2^4 times the iReadAheadSize
 			if(iNextReadFilePosHits < KMaxReadFilePosHits)
 				{
 				++iNextReadFilePosHits;
@@ -608,6 +615,10 @@
 		__FILEBUF64_INVARIANT();
 		return err;	
 		}
+	if((err = DoSetCapacity(aData.Length())) != KErrNone)
+		{
+		return err;
+		}
 	DoDiscardBufferedReadData();
 	const TUint8* data = aData.Ptr();
 	for(TInt len = aData.Length(); len > 0 && err == KErrNone;)
@@ -1078,6 +1089,64 @@
 	__FILEBUF64_INVARIANT();
 	}
 
+/**
+Sets the most appropriate buffer capacity based on the database page size.
+The function does a lazy evaluation. The first time the function is called and 
+aRwDataLength parameter is recognized to be a database or journal page size, the new (optimal)
+buffer capacity is calculated and set. All next DoSetCapacity() calls will detect that the new
+capacity is already set and will return KErrNone.
+
+@param  aRwDataLength The length of the data being read or written.
+@return KErrNone The new capacity was set successfully,
+        KErrNoMemory Out of memory.
+*/
+TInt RFileBuf64::DoSetCapacity(TInt aRwDataLength)
+	{
+	const TInt KMinPageCount = 4;//the buffer capacity should be at least (KMinPageCount * page size) 
+	                             //but not less than the original capacity.
+	const TInt KDefaultPageSize = 1024;//The journal header size is equal to 512 bytes, so it is not easy
+                                       //to detect the 512 bytes page size. 
+	
+	__FBUF64_ASSERT(aRwDataLength >= 0, EFBufPanicRwDataLength);
+	__FILEBUF64_INVARIANT();
+	if(iOptimized || aRwDataLength == 0)
+		{
+		__FILEBUF64_INVARIANT();
+		return KErrNone;
+		}
+	if((aRwDataLength & (aRwDataLength - 1)) != 0 || aRwDataLength < KDefaultPageSize)
+		{
+		__FILEBUF64_INVARIANT();
+		return KErrNone;
+		}
+	//Here: aRwDataLength is power of 2 and is bigger than the default db page size.
+	//aRwDataLength is the size of the db page.
+	const TInt pageSize = aRwDataLength;
+	TInt cnt = iCapacity / pageSize;//how many pages can fit in the buffer now
+	TInt pageCount = Max(cnt, KMinPageCount);//the number of pages that should fit in the new buffer
+	TInt newBufCapacity = pageCount * pageSize;
+	if(newBufCapacity != iCapacity)
+		{
+		TUint8* newBase = static_cast <TUint8*> (User::ReAlloc(iBase, newBufCapacity));
+		if(!newBase)
+			{
+			__FILEBUF64_INVARIANT();
+			return KErrNoMemory;
+			}
+		iBase = newBase;
+		iCapacity = newBufCapacity;
+		//Adjust the initial read-ahead size to be multiple of the page size.
+		if((iReadAheadSize % pageSize) != 0)
+			{
+			TInt q = iReadAheadSize / pageSize;
+			iReadAheadSize = q != 0 ? pageSize * q : pageSize;
+			}
+		}
+	iOptimized = ETrue;
+	__FILEBUF64_INVARIANT();
+	return KErrNone;
+	}
+
 #ifdef _DEBUG
 
 /**
@@ -1093,7 +1162,7 @@
 @panic FBuf64   6 In _DEBUG mode - null file handle (the RFile64 object is not created or already destroyed).
 @panic FBuf64  13 In _DEBUG mode - set but negative iNextReadFilePos value.
 @panic FBuf64  14 In _DEBUG mode - negative iNextReadFilePosHits value.
-@panic FBuf64  15 In _DEBUG mode - iReadAheadSize is negative or is not power of two.
+@panic FBuf64  15 In _DEBUG mode - iReadAheadSize is negative or is bigger than iCapacity.
 */
 void RFileBuf64::Invariant() const
 	{
@@ -1106,7 +1175,7 @@
 	__FBUF64_ASSERT(iFile.SubSessionHandle() != 0, EFBufPanicFileHandle);
 	__FBUF64_ASSERT(iNextReadFilePos == KNextReadFilePosNotSet || iNextReadFilePos >= 0, EFBufPanicNextReadFilePos);
 	__FBUF64_ASSERT(iNextReadFilePosHits >= 0, EFBufPanicNextReadFilePosHits);
-	__FBUF64_ASSERT(iReadAheadSize > 0 && (iReadAheadSize & (iReadAheadSize - 1)) == 0, EFBufPanicFileBlockSize);
+	__FBUF64_ASSERT(iReadAheadSize > 0, EFBufPanicFileBlockSize);
 	}
 	
 #endif
--- a/persistentstorage/sql/OsLayer/FileBuf64.h	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/OsLayer/FileBuf64.h	Tue May 25 14:35:19 2010 +0300
@@ -36,7 +36,7 @@
 	- an object of RFileBuf64 type must be defined first, specifying the max size (capacity) of the buffer as a parameter
 	  of the constructor:
 	  
-	  	RFileBuf64 fbuf(<N>);//<N> is the buffer capacity in bytes
+	  	RFileBuf64 fbuf(<N>);//<N> is the minimal buffer capacity in bytes
 	  	
 	- the second step is to initialize the just defined RFileBuf64 object by calling one of the "resource acquisition"
 	  methods: RFileBuf64::Create(), RFileBuf64::Open(), RFileBuf64::Temp() or RFileBuf64::AdoptFromClient().
@@ -141,7 +141,7 @@
 	enum {KDefaultReadAheadSize = 1024};//Default size in bytes of the read-ahead buffer
 	
 public:
-	RFileBuf64(TInt aSize);
+	RFileBuf64(TInt aMinCapacity);
 
 	TInt Create(RFs& aFs, const TDesC& aFileName, TUint aFileMode);
 	TInt Open(RFs& aFs, const TDesC& aFileName, TUint aFileMode);
@@ -171,10 +171,11 @@
 	TInt DoFileWrite1(TInt64 aNewFilePos);
 	TInt DoFileWrite2(TInt64 aNewFilePos = 0LL);
 	void DoDiscardBufferedReadData();
+	TInt DoSetCapacity(TInt aRwDataLength);
 	
 private:
 	//Buffer related
-	const TInt	iCapacity;				//The buffer size. Indicates how much data can be put in.
+	TInt		iCapacity;				//The buffer size. Indicates how much data can be put in.
 	TUint8*		iBase;					//Pointer to the beginning of the buffer.
 	TInt		iLength;				//The length of the data currently held in the buffer.
 	//File related
@@ -186,6 +187,8 @@
 	TInt64		iNextReadFilePos;		//The guessed file position of the next "file read" operation
 	TInt		iNextReadFilePosHits;	//How many times the guessed file position of the "file read" operation was correct
 	TInt		iReadAheadSize;
+	//
+	TBool		iOptimized;				//True if the file buffer capacity has been optimized already
 
 	//Profiler related
 #ifdef _SQLPROFILER
--- a/persistentstorage/sql/OsLayer/os_symbian.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/OsLayer/os_symbian.cpp	Tue May 25 14:35:19 2010 +0300
@@ -332,14 +332,13 @@
 	// - iBytesTotal  - the total amount of bytes passed to the monitored OS porting layer function (if it is read or write);
 	struct TOsCallProfile
 		{
-		TOsCallProfile(char aType, char aIdentifier[]) :
+		TOsCallProfile(char aType, const TDesC& aIdentifier) :
 			iType(aType),
+			iIdentifier(aIdentifier),
 			iCallCounter(0),
 			iTicksTotal(0),
 			iBytesTotal(0)
 			{
-			iIdentifier[0] = aIdentifier[0];
-			iIdentifier[1] = aIdentifier[1];
 			}
 		void Zero()
 			{
@@ -348,7 +347,7 @@
 			iBytesTotal = 0;
 			}
 		char	iType;
-		char	iIdentifier[2];
+		TBuf<32> iIdentifier;
 		TInt	iCallCounter;
 		TInt64	iTicksTotal;
 		TInt64	iBytesTotal;
@@ -358,22 +357,22 @@
 	//the function was used on the main database file
 	TOsCallProfile TheOsCallMProfile[EOsOpLast] = 
 		{
-		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', "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")
+		TOsCallProfile('M', _L("Close")), TOsCallProfile('M', _L("Read")), TOsCallProfile('M', _L("Write")), TOsCallProfile('M', _L("Truncate")),
+		TOsCallProfile('M', _L("Sync")), TOsCallProfile('M', _L("Size")), TOsCallProfile('M', _L("Lock")), TOsCallProfile('M', _L("Unlock")),
+		TOsCallProfile('M', _L("CheckReservedLock")), TOsCallProfile('M', _L("FileControl")), TOsCallProfile('M', _L("SetSize")), TOsCallProfile('M', _L("DeviceCharacteristics")),
+		TOsCallProfile('M', _L("Open")), TOsCallProfile('M', _L("Delete")), TOsCallProfile('M', _L("Access")), TOsCallProfile('M', _L("FullPath")),
+		TOsCallProfile('M', _L("Randomness")), TOsCallProfile('M', _L("Sleep")), TOsCallProfile('M', _L("CurrentTime")), TOsCallProfile('M', _L("GetLastError"))
 		};
 
 	//An array of TOsCallProfile entries, each entry keeps the profile of a specifc OS porting layer function, when
 	//the function was used on the journal file
 	TOsCallProfile TheOsCallJProfile[EOsOpLast] = 
 		{
-		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', "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")
+		TOsCallProfile('J', _L("Close")), TOsCallProfile('J', _L("Read")), TOsCallProfile('J', _L("Write")), TOsCallProfile('J', _L("Truncate")),
+		TOsCallProfile('J', _L("Sync")), TOsCallProfile('J', _L("Size")), TOsCallProfile('J', _L("Lock")), TOsCallProfile('J', _L("Unlock")),
+		TOsCallProfile('J', _L("CheckReservedLock")), TOsCallProfile('J', _L("FileControl")), TOsCallProfile('J', _L("SetSize")), TOsCallProfile('J', _L("DeviceCharacteristics")),
+		TOsCallProfile('J', _L("Open")), TOsCallProfile('J', _L("Delete")), TOsCallProfile('J', _L("Access")), TOsCallProfile('J', _L("FullPath")),
+		TOsCallProfile('J', _L("Randomness")), TOsCallProfile('J', _L("Sleep")), TOsCallProfile('J', _L("CurrentTime")), TOsCallProfile('J', _L("GetLastError"))
 		};
 	
 	//The main class for the OS porting layer call profiles.
@@ -421,20 +420,25 @@
 						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"),
-					    iHandle,							//0
-						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
-						&fname);							//11
+					//                                           0    1  2  3  4  5   6  7   8   9   10
+					RDebug::Print(_L("[SQL-OS]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬%c¬%S¬%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, 	//2 - operation type
+						TheOpCounter, 						//3 - Operation counter
+						iOsCallProfileRef.iCallCounter, 	//4 - This call type counter
+						iOffset, 							//5 - File offset
+						iBytes, 							//6 - Data, bytes
+						diffTicks, 							//7 - Ticks
+						iOsCallProfileRef.iBytesTotal, 		//8 - Data total, bytes
+						iOsCallProfileRef.iTicksTotal,		//9 - Ticks total
+						&fname);							//10- File name
 					}
 				}
 			}
--- a/persistentstorage/sql/SQLite/callback.c	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/SQLite/callback.c	Tue May 25 14:35:19 2010 +0300
@@ -217,7 +217,7 @@
     pColl = db->pDfltColl;
   }
   assert( SQLITE_UTF8==1 && SQLITE_UTF16LE==2 && SQLITE_UTF16BE==3 );
-  assert( enc>=SQLITE_UTF8 && enc<=SQLITE_UTF16BE );
+  /*assert( enc>=SQLITE_UTF8 && enc<=SQLITE_UTF16BE );*/
   if( pColl ) pColl += enc-1;
   return pColl;
 }
--- a/persistentstorage/sql/SRC/Common/SqlBufIterator.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/SRC/Common/SqlBufIterator.cpp	Tue May 25 14:35:19 2010 +0300
@@ -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"
@@ -214,11 +214,15 @@
 /**
 @return Represents the content of a text or a binary field as a stream of bytes.
 
-@leave KErrNoMemory, out of memory condition has occured;
+@leave KErrNoMemory, out of memory condition has occured,
+	   KErrArgument, the column type is not text, blob or null;
 */	
 MStreamBuf* TSqlBufRIterator::StreamL() const
 	{
 	__SQLASSERT(iCurrent >= iBegin && iCurrent < iEnd, ESqlPanicInternalError);
-	__SQLASSERT(::IsSequenceSqlType(Type()), ESqlPanicInternalError);
+	if(!::IsSequenceSqlType(Type()))
+		{
+		__SQLLEAVE(KErrArgument);
+		}
 	return HReadOnlyBuf::NewL(reinterpret_cast <const TUint8*> (iBegin) + iCurrent->iPos, iCurrent->Size());
 	}
--- a/persistentstorage/sql/SRC/Security/SqlSecurity.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/SRC/Security/SqlSecurity.cpp	Tue May 25 14:35:19 2010 +0300
@@ -105,7 +105,8 @@
 	{
 	SQLUTRACE_PROFILER(this);
 	__SQLASSERT_ALWAYS(aPolicyType >= ESchemaPolicy && aPolicyType <= EWritePolicy, ESqlPanicBadArgument);
-	return Impl().SetDbPolicy(aPolicyType, aPolicy);
+	Impl().SetDbPolicy(aPolicyType, aPolicy);
+	return KErrNone;
 	}
 	
 /**
--- a/persistentstorage/sql/SRC/Security/SqlSecurityImpl.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/SRC/Security/SqlSecurityImpl.cpp	Tue May 25 14:35:19 2010 +0300
@@ -179,11 +179,9 @@
 				   RSqlSecurityPolicy::EReadPolicy, RSqlSecurityPolicy::EWritePolicy.
 @param aPolicy Security policy data used for setting the related database security policy.
 
-@return KErrNone
-
 @panic SqlDb 4 In _DEBUG mode. Invalid policy type.
 */
-TInt CSqlSecurityPolicy::SetDbPolicy(RSqlSecurityPolicy::TPolicyType aPolicyType, const TSecurityPolicy& aPolicy)
+void CSqlSecurityPolicy::SetDbPolicy(RSqlSecurityPolicy::TPolicyType aPolicyType, const TSecurityPolicy& aPolicy)
 	{
 	const TInt KPolicyIndex = CSqlSecurityPolicy::PolicyType2Index(aPolicyType);
 	__SQLASSERT((TUint)KPolicyIndex < EPolicyTypeCount, ESqlPanicBadArgument);
@@ -194,7 +192,6 @@
 	//KPolicyIndex value is tested at the beginning of the function
 	//coverity[overrun-local]
 	item->iPolicy[KPolicyIndex] = aPolicy;
-	return KErrNone;
 	}
 
 /**
--- a/persistentstorage/sql/SRC/Security/SqlSecurityImpl.h	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/SRC/Security/SqlSecurityImpl.h	Tue May 25 14:35:19 2010 +0300
@@ -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"
@@ -73,7 +73,7 @@
 	static CSqlSecurityPolicy* NewLC(const TSecurityPolicy& aDefaultPolicy);
 	virtual ~CSqlSecurityPolicy();
 	void SetDefaultPolicy(const TSecurityPolicy& aPolicy);
-	TInt SetDbPolicy(RSqlSecurityPolicy::TPolicyType aPolicyType, const TSecurityPolicy& aPolicy);
+	void SetDbPolicy(RSqlSecurityPolicy::TPolicyType aPolicyType, const TSecurityPolicy& aPolicy);
 	TInt SetPolicy(RSqlSecurityPolicy::TObjectType aObjectType, const TDesC& aObjectName, RSqlSecurityPolicy::TPolicyType aPolicyType, const TSecurityPolicy& aPolicy);
 	TSecurityPolicy DefaultPolicy() const;
 	TSecurityPolicy DbPolicy(RSqlSecurityPolicy::TPolicyType aPolicyType) const;
--- a/persistentstorage/sql/SRC/Server/SqlSrvConfig.h	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvConfig.h	Tue May 25 14:35:19 2010 +0300
@@ -50,7 +50,12 @@
 	enum TDbEncoding {EEncNotSet, EEncUtf8, EEncUtf16};//Database encoding: the default value for iDbEncoding is EEncNotSet
 	enum 
 		{
-		KDefaultSoftHeapLimitKb = 1024, 
+#ifdef __WINSCW__
+		KDefaultSoftHeapLimitKb = 1024,
+#else
+		KDefaultSoftHeapLimitKb = 8192,
+#endif		
+
 #ifdef SYSLIBS_TEST	
 		KMinSoftHeapLimitKb = 8, 
 #else
--- a/persistentstorage/sql/SRC/Server/SqlSrvDatabase.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvDatabase.cpp	Tue May 25 14:35:19 2010 +0300
@@ -963,12 +963,8 @@
 			err = StmtExec(stmtHandle);
 			}
 		}
-	TInt err2 = ::FinalizeStmtHandle(stmtHandle);
+	(void)::FinalizeStmtHandle(stmtHandle);//sqlite3_finalize() fails only if an invalid statement handle is passed.
 	CleanupStack::PopAndDestroy();//TCleanupItem(&EnableAuthorizer, &iAuthorizerDisabled)
-	if(err == KErrNone && err2 != KErrNone)
-		{//::FinalizeStmtHandle() has failed
-		err = err2;
-		}
 	__SQLLEAVE_IF_ERROR(err);
 	
 	TAttachCleanup attachCleanup(*this, aDbName);
@@ -1013,11 +1009,7 @@
 			err = StmtExec(stmtHandle);
 			}
 		}
-	TInt err2 = ::FinalizeStmtHandle(stmtHandle);
-	if(err == KErrNone && err2 != KErrNone)
-		{//::FinalizeStmtHandle() has failed
-		err = err2;
-		}
+	(void)::FinalizeStmtHandle(stmtHandle);//sqlite3_finalize() fails only if an invalid statement handle is passed.
 	iAuthorizerDisabled	= EFalse;
 	return err;
 	}
--- a/persistentstorage/sql/SRC/Server/SqlSrvDbSysSettings.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvDbSysSettings.cpp	Tue May 25 14:35:19 2010 +0300
@@ -244,7 +244,7 @@
 					{
 					__SQLLEAVE(KErrGeneral);//two "default policy" records in the table
 					}
-				StoreDefaultSecurityPolicyL(aSecurityPolicyCon, policy, dbPolicySetFlag);
+				StoreDefaultSecurityPolicy(aSecurityPolicyCon, policy, dbPolicySetFlag);
 				defaultPolicySet = ETrue;
 				break;
 			case KDbObjType:
@@ -891,24 +891,23 @@
 @param aPolicy Default security policy object
 @param aDbPolicySetFlag Bit flag. Keeps information which database security policies are set and which aren't.
 
-@leave See CSqlSecurityPolicy::SetDbPolicy() return values.
 @see CSqlSecurityPolicy::SetDbPolicy()
 */
-void TSqlDbSysSettings::StoreDefaultSecurityPolicyL(CSqlSecurityPolicy& aSecurityPolicyCon, 
-													const TSecurityPolicy& aPolicy, TInt aDbPolicySetFlag)
+void TSqlDbSysSettings::StoreDefaultSecurityPolicy(CSqlSecurityPolicy& aSecurityPolicyCon, 
+												   const TSecurityPolicy& aPolicy, TInt aDbPolicySetFlag)
 	{
 	aSecurityPolicyCon.SetDefaultPolicy(aPolicy);
 	if(!(aDbPolicySetFlag & (1 << RSqlSecurityPolicy::ESchemaPolicy)))
 		{
-		__SQLLEAVE_IF_ERROR(aSecurityPolicyCon.SetDbPolicy(RSqlSecurityPolicy::ESchemaPolicy, aPolicy));
+		aSecurityPolicyCon.SetDbPolicy(RSqlSecurityPolicy::ESchemaPolicy, aPolicy);
 		}
 	if(!(aDbPolicySetFlag & (1 << RSqlSecurityPolicy::EReadPolicy)))
 		{
-		__SQLLEAVE_IF_ERROR(aSecurityPolicyCon.SetDbPolicy(RSqlSecurityPolicy::EReadPolicy, aPolicy));
+		aSecurityPolicyCon.SetDbPolicy(RSqlSecurityPolicy::EReadPolicy, aPolicy);
 		}
 	if(!(aDbPolicySetFlag & (1 << RSqlSecurityPolicy::EWritePolicy)))
 		{
-		__SQLLEAVE_IF_ERROR(aSecurityPolicyCon.SetDbPolicy(RSqlSecurityPolicy::EWritePolicy, aPolicy));
+		aSecurityPolicyCon.SetDbPolicy(RSqlSecurityPolicy::EWritePolicy, aPolicy);
 		}
 	}
 
@@ -936,7 +935,7 @@
 		{
 		__SQLLEAVE(KErrGeneral);
 		}
-	__SQLLEAVE_IF_ERROR(aSecurityPolicyCon.SetDbPolicy(static_cast <RSqlSecurityPolicy::TPolicyType> (aPolicyType), aPolicy));
+	aSecurityPolicyCon.SetDbPolicy(static_cast <RSqlSecurityPolicy::TPolicyType> (aPolicyType), aPolicy);
 	aDbPolicySetFlag |= (1 << aPolicyType);
 	}
 
--- a/persistentstorage/sql/SRC/Server/SqlSrvDbSysSettings.h	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvDbSysSettings.h	Tue May 25 14:35:19 2010 +0300
@@ -67,7 +67,7 @@
 	TInt BindSecurityPolicyPrm(sqlite3_stmt* aStmtHandle, TInt aObjType, const TDesC& aObjName, 
 							   TInt aPolicyType, const TSecurityPolicy& aPolicy);
 	TSecurityPolicy ReadCurrSecurityPolicyL(sqlite3_stmt* aStmtHandle, TInt& aObjType, TPtrC& aObjName, TInt& aPolicyType);
-	void StoreDefaultSecurityPolicyL(CSqlSecurityPolicy& aSecurityPolicyCon, const TSecurityPolicy& aPolicy, TInt aDbPolicySetFlag);
+	void StoreDefaultSecurityPolicy(CSqlSecurityPolicy& aSecurityPolicyCon, const TSecurityPolicy& aPolicy, TInt aDbPolicySetFlag);
 	void StoreDbSecurityPolicyL(CSqlSecurityPolicy& aSecurityPolicyCon, TInt aPolicyType, 
 								const TSecurityPolicy& aPolicy, TInt& aDbPolicySetFlag);
 	void StoreDbObjSecurityPolicyL(CSqlSecurityPolicy& aSecurityPolicyCon, TInt aObjType, const TDesC& aObjName,
--- a/persistentstorage/sql/SRC/Server/SqlSrvResourceProfiler.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvResourceProfiler.cpp	Tue May 25 14:35:19 2010 +0300
@@ -662,8 +662,8 @@
         TTime time;
         time.UniversalTime();
         TDateTime dt = time.DateTime();
-        TheSqlSrvProfileTraceBuf8.Format(_L8("[SQL]¬%X¬%ld¬TME¬%02d:%02d:%02d:%06d¬Prep8¬%d¬Prep16¬%d¬Ex8¬%d¬Ex16¬%d"),
-                0, timeDiff, dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond(),
+        TheSqlSrvProfileTraceBuf8.Format(_L8("[SQL]¬\"%X\"¬¬TME¬¬¬¬¬¬¬¬¬¬¬¬%02d:%02d:%02d:%06d¬Prep8¬%d¬Prep16¬%d¬Ex8¬%d¬Ex16¬%d"),
+                timeDiff, dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond(),
                 TheSqlSrvProfilerPreparedCnt8, TheSqlSrvProfilerPreparedCnt16, 
                 TheSqlSrvProfilerExecutedCnt8, TheSqlSrvProfilerExecutedCnt16);
         if(TheSqlSrvProfilerTraceToFile)
@@ -758,19 +758,21 @@
             }
         if(ipcCallIdx >= 0  || (ipcCallIdx == KErrNotFound && TheSqlSrvProfilerTraceLevel == 2))
             {
-            TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬%X¬%ld¬IPC¬%u¬%S¬%ld¬%d¬%d¬%d¬%d¬%d¬%d¬rc¬%d"),  
-                    aDbHandle, 
-                    timeFromStart,
-                    aIpcCounter,
-                    &ipcCallName, 
-                    ttlExecTime, 
-                    executionTime,
-                    count,
-                    TheSqlSrvProfilerFileRead,
-                    TheSqlSrvProfilerFileWrite,
-                    TheSqlSrvProfilerFileSync,
-                    TheSqlSrvProfilerFileSetSize,
-                    aRetCode);
+            TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬\"%X\"¬%ld¬IPC¬%u¬%S¬%ld¬%d¬%d¬%d¬%d¬%d¬%d¬rc¬%d"),  
+														//[SQL]
+                    aDbHandle,							//Database handle
+                    timeFromStart,						//Time from start, microseconds
+														//IPC
+                    aIpcCounter,						//IPC sequence counter for this database (connection)
+                    &ipcCallName,						//IPC call name
+                    ttlExecTime,						//All time spent in this IPC call type for this database (connection)
+                    executionTime,						//This IPC call execution time
+                    count,								//This IPC call sequence counter for this database (connection)
+                    TheSqlSrvProfilerFileRead,			//File read count, performed during this IPC
+                    TheSqlSrvProfilerFileWrite,			//File write count, performed during this IPC
+                    TheSqlSrvProfilerFileSync,			//File flush count, performed during this IPC
+                    TheSqlSrvProfilerFileSetSize,		//File set size count, performed during this IPC
+                    aRetCode);							//IPC call - return code
             SqlSrvProfilePrintf(ESqlSrvProfilerNonSqlTrace);
             }
         }
@@ -788,12 +790,14 @@
         TPtrC ipcCallName;
         (void)SqlIpcTraceIdxAndName(aFuncCode, ipcCallName); 
         TInt64 timeFromStart = SqlTimeFromStartUs();
-        TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬%X¬%ld¬ERR¬%u¬%S¬err¬%d"), 
-                aDbHandle, 
-                timeFromStart,
-                aIpcCounter,
-                &ipcCallName,
-                aError);
+        TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬\"%X\"¬%ld¬ERR¬%u¬%S¬¬¬¬¬¬¬¬err¬%d"), 
+									//[SQL]
+                aDbHandle,			//Database (connection) handle
+                timeFromStart,		//Time from start, microseconds
+									//ERR
+                aIpcCounter,		//IPC sequence counter for this database (connection)
+                &ipcCallName,		//IPC call name
+                aError);			//IPC call - return code
         SqlSrvProfilePrintf(ESqlSrvProfilerNonSqlTrace);
         }
     }
@@ -823,13 +827,13 @@
         _LIT(KEmptyStr,  "");
         if(pos == 0)
             {
-            line.Format(_L("[SQL]¬%X¬%ld¬SQL¬%S¬"), aDbHandle, timeFromStart, aPrepare ? &KPrepare : &KExec);
+            line.Format(_L("[SQL]¬\"%X\"¬%ld¬SQL¬¬%S¬¬¬¬¬¬¬¬¬¬"), aDbHandle, timeFromStart, aPrepare ? &KPrepare : &KExec);
             }
         else
             {
             if(!TheSqlSrvProfilerTraceToFile)
                 {
-                line.Format(_L("[SQL]¬%X¬%ld¬SQL¬%S¬"), aDbHandle, timeFromStart, &KEmptyStr);
+                line.Format(_L("[SQL]¬\"%X\"¬%ld¬SQL¬¬%S¬¬¬¬¬¬¬¬¬¬"), aDbHandle, timeFromStart, &KEmptyStr);
                 }
             }
         TInt l = Min(len, (line.MaxLength() - line.Length()));
@@ -868,13 +872,13 @@
         _LIT(KEmptyStr,  "");
         if(pos == 0)
             {
-            line.Format(_L("[SQL]¬%X¬%ld¬SQL¬%S¬"), aDbHandle, timeFromStart, aPrepare ? &KPrepare : &KExec);
+            line.Format(_L("[SQL]¬\"%X\"¬%ld¬SQL¬¬%S¬¬¬¬¬¬¬¬¬¬"), aDbHandle, timeFromStart, aPrepare ? &KPrepare : &KExec);
             }
         else
             {
             if(!TheSqlSrvProfilerTraceToFile)
                 {
-                line.Format(_L("[SQL]¬%X¬%ld¬SQL¬%S¬"), aDbHandle, timeFromStart, &KEmptyStr);
+                line.Format(_L("[SQL]¬\"%X\"¬%ld¬SQL¬¬%S¬¬¬¬¬¬¬¬¬¬"), aDbHandle, timeFromStart, &KEmptyStr);
                 }
             }
         TInt l = Min(len, (line.MaxLength() - line.Length()));
@@ -904,7 +908,7 @@
             return;
             }
         TInt64 timeFromStart = SqlTimeFromStartUs();
-        TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬%X¬%ld¬CRE¬%S"), 
+        TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬\"%X\"¬%ld¬CRE¬¬¬¬¬¬¬¬¬¬¬¬%S"), 
                 aDbHandle, 
                 timeFromStart,
                 &aDbName);
@@ -926,7 +930,7 @@
             return;
             }
         TInt64 timeFromStart = SqlTimeFromStartUs();
-        TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬%X¬%ld¬OPN¬%S"), 
+        TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬\"%X\"¬%ld¬OPN¬¬¬¬¬¬¬¬¬¬¬¬%S"), 
                 aDbHandle, 
                 timeFromStart,
                 &aDbName);
@@ -944,7 +948,7 @@
             return;
             }
         TInt64 timeFromStart = SqlTimeFromStartUs();
-        TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬%X¬%ld¬CSE"),  
+        TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬\"%X\"¬%ld¬CSE"),  
                 aDbHandle, 
                 timeFromStart);
         SqlSrvProfilePrintf(ESqlSrvProfilerNonSqlTrace);
@@ -986,7 +990,7 @@
             RDebug::Print(_L("SQL trace file creation failed with err=%d"), err);
             }
         }
-    TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬%X¬%ld¬SRV¬START"), 0, timeFromStart); 
+    TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬¬%ld¬SRV¬¬Start"), timeFromStart); 
     SqlSrvProfilePrintf(ESqlSrvProfilerNonSqlTrace);
     }
 
@@ -994,7 +998,7 @@
 void SqlPrintServerStop()
     {
     TInt64 timeFromStart = SqlTimeFromStartUs();
-    TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬%X¬%ld¬SRV¬STOP"), 0, timeFromStart); 
+    TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬¬%ld¬SRV¬¬Stop"), timeFromStart); 
     SqlSrvProfilePrintf(ESqlSrvProfilerNonSqlTrace);
     if(TheSqlSrvProfilerTraceToFile)
         {
--- a/persistentstorage/sql/SRC/Server/SqlSrvStatement.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvStatement.cpp	Tue May 25 14:35:19 2010 +0300
@@ -217,10 +217,6 @@
 	__SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj);
 	
 	(void)sqlite3SymbianLastOsError();//clear last OS error
-	if(sqlite3_expired(iStmtHandle))
-		{
-		__SQLLEAVE_IF_ERROR(KSqlErrStmtExpired);
-		}
 
 	TSqlBufRIterator it;
 	it.Set(aParamBuf);
@@ -516,10 +512,6 @@
 	__SQLASSERT(aParamIndex < iParamBufArray.Count(), ESqlPanicBadArgument);
 	__SQLASSERT(iParamBufArray[aParamIndex] != NULL, ESqlPanicBadArgument);
 	(void)sqlite3SymbianLastOsError();//clear last OS error
-	if(sqlite3_expired(iStmtHandle))
-		{
-		__SQLLEAVE_IF_ERROR(KSqlErrStmtExpired);
-		}
 	//Bind the parameter value.
 	//SQLITE_STATIC is used as an argument, because the text/blob data will be kept and can be used by the next bind call
 	HSqlSrvStmtParamBuf& paramBuf = *iParamBufArray[aParamIndex];
--- a/persistentstorage/sql/SRC/Server/SqlSrvStatementUtil.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvStatementUtil.cpp	Tue May 25 14:35:19 2010 +0300
@@ -203,6 +203,7 @@
 static TInt DoSingleStmtExec16(sqlite3 *aDbHandle, const TDesC16& aSql)
 	{
 	__SQLASSERT(aDbHandle != NULL, ESqlPanicInvalidObj);
+	__SQLASSERT(aSql.Length() > 0 ? (TInt)aSql[aSql.Length() - 1] == 0 : ETrue, ESqlPanicBadArgument);
 	sqlite3_stmt* stmtHandle = NULL;
 	const void* stmtTail = NULL;
     //sqlite3_prepare16_v2() expects parameter #3 to be one of the following:
@@ -223,11 +224,7 @@
 				__SQLASSERT(err != SQLITE_OK, ESqlPanicInternalError);
 				}
 			}
-		TInt err2 = sqlite3_finalize(stmtHandle);
-		if(err == SQLITE_DONE && err2 != SQLITE_OK)
-			{//return the "sqlite3_finalize" error
-			err = err2;	
-			}
+		(void)sqlite3_finalize(stmtHandle);//sqlite3_finalize() fails only if an invalid statement handle is passed.
 		}
 	return err;
 	}
@@ -550,11 +547,6 @@
 	__SQLASSERT(aStmtHandle != NULL, ESqlPanicInvalidObj);
 	
 	(void)sqlite3SymbianLastOsError();//clear last OS error
-	
-	if(sqlite3_expired(aStmtHandle))
-		{
-		return KSqlErrStmtExpired;
-		}
 		
 	TInt err;
 	while((err = sqlite3_step(aStmtHandle)) == SQLITE_ROW)
@@ -600,11 +592,6 @@
 	
 	(void)sqlite3SymbianLastOsError();//clear last OS error
 	
-	if(sqlite3_expired(aStmtHandle))
-		{
-		return KSqlErrStmtExpired;
-		}
-		
 	TInt err = sqlite3_step(aStmtHandle);
 	if(err == SQLITE_ERROR)	//It may be "out of memory" problem
 		{
@@ -634,11 +621,6 @@
 	
 	(void)sqlite3SymbianLastOsError();//clear last OS error
 	
-	if(sqlite3_expired(aStmtHandle))
-		{
-		return KSqlErrStmtExpired;
-		}
-		
 	TInt err = sqlite3_reset(aStmtHandle);
 	return ::Sql2OsErrCode(err, sqlite3SymbianLastOsError());
 	}
@@ -717,14 +699,9 @@
 	if(err == KSqlAtRow)
 		{
 		aPragmaValue = sqlite3_column_int(stmtHandle, 0);
-		__SQLASSERT(aPragmaValue >= 0, ESqlPanicInternalError);
-		err = KErrNone;
+		err = aPragmaValue >= 0 ? KErrNone : KErrCorrupt;
 		}
-	TInt err2 = FinalizeStmtHandle(stmtHandle);
-	if(err == KErrNone && err2 != KErrNone)
-		{//FinalizeStmtHandle() has failed
-		err = err2;
-		}
+	(void)FinalizeStmtHandle(stmtHandle);//sqlite3_finalize() fails only if an invalid statement handle is passed.
 	return err;
 	}
 
@@ -758,11 +735,7 @@
 		aPragmaValue.Copy(ptr);
 		err = KErrNone;
 		}
-	TInt err2 = FinalizeStmtHandle(stmtHandle);
-	if(err == KErrNone && err2 != KErrNone)
-		{//::FinalizeStmtHandle() has failed
-		err = err2;
-		}
+	(void)FinalizeStmtHandle(stmtHandle);//sqlite3_finalize() fails only if an invalid statement handle is passed.
 	return err;
 	}
 
@@ -993,11 +966,7 @@
 				__SQLASSERT(err != SQLITE_OK, ESqlPanicInternalError);
 				}
 			}
-		TInt err2 = sqlite3_finalize(stmtHandle);
-		if(err == SQLITE_DONE && err2 != SQLITE_OK)
-			{//use the "sqlite3_finalize" error
-			err = err2;				
-			}
+		(void)sqlite3_finalize(stmtHandle);//sqlite3_finalize() fails only if an invalid statement handle is passed.
 		}
 	err = ::Sql2OsErrCode(err, sqlite3SymbianLastOsError());
 	if(err == KSqlAtEnd)
@@ -1010,6 +979,11 @@
 
 /**
 Finalizes the statement handle.
+Although the function can return an error, it is ok not to check the returned error,
+because sqlite3_finalize() fails only if invalid statement handle is passed as an argument.
+
+@return KErrNone,     Operation completed successfully;
+					  Other system-wide error codes or SQL errors of ESqlDbError type.
 
 @internalComponent
 */
--- a/persistentstorage/sql/SRC/Server/SqlSrvStrings.h	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvStrings.h	Tue May 25 14:35:19 2010 +0300
@@ -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"
@@ -55,7 +55,7 @@
 CONST_LIT16(KSettingsTable16,		"symbian_settings");
 
 // config consts
-#ifdef SYSLIBS_TEST
+#if defined SYSLIBS_TEST || defined SQL_SOFT_HEAP_LIMIT_TEST
 CONST_LIT16(KSqlSrvDefaultConfigFile, "c:\\test\\t_sqlserver.cfg");
 CONST_LIT16(KSqlSrvDbConfigFileFormat, "c:cfg*");
 #else
--- a/persistentstorage/sql/TEST/t_sqlapi.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlapi.cpp	Tue May 25 14:35:19 2010 +0300
@@ -280,31 +280,41 @@
 	TEST2(fs.Connect(), KErrNone);
 	TFileName privatePath;
 	TEST2(fs.PrivatePath(privatePath), KErrNone);
-	fs.Close();
 	
 	//Private shared database file on an existing drive (C:). 
 	//Very long database file name.
-	const TInt KMaxFileName2 = KMaxFileName - 40;//"-40" because the SQLITE engine creates a journal file if begins
-	                                             //a transaction. The name of the journal file is 
-	                                             //"<dbFileName>-journal.<ext>". It is obvious that if the 
-	                                             //database file name is too long but still valid and its creation
-	                                             //succeeds, the journal file creation may fail because the journal
-	                                             //file name becomes too long
-	TBuf<KMaxFileName2> dbPath;
+	TBuf<50>filesysname;
+	fs.FileSystemName(filesysname,(TInt) EDriveC);
+    fs.Close();
+
+	RDebug::Print(_L("file system name = %S"), &filesysname);
+	TInt maxFileName = KMaxFileName -40;//"-40" because the SQLITE engine creates a journal file if begins
+	                                                 //a transaction. The name of the journal file is 
+	                                                 //"<dbFileName>-journal.<ext>". It is obvious that if the 
+	                                                 //database file name is too long but still valid and its creation
+	                                                 //succeeds, the journal file creation may fail because the journal
+	                                                 //file name becomes too long
+
+	if(filesysname.CompareF(_L("HVFS")) == 0)
+	    {
+        maxFileName = KMaxFileName -150;//The test will panic in PlatSim when the file name is too long. This line should be removed when platsim team fixes the file system defect.
+	    }
+	HBufC* dbPath = HBufC::NewLC(maxFileName);
 	_LIT(KExt, ".DB");
-	dbPath.Copy(_L("C:"));
-	dbPath.Append(KSecureUid.Name());
-	TInt len = KMaxFileName2 + 1 - (dbPath.Length() + KExt().Length() + privatePath.Length());
+	dbPath->Des().Copy(_L("C:"));
+	dbPath->Des().Append(KSecureUid.Name());
+	TInt len = maxFileName + 1 - (dbPath->Length() + KExt().Length() + privatePath.Length());
+	
 	while(--len)
 		{
-		dbPath.Append(TChar('A'));	
+        dbPath->Des().Append(TChar('A'));	
 		}
-	dbPath.Append(KExt);	
-	TEST(dbPath.Length() == (KMaxFileName2 - privatePath.Length()));
-	rc = db.Create(dbPath, securityPolicy);
+	dbPath->Des().Append(KExt);	
+	TEST(dbPath->Length() == (maxFileName - privatePath.Length()));	
+	rc = db.Create(dbPath->Des(), securityPolicy);
+	TEST2(rc, KErrNone);
 	db.Close();
-	rc2 = RSqlDatabase::Delete(dbPath);
-	TEST2(rc, KErrNone);
+	rc2 = RSqlDatabase::Delete(dbPath->Des());
 	TEST2(rc2, KErrNone);
 	
 	// Private database with config
@@ -320,17 +330,19 @@
 	
 	//Public shared database file on an existing drive (C:). 
 	//Very long database file name.
-	dbPath.Copy(_L("C:\\TEST\\D"));
-	len = KMaxFileName2 + 1 - (dbPath.Length() + KExt().Length());
+	dbPath->Des().Copy(_L("C:\\TEST\\D"));
+	len = maxFileName + 1 - (dbPath->Length() + KExt().Length());
 	while(--len)
 		{
-		dbPath.Append(TChar('A'));	
+        dbPath->Des().Append(TChar('A'));	
 		}
-	dbPath.Append(KExt);	
-	TEST(dbPath.Length() == KMaxFileName2);
-	rc = db.Create(dbPath);
+	dbPath->Des().Append(KExt);	
+	TEST(dbPath->Length() == maxFileName);
+	rc = db.Create(dbPath->Des());
 	db.Close();
-	rc2 = RSqlDatabase::Delete(dbPath);
+	rc2 = RSqlDatabase::Delete(dbPath->Des());
+	
+	CleanupStack::PopAndDestroy(dbPath);
 	TEST2(rc, KErrNone);
 	TEST2(rc2, KErrNone);
 
@@ -398,6 +410,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);
@@ -1081,6 +1106,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);
@@ -2351,6 +2387,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 "));
@@ -2420,6 +2498,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()
--- a/persistentstorage/sql/TEST/t_sqlapi2.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlapi2.cpp	Tue May 25 14:35:19 2010 +0300
@@ -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"
@@ -978,6 +978,23 @@
 	RSqlBlobReadStream strm6;
 	TRAP(err, strm6.OpenL(TheDb, KNullDesC, KNullDesC, 1, KNullDesC));
 	TEST(err != KErrNone);
+	//Attempt to open a read blob stream, where the blob column name is invalid and contains non-convertible characters.
+    TBuf<3> invName;
+    invName.SetLength(3);
+    invName[0] = TChar(0xD800); 
+    invName[1] = TChar(0xFC00); 
+    invName[2] = TChar(0x0000);
+	RSqlBlobReadStream strm7;
+	TRAP(err, strm7.OpenL(TheDb,  _L("A"), invName, 1, KNullDesC));
+	TEST(err != KErrNone);
+	//Attempt to open a read blob stream, where the table name is invalid and contains non-convertible characters.
+	RSqlBlobReadStream strm8;
+	TRAP(err, strm8.OpenL(TheDb, invName, _L("Data"), 1, KNullDesC));
+	TEST(err != KErrNone);
+	//Attempt to open a read blob stream, where the attached db name is invalid and contains non-convertible characters.
+	RSqlBlobReadStream strm9;
+	TRAP(err, strm9.OpenL(TheDb, _L("A"), _L("Data"), 1, invName));
+	TEST(err != KErrNone);
 	//
 	err = TheDb.Detach(KAttachDb);
 	TEST2(err, KErrNone);
@@ -1704,8 +1721,7 @@
 						Connection 2 prepares couple of SELECT and INSERT statements (8-bit and 16-bit).
 						Then connection 1 renames the table used in the already prepared statements.
 						Connection 2 attempts to execute the prepared statements. The execution should fail
-						because the statements are expired, the database schema has changed after they 
-						were prepared.
+						because the database schema has changed after they were prepared.
 @SYMTestActions			Expired SQL statements test.
 @SYMTestExpectedResults Test must not fail
 @SYMTestPriority		High
@@ -1747,13 +1763,13 @@
 	err = stmt1.Next();
 	TEST2(err, KSqlErrSchema);
 	err = stmt1.Next();
-	TEST2(err, KSqlErrStmtExpired);
+	TEST(err != KSqlAtRow);
 	err = stmt2.Next();
-	TEST2(err, KSqlErrStmtExpired);
+	TEST(err != KSqlAtRow);
 	err = stmt3.Exec();
-	TEST2(err, KSqlErrStmtExpired);
+	TEST(err < 0);
 	err = stmt4.Exec();
-	TEST2(err, KSqlErrStmtExpired);
+	TEST(err < 0);
 	//
 	stmt4.Close();
 	stmt3.Close();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/sql/TEST/t_sqlcmdlineutil.cpp	Tue May 25 14:35:19 2010 +0300
@@ -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 <e32test.h>
+#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=<drive letter>:] [/page=<512/1024/2048/4096/8192/16384/32768>] ] [/cache=<number>] [/hlimit=<Kb>]\r\n"), &aTestName);
+		return;
+		}
+	aCmdLine.Append(TChar('/'));
+	}
+
+static void ExtractCmdLineParams(TDes& aCmdLine,  RArray<TPtrC>& aPrmNames, RArray<TPtrC>& 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<aCmdLine.Length();++i)
+		{
+		switch(state)
+			{
+			case EWaitPrmStart:
+				if(aCmdLine[i] == TChar('/'))
+					{
+					startPos = i + 1;
+					prmName.Zero();
+					state = EReadPrmName;
+					}
+				break;
+			case EReadPrmName:
+				if(aCmdLine[i] == TChar('='))
+					{
+					TPtr p = aCmdLine.MidTPtr(startPos, i - startPos);
+					prmName.Set(p);
+					prmName.TrimRight();
+					startPos = i + 1;
+					prmValue.Zero();
+					state = EReadPrmValue;
+					}
+				break;
+			case EReadPrmValue:
+				if(aCmdLine[i] == TChar('/'))
+					{
+					TPtr p = aCmdLine.MidTPtr(startPos, i - startPos);
+					prmValue.Set(p);
+					prmValue.Trim();
+					startPos = i + 1;
+					aPrmNames.Append(prmName);
+					aPrmValues.Append(prmValue);
+					prmName.Zero();
+					prmValue.Zero();
+					state = EReadPrmName;
+					}
+				break;
+			default:
+				break;
+			}
+		}
+	}
+
+static void ExtractParamNamesAndValues(const RArray<TPtrC>& aPrmNames, const RArray<TPtrC>& aPrmValues, TCmdLineParams& aCmdLineParams)
+	{
+	__ASSERT_ALWAYS(aPrmNames.Count() == aPrmValues.Count(), User::Invariant());
+	
+	aCmdLineParams.SetDefaults();
+	
+	for(TInt i=0;i<aPrmNames.Count();++i)
+		{
+		if(aPrmNames[i].CompareF(_L("enc")) == 0)
+			{
+			TLex lex(aPrmValues[i]);
+			TInt enc = 0;
+			TInt err = lex.Val(enc);
+			if(err == KErrNone)
+				{
+				if(enc == 8)
+					{
+					aCmdLineParams.iDbEncoding = TCmdLineParams::EDbUtf8;
+					}
+				else if(enc == 16)
+					{
+					aCmdLineParams.iDbEncoding = TCmdLineParams::EDbUtf16;
+					}
+				}
+			}
+		else if(aPrmNames[i].CompareF(_L("drv")) == 0)
+			{
+			if(aPrmValues[i].Length() == 2 && aPrmValues[i][1] == TChar(':'))
+				{
+				TChar ch(aPrmValues[i][0]);
+				ch.LowerCase();
+				if(ch >= 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<TPtrC> prmNames;
+	RArray<TPtrC> 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
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/sql/TEST/t_sqlcmdlineutil.h	Tue May 25 14:35:19 2010 +0300
@@ -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 <f32file.h>
+
+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
--- a/persistentstorage/sql/TEST/t_sqlcompact1.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlcompact1.cpp	Tue May 25 14:35:19 2010 +0300
@@ -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<KSize;++i)
 		{
@@ -186,6 +231,9 @@
 		freePageCount[i] = DeleteRecords(KDbName[i], KFreePageCount[i], KDbPageSize[i]);
 		}
 
+	GetHomeTimeAsString(timeBuf);
+	TheTest.Printf(_L("===Time2: %S\r\n"), &timeBuf);
+	
 	//Open the first database, attach all others.
 	TInt err = TheDb.Open(KDbName1());
 	TEST2(err, KErrNone);
@@ -194,6 +242,9 @@
 		err = TheDb.Attach(KDbName[i], KDbAttachName[i]);
 		TEST2(err, KErrNone);
 		}
+
+	GetHomeTimeAsString(timeBuf);
+	TheTest.Printf(_L("===Time3: %S\r\n"), &timeBuf);
 	
 	//Check the size of the main database.
 	RSqlDatabase::TSize size;
@@ -219,6 +270,9 @@
 		TEST2(count, expected);
 		}
 	
+	GetHomeTimeAsString(timeBuf);
+	TheTest.Printf(_L("===Time4: %S\r\n"), &timeBuf);
+	
 	//Detach databases and close the main database.
 	for(i=0;i<KSize;++i)
 		{
@@ -227,6 +281,9 @@
 		}
 	TheDb.Close();
 
+	GetHomeTimeAsString(timeBuf);
+	TheTest.Printf(_L("===Time5: %S\r\n"), &timeBuf);
+	
 	//Cleanup.
 	for(i=0;i<KSize;++i)
 		{
@@ -252,6 +309,8 @@
 	TInt err = TheDb.Create(KDbName1, &config);
 	TEST2(err, KErrNone);
 	
+	err = TheDb.Exec(_L("BEGIN TRANSACTION"));
+	TEST(err >= 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();
 	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/sql/TEST/t_sqlcorrupt.cpp	Tue May 25 14:35:19 2010 +0300
@@ -0,0 +1,255 @@
+// 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 <e32test.h>
+#include <bautils.h>
+#include <sqldb.h>
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+RSqlDatabase TheDb;
+RTest TheTest(_L("t_sqlcorrupt test"));
+
+_LIT(KTestDir, "c:\\test\\");
+
+_LIT(KDbName, "c:[08770000]t_sqlcorrupt.db");
+_LIT(KFullDbName, "c:\\private\\10281E17\\[08770000]t_sqlcorrupt.db");
+
+_LIT(KDbName2, "c:[08770000]t_sqlcorrupt2.db");
+_LIT(KFullDbName2, "c:\\private\\10281E17\\[08770000]t_sqlcorrupt2.db");
+
+RFs TheFs;
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+void DestroyTestEnv()
+	{
+	TheDb.Close();
+	(void)RSqlDatabase::Delete(KDbName2);
+	(void)RSqlDatabase::Delete(KDbName);
+	TheFs.Close();
+	}
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Test macros and functions
+void Check1(TInt aValue, TInt aLine)
+	{
+	if(!aValue)
+		{
+		DestroyTestEnv();
+		RDebug::Print(_L("*** Boolean expression evaluated to false. Line %d\r\n"), aLine);
+		TheTest(EFalse, aLine);
+		}
+	}
+void Check2(TInt aValue, TInt aExpected, TInt aLine)
+	{
+	if(aValue != aExpected)
+		{
+		DestroyTestEnv();
+		RDebug::Print(_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__)
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+enum TDbEncoding
+	{
+	EDbEncUtf16,
+	EDbEncUtf8,
+	};
+
+void DoCorruptedSecureDbTest(TDbEncoding aEncoding)
+	{
+	(void)RSqlDatabase::Delete(KDbName);
+	
+	RSqlSecurityPolicy policy;
+	TInt err = policy.Create(TSecurityPolicy::EAlwaysPass);
+	TEST2(err, KErrNone);
+	
+	err = policy.SetDbPolicy(RSqlSecurityPolicy::ESchemaPolicy, TSecurityPolicy::EAlwaysPass);
+	TEST2(err, KErrNone);
+	err = policy.SetDbPolicy(RSqlSecurityPolicy::EWritePolicy, TSecurityPolicy::EAlwaysPass);
+	TEST2(err, KErrNone);
+	err = policy.SetDbPolicy(RSqlSecurityPolicy::EReadPolicy, TSecurityPolicy::EAlwaysPass);
+	TEST2(err, KErrNone);
+	
+	err = policy.SetPolicy(RSqlSecurityPolicy::ETable, _L("A"), RSqlSecurityPolicy::EWritePolicy, TSecurityPolicy::EAlwaysPass);
+	TEST2(err, KErrNone);
+	err = policy.SetPolicy(RSqlSecurityPolicy::ETable, _L("A"), RSqlSecurityPolicy::EReadPolicy, TSecurityPolicy::EAlwaysPass);
+	TEST2(err, KErrNone);
+	
+	if(aEncoding == EDbEncUtf16)
+		{
+		err = TheDb.Create(KDbName, policy);
+		}
+	else
+		{
+		_LIT8(KConfig, "encoding = \"UTF-8\"");
+		err = TheDb.Create(KDbName, policy, &KConfig);
+		}
+	TEST2(err, KErrNone);
+	err = TheDb.Exec(_L("CREATE TABLE A(I INTEGER); INSERT INTO A VALUES(10)"));
+	TEST(err >= 0);
+	TheDb.Close();
+	policy.Close();
+
+	CFileMan* fm = NULL;
+	TRAP(err, fm = CFileMan::NewL(TheFs));
+	TEST2(err, KErrNone);
+	
+	//Make a copy of the database
+	err = fm->Copy(KFullDbName, KFullDbName2);
+	TEST2(err, KErrNone);
+	//Get the database file size and calculate the iterations count.
+	TEntry entry;
+	err = TheFs.Entry(KFullDbName, entry);
+	TEST2(err, KErrNone);
+	const TInt KCorruptBlockLen = 19;
+	const TInt KIterationCnt = entry.iSize / KCorruptBlockLen;
+	//
+	TBuf8<KCorruptBlockLen> invalidData;
+	invalidData.SetLength(KCorruptBlockLen);
+	invalidData.Fill(TChar(0xCC));
+	//
+	for(TInt i=0;i<KIterationCnt;++i)
+		{
+		TheTest.Printf(_L("% 4d\r"), i + 1);
+		//Corrupt the database
+		err = fm->Copy(KFullDbName2, KFullDbName);
+		TEST2(err, KErrNone);
+		RFile file;
+		err = file.Open(TheFs, KFullDbName, EFileRead | EFileWrite);
+		TEST2(err, KErrNone);
+		err = file.Write(i * KCorruptBlockLen, invalidData);
+		TEST2(err, KErrNone);
+		file.Close();
+		//Try to open the database and read the record
+		TBool testPassed = EFalse;
+		err = TheDb.Open(KDbName);
+		if(err == KErrNone)
+			{
+			RSqlStatement stmt;
+			err = stmt.Prepare(TheDb, _L("SELECT I FROM A"));
+			if(err == KErrNone)
+				{
+				err = stmt.Next();
+				if(err == KSqlAtRow)
+					{
+					TInt val = stmt.ColumnInt(0);
+					if(val == 10)
+						{
+						testPassed = ETrue;
+						err = KErrNone;
+						}
+					else
+						{
+						err = KErrGeneral;
+						}
+					}
+				stmt.Close();
+				}
+			}
+
+		TheDb.Close();
+		(void)RSqlDatabase::Delete(KDbName);
+		TheTest.Printf(_L("Iteration % 4d, err=%d\r\n"), i + 1, err);
+		if(!testPassed)
+			{
+			TEST(err != KErrNone);
+			}
+		}//end of - for(TInt i=0;i<KIterationCnt;++i)
+
+	delete fm;
+	TheTest.Printf(_L("\r\n"));
+	}
+
+/**
+@SYMTestCaseID          PDS-SQL-CT-4202
+@SYMTestCaseDesc        Invalid UTF16 encoded secure database test.
+@SYMTestPriority        High
+@SYMTestActions         The test creates 16-bit encoded secure database with one table and one record.
+						Then the test simulates a database corruption by writing 19 bytes with random values
+						from "pos" to "pos + 19", where "pos" is a valid db file position, incremented by 19
+						at the end of each test iteration.
+@SYMTestExpectedResults Test must not fail
+*/  
+void CorruptedSecureDbTest16()
+	{
+	DoCorruptedSecureDbTest(EDbEncUtf16);
+	}
+
+/**
+@SYMTestCaseID          PDS-SQL-CT-4202
+@SYMTestCaseDesc        Invalid UTF8 encoded secure database test.
+@SYMTestPriority        High
+@SYMTestActions         The test creates 8-bit encoded secure database with one table and one record.
+						Then the test simulates a database corruption by writing 19 bytes with random values
+						from "pos" to "pos + 19", where "pos" is a valid db file position, incremented by 19
+						at the end of each test iteration.
+@SYMTestExpectedResults Test must not fail
+*/  
+void CorruptedSecureDbTest8()
+	{
+	DoCorruptedSecureDbTest(EDbEncUtf8);
+	}
+
+void CreateTestEnv()
+    {
+    TInt err = TheFs.Connect();
+    TEST2(err, KErrNone);
+
+    err = TheFs.MkDir(KTestDir);
+    TEST(err == KErrNone || err == KErrAlreadyExists);
+
+    err = TheFs.CreatePrivatePath(EDriveC);
+    TEST(err == KErrNone || err == KErrAlreadyExists);
+    }
+
+void DoTestsL()
+	{
+	TheTest.Start(_L("@SYMTestCaseID:PDS-SQL-CT-4202 Corrupted UTF16 encoded secure database test"));
+	CorruptedSecureDbTest16();
+	
+	TheTest.Next(_L("@SYMTestCaseID:PDS-SQL-CT-4203 Corrupted UTF8 encoded secure database test"));
+	CorruptedSecureDbTest8();
+	}
+
+TInt E32Main()
+	{
+	TheTest.Title();
+	
+	CTrapCleanup* tc = CTrapCleanup::New();
+	TheTest(tc != NULL);
+	
+	__UHEAP_MARK;
+		
+	CreateTestEnv();
+	TRAPD(err, DoTestsL());
+	DestroyTestEnv();
+	TEST2(err, KErrNone);
+
+	__UHEAP_MARKEND;
+	
+	TheTest.End();
+	TheTest.Close();
+	
+	delete tc;
+
+	User::Heap().Check();
+	return KErrNone;
+	}
--- a/persistentstorage/sql/TEST/t_sqlenvcreate.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlenvcreate.cpp	Tue May 25 14:35:19 2010 +0300
@@ -59,7 +59,7 @@
 _LIT(KDb8org, "z:\\private\\10281e17\\[98765432]t_2defaultpolicies.db");
 _LIT(KDb8, "c:\\private\\10281e17\\[98765432]t_2defaultpolicies.db");
 
-_LIT(KPrivateSubDir, "c:\\private\\10281e17\\TestDir.db");
+_LIT(KPrivateSubDir, "c:\\private\\10281e17\\cfg-TestDir.db\\");
 
 ///////////////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////////////
--- a/persistentstorage/sql/TEST/t_sqlenvdestroy.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlenvdestroy.cpp	Tue May 25 14:35:19 2010 +0300
@@ -36,7 +36,7 @@
 _LIT(KDb7, "c:\\private\\10281e17\\[98765432]t_invobject.db");
 _LIT(KDb8, "c:\\private\\10281e17\\[98765432]t_2defaultpolicies.db");
 
-_LIT(KPrivateSubDir, "c:\\private\\10281e17\\TestDir.db");
+_LIT(KPrivateSubDir, "c:\\private\\10281e17\\cfg-TestDir.db\\");
 
 ///////////////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////////////
--- a/persistentstorage/sql/TEST/t_sqlfilebuf64.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlfilebuf64.cpp	Tue May 25 14:35:19 2010 +0300
@@ -514,12 +514,10 @@
     fbuf.ProfilerReset();
     
 	//Zero max length request
-	HBufC8* buf1 = HBufC8::New(0);
-	TEST(buf1 != NULL);
-	TPtr8 ptr1 = buf1->Des();
+    TUint8 buf1[1];
+	TPtr8 ptr1(buf1, 0);
 	err = fbuf.Read(0, ptr1);
 	TEST2(err, KErrNone); 
-	delete buf1;
 	TEST2(fbuf.iFileReadCount, 0);
 	TEST2(fbuf.iFileReadAmount, 0);
 	TEST2(fbuf.iFileSizeCount, 0);
@@ -823,15 +821,21 @@
 					parse.Set(KTestFile2, &drvName, NULL);
 					TheDbName.Copy(parse.FullName());
 					TRAP(err, BaflUtils::EnsurePathExistsL(TheFs, TheDbName));
-					TEST(err == KErrNone || err == KErrAlreadyExists);
-					(void)TheFs.Delete(TheDbName);
-					RFileBuf64 fbuf64(8 * 1024);
-					err = fbuf64.Create(TheFs, TheDbName, EFileRead | EFileWrite);
-					TEST2(err, KErrNone);
-					TInt readAhead = fbuf64.SetReadAheadSize(vparam.iBlockSize, vparam.iRecReadBufSize);
-					TheTest.Printf(_L("       Read-ahead size=%d.\r\n"), readAhead);
-					fbuf64.Close();
-					(void)TheFs.Delete(TheDbName);
+					if(err == KErrNone || err == KErrAlreadyExists)
+						{
+						(void)TheFs.Delete(TheDbName);
+						RFileBuf64 fbuf64(8 * 1024);
+						err = fbuf64.Create(TheFs, TheDbName, EFileRead | EFileWrite);
+						TEST2(err, KErrNone);
+						TInt readAhead = fbuf64.SetReadAheadSize(vparam.iBlockSize, vparam.iRecReadBufSize);
+						TheTest.Printf(_L("       Read-ahead size=%d.\r\n"), readAhead);
+						fbuf64.Close();
+						(void)TheFs.Delete(TheDbName);
+						}
+					else
+						{
+						TheTest.Printf(_L("Drive %C. BaflUtils::EnsurePathExistsL() has failed with err=%d.\r\n"), 'A' + drive, err);	
+						}
 					}
 				}
 			else
--- a/persistentstorage/sql/TEST/t_sqlload.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlload.cpp	Tue May 25 14:35:19 2010 +0300
@@ -137,7 +137,7 @@
 		};
 	
 	static TStartTime startTime; 
-	const TInt KTestTimeLimit = 500;//seconds
+	const TInt KTestTimeLimit = 150;//seconds
 	
 	TTime currTime;
 	currTime.HomeTime();
@@ -600,46 +600,54 @@
 	const TInt KMaxStmtCount = 100000;
 	RSqlStatement* stmt = new RSqlStatement[KMaxStmtCount];
 	TEST(stmt != NULL);
-	TInt stmtCnt = 0;
 
 	//Create as many statement objects as possible
+	TInt idx = 0;
 	err = KErrNone;
-	for(TInt i=0;(i<KMaxStmtCount) && (err == KErrNone);++i,++stmtCnt)
+	for(;idx<KMaxStmtCount;++idx)
 		{
-		err = stmt[i].Prepare(db, _L("SELECT * FROM A WHERE I>=0 AND I<10"));
-		if((i % 100) == 0)
+		err = stmt[idx].Prepare(db, _L("SELECT * FROM A WHERE I>=0 AND I<10"));
+		if(err != KErrNone)
+			{
+			break;
+			}
+		if((idx % 100) == 0)
 			{
 			GetHomeTimeAsString(time);
-			TheTest.Printf(_L("=== %S: Create % 5d statements\r\n"), &time, i + 1);
+			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
-	for(TInt i=stmtCnt-1,j=0;i>=0;i-=2,++j)
+	idx = 0;
+	for(;idx<(stmtCnt/2);++idx)
 		{
-		stmt[i].Close();
-		if((j % 100) == 0)
+		stmt[idx].Close();
+		if((idx % 100) == 0)
 			{
 			GetHomeTimeAsString(time);
-			TheTest.Printf(_L("=== %S: % 5d statements closed\r\n"), &time, j + 1);
+			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 i=stmtCnt-2,j=0;i>=0;i-=2,++j)
+	for(TInt j=0;idx<stmtCnt;++idx,++j)
 		{
-		err = stmt[i].Next();
+		err = stmt[idx].Next();
 		TEST2(err, KSqlAtRow);
-		err = stmt[i].Next();
+		err = stmt[idx].Next();
 		TEST2(err, KSqlAtRow);
-		err = stmt[i].Next();
+		err = stmt[idx].Next();
 		TEST2(err, KSqlAtEnd);
 		if((j % 100) == 0)
 			{
@@ -654,18 +662,20 @@
 		}
 
 	//Cleanup
-	for(TInt i=stmtCnt-1,j=0;i>=0;--i,++j)
+	for(idx=0;idx<stmtCnt;++idx)
 		{
-		stmt[i].Close();
-		if((j % 100) == 0)
+		stmt[idx].Close();
+		if((idx % 100) == 0)
 			{
 			GetHomeTimeAsString(time);
-			TheTest.Printf(_L("=== %S: % 5d statements closed\r\n"), &time, j + 1);
+			TheTest.Printf(_L("=== %S: % 5d statements closed\r\n"), &time, idx + 1);
 			}
 		}
 	delete [] stmt;
 	db.Close();
 	(void)RSqlDatabase::Delete(KTestDbName1);
+	GetHomeTimeAsString(time);
+	TheTest.Printf(_L("=== %S: Test case end\r\n"), &time);
 	}
 
 void DoTests()
--- a/persistentstorage/sql/TEST/t_sqloom.h	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqloom.h	Tue May 25 14:35:19 2010 +0300
@@ -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"
@@ -121,7 +121,7 @@
 typedef void (*TStmtFuncPtr2L)(RSqlStatement& aStmt);
 typedef void (*TScalarFullSelectFuncPtrL)(RSqlDatabase& aDb);
 typedef void (*TBlobPrepareFuncPtrL)(RSqlDatabase& aDb);
-typedef void (*TBlobTestFuncPtrL)(RSqlDatabase& aDb, const TDesC& aAttachDbName = KNullDesC);
+typedef void (*TBlobTestFuncPtrL)(RSqlDatabase& aDb, const TDesC& aAttachDbName);
 
 void CreateTestSecurityPolicy(RSqlSecurityPolicy& aSecurityPolicy);
 void CreateAttachDb();
--- a/persistentstorage/sql/TEST/t_sqloom2.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqloom2.cpp	Tue May 25 14:35:19 2010 +0300
@@ -797,7 +797,7 @@
 	}
 
 //"RSqlBlobReadStream::OpenL()/RSqlBlobReadStream::ReadL()" OOM test
-void BlobReadStreamOpenL(RSqlDatabase& aDb, const TDesC& aAttachDbName = KNullDesC)
+void BlobReadStreamOpenL(RSqlDatabase& aDb, const TDesC& aAttachDbName)
 	{
 	RSqlBlobReadStream strm;
 	CleanupClosePushL(strm);
@@ -824,7 +824,7 @@
 	}
 
 //"RSqlBlobReadStream::OpenL()/RSqlBlobReadStream::SizeL()" OOM test
-void BlobReadStreamSizeL(RSqlDatabase& aDb, const TDesC& aAttachDbName = KNullDesC)
+void BlobReadStreamSizeL(RSqlDatabase& aDb, const TDesC& aAttachDbName)
 	{
 	RSqlBlobReadStream strm;
 	CleanupClosePushL(strm);
@@ -842,7 +842,7 @@
 	}
 
 //"RSqlBlobWriteStream::OpenL()/RSqlBlobWriteStream::WriteL()" OOM test
-void BlobWriteStreamOpenL(RSqlDatabase& aDb, const TDesC& aAttachDbName = KNullDesC)
+void BlobWriteStreamOpenL(RSqlDatabase& aDb, const TDesC& aAttachDbName)
 	{
 	RSqlBlobWriteStream strm;
 	CleanupClosePushL(strm);
@@ -866,7 +866,7 @@
 	}
 
 //"RSqlBlobWriteStream::OpenL()/RSqlBlobWriteStream::SizeL()" OOM test
-void BlobWriteStreamSizeL(RSqlDatabase& aDb, const TDesC& aAttachDbName = KNullDesC)
+void BlobWriteStreamSizeL(RSqlDatabase& aDb, const TDesC& aAttachDbName)
 	{
 	RSqlBlobWriteStream strm;
 	CleanupClosePushL(strm);
@@ -884,7 +884,7 @@
 	}
 	
 //"TSqlBlob::GetLC()" OOM test
-void BlobWholeGet1L(RSqlDatabase& aDb, const TDesC& aAttachDbName = KNullDesC)
+void BlobWholeGet1L(RSqlDatabase& aDb, const TDesC& aAttachDbName)
 	{
 	HBufC8* buf = NULL;
 	if(aAttachDbName.Length() > 0)
@@ -900,7 +900,7 @@
 	}
 	
 //"TSqlBlob::Get()" OOM test
-void BlobWholeGet2L(RSqlDatabase& aDb, const TDesC& aAttachDbName = KNullDesC)
+void BlobWholeGet2L(RSqlDatabase& aDb, const TDesC& aAttachDbName)
 	{
 	if(aAttachDbName.Length() > 0)
 		{
@@ -913,7 +913,7 @@
 	}
 
 //"TSqlBlob::SetL()" OOM test
-void BlobWholeSetL(RSqlDatabase& aDb, const TDesC& aAttachDbName = KNullDesC)
+void BlobWholeSetL(RSqlDatabase& aDb, const TDesC& aAttachDbName)
 	{
 	if(aAttachDbName.Length() > 0)
 		{
@@ -978,7 +978,7 @@
 				}
 			else
 				{
-				TRAP(err, (*aBlobTestFuncPtrL)(db));
+				TRAP(err, (*aBlobTestFuncPtrL)(db, KNullDesC));
 				}
 
 			ResetHeapFailure(TheOomTestType[i]);
--- a/persistentstorage/sql/TEST/t_sqlperformance.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlperformance.cpp	Tue May 25 14:35:19 2010 +0300
@@ -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"
@@ -19,6 +19,7 @@
 #include <hal.h>
 #include <stdlib.h>
 #include <sqldb.h>
+#include "t_sqlcmdlineutil.h"
 #include "SqlSrvStrings.h"
 #include "sqlite3.h"
 #include "SqliteSymbian.h"
@@ -27,15 +28,12 @@
 
 RTest TheTest(_L("t_sqlperformance test"));
 RFs   TheFs;
+TBuf<200> TheTestTitle;
+TCmdLineParams TheCmdLineParams;
+TBuf8<200> TheSqlConfigString;
 
-TBuf<200> TheTestTitle;
-TBuf<256> TheCmd;
-TParse TheParse;
-TBuf<8> TheDriveName;
-
-_LIT8(KDbEncodingUtf8, "encoding=UTF-8");
-_LIT(KDbEncodingUtf8text,  "UTF8  encoded db");
-_LIT(KDbEncodingUtf16text, "UTF16 encoded db");
+_LIT(KUtf8,  "UTF8 ");
+_LIT(KUtf16, "UTF16");
 
 TFileName TheSecureDbName;
 TFileName TheNonSecureDbName;
@@ -43,14 +41,6 @@
 TFileName TheNonSecureTmpDbName;
 TFileName TheSglRecDbFileName;
 
-enum TDbEncoding
-	{
-	EDbUtf8,
-	EDbUtf16
-	};
-	
-TDbEncoding TheDbEncoding;
-
 _LIT(KSqlServerPrivateDir, "\\private\\10281e17\\");
 
 _LIT(KCreateDbScript, "z:\\test\\contacts_schema_to_vendors.sql");
@@ -157,9 +147,10 @@
 
 	file.Close();
 	
-	HBUFC* sql2 = HBUFC::New(size);
+	HBUFC* sql2 = HBUFC::New(size + 1);
 	TEST(sql2 != NULL);
 	sql2->Des().Copy(sql->Des());
+	sql2->Des().Append(TChar(0));
 	delete sql;
 	
 	return sql2;
@@ -249,7 +240,7 @@
 		{
 		RSqlDatabase::Delete(aDbName);
 		RSqlDatabase db;
-		TInt err = db.Create(aDbName, TheDbEncoding == EDbUtf16 ? NULL : &KDbEncodingUtf8);
+		TInt err = db.Create(aDbName, &TheSqlConfigString);
 		TEST2(err, KErrNone);
 		CreateDbSchema(db);
 		db.Close();
@@ -277,7 +268,7 @@
 		securityPolicy.SetDbPolicy(RSqlSecurityPolicy::EWritePolicy, TSecurityPolicy(ECapabilityWriteUserData));
 		securityPolicy.SetDbPolicy(RSqlSecurityPolicy::EReadPolicy, TSecurityPolicy(ECapabilityReadUserData));
 		RSqlDatabase db;
-		err = db.Create(aDbName, securityPolicy, TheDbEncoding == EDbUtf16 ? NULL : &KDbEncodingUtf8);
+		err = db.Create(aDbName, securityPolicy, &TheSqlConfigString);
 		TEST2(err, KErrNone);	
 		securityPolicy.Close();
 		CreateDbSchema(db);
@@ -505,7 +496,7 @@
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 //Template class offering Create() and Open() methods for creating/opening a sqlite3 handle.
-template <TDbEncoding TYPE> class TDbHelper2
+template <TCmdLineParams::TDbEncoding TYPE> class TDbHelper2
 	{
 public:	
 	static void Create(const TDesC& aDbName);
@@ -543,7 +534,7 @@
 	}
 
 //Explicit TDbHelper2 class specialization for creating/opening a database with UTF8 default encoding
-template <> class TDbHelper2<EDbUtf8>
+template <> class TDbHelper2<TCmdLineParams::EDbUtf8>
 	{
 public:	
 	static void Create(const TDesC& aDbFileName)
@@ -581,7 +572,7 @@
 	};
 
 //Explicit TDbHelper2 class specialization for creating/opening a database with UTF16 default encoding
-template <> class TDbHelper2<EDbUtf16>
+template <> class TDbHelper2<TCmdLineParams::EDbUtf16>
 	{
 public:	
 	static void Create(const TDesC& aDbFileName)
@@ -814,7 +805,7 @@
 	fmtstr.Copy(aUpdateSql);
 
 	sqlite3SymbianLibInit();
-	sqlite3* dbHandle = TDbHelper2<EDbUtf8>::Open(aDbName);
+	sqlite3* dbHandle = TDbHelper2<TCmdLineParams::EDbUtf8>::Open(aDbName);
 	
 	TUint32 start = User::FastCounter();
 	for(TInt id=1;id<=KTestTecordCount;++id)
@@ -842,7 +833,7 @@
 	TheTest.Printf(_L("\"Update (without parameters)\" test\r\n"));
 
 	sqlite3SymbianLibInit();
-	sqlite3* dbHandle = TDbHelper2<EDbUtf16>::Open(aDbName);
+	sqlite3* dbHandle = TDbHelper2<TCmdLineParams::EDbUtf16>::Open(aDbName);
 	
 	TUint32 start = User::FastCounter();
 	for(TInt id=1;id<=KTestTecordCount;++id)
@@ -998,7 +989,8 @@
 	delete sql;
 	}
 
-template <TDbEncoding TYPE, class HBUFC, class PTRC, class DESC> void PerformanceTest2(const TDesC& aDbFileName, 
+template <TCmdLineParams::TDbEncoding TYPE, class HBUFC, class PTRC, class DESC> void PerformanceTest2(
+																					   const TDesC& aDbFileName, 
 																					   const DESC& aCommitStr,
 																					   const DESC& aUpdateSql,
 																					   const DESC& aSelectSql,
@@ -1039,10 +1031,10 @@
 	delete fm;
 	}
 //Explicit PerformanceTest2() template instantiations.
-template void PerformanceTest2<EDbUtf8, HBufC8, TPtrC8, TDesC8>(const TDesC&, const TDesC8&, const TDesC8&, const TDesC8&, const TDesC8&);
-template void PerformanceTest2<EDbUtf16, HBufC8, TPtrC8, TDesC8>(const TDesC&, const TDesC8&, const TDesC8&, const TDesC8&, const TDesC8&);
-template void PerformanceTest2<EDbUtf8, HBufC16, TPtrC16, TDesC16>(const TDesC&, const TDesC16&, const TDesC16&, const TDesC16&, const TDesC16&);
-template void PerformanceTest2<EDbUtf16, HBufC16, TPtrC16, TDesC16>(const TDesC&, const TDesC16&, const TDesC16&, const TDesC16&, const TDesC16&);
+template void PerformanceTest2<TCmdLineParams::EDbUtf8, HBufC8, TPtrC8, TDesC8>(const TDesC&, const TDesC8&, const TDesC8&, const TDesC8&, const TDesC8&);
+template void PerformanceTest2<TCmdLineParams::EDbUtf16, HBufC8, TPtrC8, TDesC8>(const TDesC&, const TDesC8&, const TDesC8&, const TDesC8&, const TDesC8&);
+template void PerformanceTest2<TCmdLineParams::EDbUtf8, HBufC16, TPtrC16, TDesC16>(const TDesC&, const TDesC16&, const TDesC16&, const TDesC16&, const TDesC16&);
+template void PerformanceTest2<TCmdLineParams::EDbUtf16, HBufC16, TPtrC16, TDesC16>(const TDesC&, const TDesC16&, const TDesC16&, const TDesC16&, const TDesC16&);
 
 void ColumnValueAccessTest()
 	{
@@ -1056,7 +1048,7 @@
 	
 	//Create a test database
 	RSqlDatabase db;
-	TInt err = db.Create(TheNonSecureDbName2);		
+	TInt err = db.Create(TheNonSecureDbName2, &TheSqlConfigString);
 	TEST2(err, KErrNone);
 	_LIT(KCreateSql, "CREATE TABLE A(%S INTEGER, %S INTEGER, %S INTEGER, %S INTEGER)");
 	sql.Format(KCreateSql, &colNames[0], &colNames[1], &colNames[2], &colNames[3]);
@@ -1259,57 +1251,50 @@
 	TheTest.Printf(_L("Single \"delete\" test\r\n"));
 	SingleDeleteTest();
 	
-	TheTestTitle.Copy(_L("SERVER, UTF8 SQL strings, non-secure, "));
-	TheTestTitle.Append(TheDbEncoding == EDbUtf16 ? KDbEncodingUtf16text : KDbEncodingUtf8text);
-	TheTestTitle.Append(_L("\r\n"));
+	TheTestTitle.Format(_L("SERVER, UTF8 SQL strings, non-secure, encoding: \"%S\", page size: %d\r\n"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
 	TheTest.Printf(TheTestTitle);
 	PerformanceTest<HBufC8, TPtrC8, TDesC8, ENonSecureDb>(TheNonSecureDbName, KCommitStr8(), KUpdateSql8(), KSelectSql8(), KDeleteSql8());
 
-	TheTestTitle.Copy(_L("SERVER, UTF8 SQL strings, non-secure, "));
-	TheTestTitle.Append(TheDbEncoding == EDbUtf16 ? KDbEncodingUtf16text : KDbEncodingUtf8text);
-	TheTestTitle.Append(_L(", update test (without parameters)"));
-	TheTestTitle.Append(_L("\r\n"));
+	TheTestTitle.Format(_L("SERVER, UTF8 SQL strings, non-secure, update test (without parameters), encoding: \"%S\", page size: %d\r\n"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
 	TheTest.Printf(TheTestTitle);
 	UpdateWPTest<TBuf8<200>, TDesC8, ENonSecureDb>(TheNonSecureDbName, KUpdateSql2_8());
 
-	TheTestTitle.Copy(_L("SERVER, UTF8 SQL strings, secure, "));
-	TheTestTitle.Append(TheDbEncoding == EDbUtf16 ? KDbEncodingUtf16text : KDbEncodingUtf8text);
-	TheTestTitle.Append(_L("\r\n"));
+	TheTestTitle.Format(_L("SERVER, UTF8 SQL strings, secure, encoding: \"%S\", page size: %d\r\n"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
 	TheTest.Printf(TheTestTitle);
 	PerformanceTest<HBufC8, TPtrC8, TDesC8, ESecureDb>(TheSecureDbName, KCommitStr8(), KUpdateSql8(), KSelectSql8(), KDeleteSql8());
 
 	TheTest.Printf(_L("SQLITE, UTF8 encoded database, UTF8 SQL strings\r\n"));
-	PerformanceTest2<EDbUtf8, HBufC8, TPtrC8, TDesC8>(TheNonSecureDbName, KCommitStr8(), KUpdateSql8(), KSelectSql8(), KDeleteSql8());
+	PerformanceTest2<TCmdLineParams::EDbUtf8, HBufC8, TPtrC8, TDesC8>(TheNonSecureDbName, KCommitStr8(), KUpdateSql8(), KSelectSql8(), KDeleteSql8());
 
 	TheTest.Printf(_L("SQLITE, UTF8 encoded database, UTF8 SQL strings, update test (without parameters)\r\n"));
 	UpdateWPTest2<TDesC8>(TheNonSecureDbName, KUpdateSql2_8());
 
 	TheTest.Printf(_L("SQLITE, UTF16 encoded database, UTF8 SQL strings\r\n"));
-	PerformanceTest2<EDbUtf16, HBufC8, TPtrC8, TDesC8>(TheNonSecureDbName, KCommitStr8(), KUpdateSql8(), KSelectSql8(), KDeleteSql8());
+	PerformanceTest2<TCmdLineParams::EDbUtf16, HBufC8, TPtrC8, TDesC8>(TheNonSecureDbName, KCommitStr8(), KUpdateSql8(), KSelectSql8(), KDeleteSql8());
 
-	TheTestTitle.Copy(_L("SERVER, UTF16 SQL strings, non-secure, "));
-	TheTestTitle.Append(TheDbEncoding == EDbUtf16 ? KDbEncodingUtf16text : KDbEncodingUtf8text);
-	TheTestTitle.Append(_L("\r\n"));
+	TheTestTitle.Format(_L("SERVER, UTF16 SQL strings, non-secure, encoding: \"%S\", page size: %d\r\n"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
 	TheTest.Printf(TheTestTitle);
 	PerformanceTest<HBufC16, TPtrC16, TDesC16, ENonSecureDb>(TheNonSecureDbName, KCommitStr16(), KUpdateSql16(), KSelectSql16(), KDeleteSql16());
 	
-	TheTestTitle.Copy(_L("SERVER, UTF16 SQL strings, non-secure, "));
-	TheTestTitle.Append(TheDbEncoding == EDbUtf16 ? KDbEncodingUtf16text : KDbEncodingUtf8text);
-	TheTestTitle.Append(_L(", update test (without parameters)\r\n"));
+	TheTestTitle.Format(_L("SERVER, UTF16 SQL strings, non-secure, update test (without parameters), encoding: \"%S\", page size: %d\r\n"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
 	TheTest.Printf(TheTestTitle);
 	UpdateWPTest<TBuf16<200>, TDesC16, ENonSecureDb>(TheNonSecureDbName, KUpdateSql2_16());
 
-	TheTestTitle.Copy(_L("SERVER, UTF16 SQL strings, secure, "));
-	TheTestTitle.Append(TheDbEncoding == EDbUtf16 ? KDbEncodingUtf16text : KDbEncodingUtf8text);
-	TheTestTitle.Append(_L("\r\n"));
+	TheTestTitle.Format(_L("SERVER, UTF16 SQL strings, secure, encoding: \"%S\", page size: %d\r\n"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
 	TheTest.Printf(TheTestTitle);
 	PerformanceTest<HBufC16, TPtrC16, TDesC16, ESecureDb>(TheSecureDbName, KCommitStr16(), KUpdateSql16(), KSelectSql16(), KDeleteSql16());
 
 	TheTest.Printf(_L("SQLITE, UTF8 encoded database, UTF16 SQL strings\r\n"));
-	PerformanceTest2<EDbUtf8, HBufC16, TPtrC16, TDesC16>(TheNonSecureDbName, KCommitStr16(), KUpdateSql16(), KSelectSql16(), KDeleteSql16());
+	PerformanceTest2<TCmdLineParams::EDbUtf8, HBufC16, TPtrC16, TDesC16>(TheNonSecureDbName, KCommitStr16(), KUpdateSql16(), KSelectSql16(), KDeleteSql16());
 
 	TheTest.Printf(_L("SQLITE, UTF16 encoded database, UTF16 SQL strings\r\n"));
-	PerformanceTest2<EDbUtf16, HBufC16, TPtrC16, TDesC16>(TheNonSecureDbName, KCommitStr16(), KUpdateSql16(), KSelectSql16(), KDeleteSql16());
+	PerformanceTest2<TCmdLineParams::EDbUtf16, HBufC16, TPtrC16, TDesC16>(TheNonSecureDbName, KCommitStr16(), KUpdateSql16(), KSelectSql16(), KDeleteSql16());
 
 	TheTest.Printf(_L("SQLITE, UTF16 encoded database, UTF16 SQL strings, update test (without parameters)\r\n"));
 	UpdateWPTest2<TDesC16>(TheNonSecureDbName, KUpdateSql2_16());
@@ -1322,85 +1307,32 @@
 
 	}
 
-//Usage: "t_sqlperformance [[-16/-8] [<drive letter>:]]"
-
 TInt E32Main()
 	{
 	TheTest.Title();
 
 	CTrapCleanup* tc = CTrapCleanup::New();
-
-	TheDbEncoding = EDbUtf16;
+	TheTest(tc != NULL);
 
-	User::CommandLine(TheCmd);
-	TheCmd.TrimAll();
-	if(TheCmd.Length() > 0)
-		{
-		TPtrC prm1(KNullDesC);
-		TPtrC prm2(KNullDesC);
-		TInt pos = TheCmd.Locate(TChar(' '));
-		if(pos > 0)
-			{
-			prm1.Set(TheCmd.Left(pos));
-			prm2.Set(TheCmd.Mid(pos + 1));
-			}
-		else
-			{
-			prm1.Set(TheCmd);
-			}
-		if(prm1.Compare(_L("-8")) == 0)
-			{
-			TheDbEncoding = EDbUtf8;
-			TheDriveName.Copy(prm2);
-			}
-		else if(prm2.Compare(_L("-8")) == 0)
-			{
-			TheDbEncoding = EDbUtf8;
-			TheDriveName.Copy(prm1);
-			}
-		else if(prm1.Compare(_L("-16")) == 0)
-			{
-			TheDbEncoding = EDbUtf16;
-			TheDriveName.Copy(prm2);
-			}
-		else if(prm2.Compare(_L("-16")) == 0)
-			{
-			TheDbEncoding = EDbUtf16;
-			TheDriveName.Copy(prm1);
-			}
-		}
+	GetCmdLineParamsAndSqlConfigString(TheTest, _L("t_sqlperformance"), TheCmdLineParams, TheSqlConfigString);
+	_LIT(KSecureDbName, "c:[2121212A]t_perfdb.db");
+	PrepareDbName(KSecureDbName, TheCmdLineParams.iDriveName, TheSecureDbName);
+	_LIT(KNonSecureDbName, "c:\\test\\t_perfdb.db");
+	PrepareDbName(KNonSecureDbName, TheCmdLineParams.iDriveName, TheNonSecureDbName);
+	_LIT(KNonSecureDbName2, "c:\\test\\t_perfdb2.db");
+	PrepareDbName(KNonSecureDbName2, TheCmdLineParams.iDriveName, TheNonSecureDbName2);
+	_LIT(KNonSecureTmpDbName, "c:\\test\\tmp.db");
+	PrepareDbName(KNonSecureTmpDbName, TheCmdLineParams.iDriveName, TheNonSecureTmpDbName);
+	_LIT(KSglRecDbName, "c:\\test\\default_avacon.dbSQL");
+	PrepareDbName(KSglRecDbName, TheCmdLineParams.iDriveName, TheSglRecDbFileName);
 
-	//Construct test database file names	
-	_LIT(KSecureDbName, "c:[2121212A]t_perfdb.db");
-	TheParse.Set(TheDriveName, &KSecureDbName, 0);
-	const TDesC& dbFilePath1 = TheParse.FullName();
-	TheSecureDbName.Copy(dbFilePath1);
-	
-	_LIT(KNonSecureDbName, "c:\\test\\t_perfdb.db");
-	TheParse.Set(TheDriveName, &KNonSecureDbName, 0);
-	const TDesC& dbFilePath2 = TheParse.FullName();
-	TheNonSecureDbName.Copy(dbFilePath2);
-	
-	_LIT(KNonSecureDbName2, "c:\\test\\t_perfdb2.db");
-	TheParse.Set(TheDriveName, &KNonSecureDbName2, 0);
-	const TDesC& dbFilePath3 = TheParse.FullName();
-	TheNonSecureDbName2.Copy(dbFilePath3);
-
-	_LIT(KNonSecureTmpDbName, "c:\\test\\tmp.db");
-	TheParse.Set(TheDriveName, &KNonSecureTmpDbName, 0);
-	const TDesC& dbFilePath4 = TheParse.FullName();
-	TheNonSecureTmpDbName.Copy(dbFilePath4);
-	
-	_LIT(KSglRecDbName, "c:\\test\\default_avacon.dbSQL");
-	TheParse.Set(TheDriveName, &KSglRecDbName, 0);
-	const TDesC& dbFilePath5 = TheParse.FullName();
-	TheSglRecDbFileName.Copy(dbFilePath5);
+	TheTest.Printf(_L("==Databases: %S, %S, %S, %S, %S\r\n"), &TheSecureDbName, &TheNonSecureDbName, 
+															  &TheNonSecureDbName2, &TheNonSecureTmpDbName, 
+															  &TheSglRecDbFileName);
 	
 	__UHEAP_MARK;
 	
 	TestEnvInit();
-	TheTest.Printf(_L("==Databases: %S, %S, %S, %S, %S\r\n"), &TheSecureDbName, &TheNonSecureDbName, 
-															  &TheNonSecureDbName2, &TheNonSecureTmpDbName, &TheSglRecDbFileName);
 	DoTests();
 	TestEnvDestroy();
 
--- a/persistentstorage/sql/TEST/t_sqlperformance2.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlperformance2.cpp	Tue May 25 14:35:19 2010 +0300
@@ -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"
@@ -16,6 +16,7 @@
 #include <e32test.h>
 #include <bautils.h>
 #include <sqldb.h>
+#include "t_sqlcmdlineutil.h"
 
 ///////////////////////////////////////////////////////////////////////////////////////
 
@@ -24,11 +25,14 @@
 TFileName		TheDbFileName;
 RFs				TheFs;
 
-TInt TheBlobSize = 1024 * 256;
+TBuf<200> 		TheTestTitle;
+TCmdLineParams 	TheCmdLineParams;
+TBuf8<200> 		TheSqlConfigString;
 
-TBuf<256>  TheCmd;
-TDriveName TheDriveName;
-TParse     TheParse;
+_LIT(KUtf8,  "UTF8 ");
+_LIT(KUtf16, "UTF16");
+
+TInt TheBlobSize = 1024 * 256;
 
 ///////////////////////////////////////////////////////////////////////////////////////
 
@@ -69,20 +73,16 @@
     {
     TInt err = TheFs.Connect();
     TEST2(err, KErrNone);
-    //Get the drive number from the database file name
-	err = TheParse.Set(TheDbFileName, NULL, NULL);
-	TEST2(err, KErrNone);
-	TPtrC driveName = TheParse.Drive();
-	TEST(driveName.Length() > 0);
-	TInt driveNumber = -1;
-	err = RFs::CharToDrive(driveName[0], driveNumber);
+    //
+    TInt driveNumber = -1;
+	err = RFs::CharToDrive(TheCmdLineParams.iDriveName[0], driveNumber);
 	TEST2(err, KErrNone);
 	TDriveNumber driveNo = static_cast <TDriveNumber> (driveNumber);
 	TDriveInfo driveInfo;
 	err = TheFs.Drive(driveInfo, driveNo);
 	TEST2(err, KErrNone);
     //Create the test directory
-	err = TheFs.MkDir(TheParse.DriveAndPath());
+	err = TheFs.MkDirAll(TheDbFileName);
 	TEST(err == KErrNone || err == KErrAlreadyExists);
     //Print drive info and the database name 
 	_LIT(KType1, "Not present");
@@ -130,7 +130,7 @@
 void CreateTestDb()
 	{
 	(void)RSqlDatabase::Delete(TheDbFileName);
-	TInt err = TheDb.Create(TheDbFileName);
+	TInt err = TheDb.Create(TheDbFileName, &TheSqlConfigString);
 	TEST2(err, KErrNone);
 	err = TheDb.Exec(_L8("CREATE TABLE A(B BLOB)"));
 	TEST2(err, 1);
@@ -531,7 +531,7 @@
 	(void)RSqlDatabase::Delete(TheDbFileName);	
 	}
 
-void DoReadBlobIncrL(TDes8& aDes)
+void DoReadBlobIncrL(TDes8& aDes, TInt aMaxLength)
 	{
 	TTime t1, t2, t3, t4;
 	
@@ -547,7 +547,7 @@
 	openTime = t2.MicroSecondsFrom(t1);
 		
 	t3.HomeTime();
-	strm.ReadL(aDes);
+	strm.ReadL(aDes, aMaxLength);
 	t4.HomeTime();
 
 	readTime = t4.MicroSecondsFrom(t3);
@@ -563,7 +563,7 @@
 	TEST(data != NULL);
 	TPtr8 dataptr = data->Des();
 	
-	TRAPD(err, DoReadBlobIncrL(dataptr));
+	TRAPD(err, DoReadBlobIncrL(dataptr, TheBlobSize));
 	TEST2(err, KErrNone);
 	TEST2(dataptr.Length(), TheBlobSize);
 	
@@ -661,7 +661,7 @@
 	t5.HomeTime();
 	err = strm.ColumnBinary(stmt, 0);
 	TEST2(err, KErrNone);
-	TRAP(err, strm.ReadL(dataptr));
+	TRAP(err, strm.ReadL(dataptr, TheBlobSize));
 	t6.HomeTime();
 	TEST2(err, KErrNone);
 	TEST2(dataptr.Length(), TheBlobSize);
@@ -746,6 +746,7 @@
 	const TInt KBufLen = 32768; // 32Kb
 	HBufC8* buf = HBufC8::NewL(KBufLen);
 	TPtr8 dataPtr =	buf->Des();
+	dataPtr.SetLength(KBufLen);
 	dataPtr.Fill('A', KBufLen);	
 	
 	CreateTestDb();
@@ -812,6 +813,7 @@
 	const TInt KBufLen = 32768; // 32Kb
 	HBufC8* buf = HBufC8::NewL(KBufLen);
 	TPtr8 dataPtr =	buf->Des();
+	dataPtr.SetLength(KBufLen);
 	dataPtr.Fill('A', KBufLen);	
 	
 	CreateTestDb();
@@ -889,6 +891,7 @@
 	TInt bufLen = TheBlobSize; 
 	HBufC8* buf = HBufC8::NewL(bufLen);
 	TPtr8 dataPtr =	buf->Des();
+	dataPtr.SetLength(bufLen);
 	dataPtr.Fill('Z', bufLen);	
 	
 	CreateTestDb();
@@ -953,6 +956,7 @@
 	TInt bufLen = TheBlobSize;
 	HBufC8* buf = HBufC8::NewL(bufLen);
 	TPtr8 dataPtr =	buf->Des();
+	dataPtr.SetLength(bufLen);
 	dataPtr.Fill('Z', bufLen);	
 	
 	CreateTestDb();
@@ -1024,6 +1028,7 @@
 	TInt bufLen = TheBlobSize; 
 	HBufC8* buf = HBufC8::NewL(bufLen);
 	TPtr8 dataPtr =	buf->Des();
+	dataPtr.SetLength(bufLen);
 	dataPtr.Fill('A', bufLen);	
 	
 	CreateTestDb();
@@ -1104,10 +1109,14 @@
 
 void DoTests()
 	{
-	TheTest.Start(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4084 SQL, BLOB write, performance tests\r\n"));
+	TheTestTitle.Format(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4084 SQL, BLOB write, performance tests, encoding: \"%S\", page size: %d\r\n"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+	TheTest.Start(TheTestTitle);
 	BlobWriteTest();
 	
-	TheTest.Next(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4085 SQL, BLOB read, performance tests\r\n"));
+	TheTestTitle.Format(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4085 SQL, BLOB read, performance tests, encoding: \"%S\", page size: %d\r\n"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+	TheTest.Next(TheTestTitle);
 	BlobReadTest();
 
 	TheTest.Printf(_L("==================================================================\r\n"));
@@ -1117,33 +1126,41 @@
 	
 	TheBlobSize = 1024 * 1024 + 128 * 1024;//1.125Mb 
 
-	TheTest.Next(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4115 SQL, sequential BLOB writes, performance tests\r\n"));
+	TheTestTitle.Format(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4115 SQL, sequential BLOB writes, performance tests, encoding: \"%S\", page size: %d\r\n"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+	TheTest.Next(TheTestTitle);
 	TRAPD(err, SequentialWriteTestL());
 	TEST2(err, KErrNone);
 	
-	TheTest.Next(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4116 SQL, transaction sequential BLOB writes, performance tests\r\n"));
+	TheTestTitle.Format(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4116 SQL, transaction sequential BLOB writes, performance tests, encoding: \"%S\", page size: %d\r\n"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+	TheTest.Next(TheTestTitle);
 	TRAP(err, TransSequentialWriteTestL());
 	TEST2(err, KErrNone);
 		
 	TheBlobSize = 256 * 1024 ; // 256Kb
 		
-	TheTest.Next(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4117 SQL, whole BLOB write, performance tests\r\n"));
+	TheTestTitle.Format(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4117 SQL, whole BLOB write, performance tests, encoding: \"%S\", page size: %d\r\n"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+	TheTest.Next(TheTestTitle);
 	TRAP(err, WholeWriteTestL());
 	TEST2(err, KErrNone);
 	
-	TheTest.Next(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4118 SQL, transaction whole BLOB write, performance tests\r\n"));
+	TheTestTitle.Format(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4118 SQL, transaction whole BLOB write, performance tests, encoding: \"%S\", page size: %d\r\n"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+	TheTest.Next(TheTestTitle);
 	TRAP(err, TransWholeWriteTestL());
 	TEST2(err, KErrNone);
 	
-	TheTest.Next(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4119 SQL, whole BLOB read, performance tests\r\n"));
+	TheTestTitle.Format(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4119 SQL, whole BLOB read, performance tests, encoding: \"%S\", page size: %d\r\n"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+	TheTest.Next(TheTestTitle);
 	TRAP(err, WholeReadTestL());
 	TEST2(err, KErrNone);
 	
 #endif//!defined __WINS__ && !defined __WINSCW__ && !defined _DEBUG
 	}
 
-//Usage: "t_sqlperformance2 [<drive letter>:]"
-
 TInt E32Main()
 	{
 	TheTest.Title();
@@ -1153,17 +1170,11 @@
 
 	__UHEAP_MARK;
 
-	User::CommandLine(TheCmd);
-	TheCmd.TrimAll();
-	if(TheCmd.Length() > 0)
-		{
-		TheDriveName.Copy(TheCmd);
-		}
+	GetCmdLineParamsAndSqlConfigString(TheTest, _L("t_sqlperformance2"), TheCmdLineParams, TheSqlConfigString);
+	_LIT(KDbName, "c:\\test\\t_sqlperformance2.db");
+	PrepareDbName(KDbName, TheCmdLineParams.iDriveName, TheDbFileName);
 
-	_LIT(KDbName, "c:\\test\\t_sqlperformance2.db");
-	TheParse.Set(TheDriveName, &KDbName, 0);
-	const TDesC& dbFilePath = TheParse.FullName();
-	TheDbFileName.Copy(dbFilePath);
+	TheTest.Printf(_L("==Databases: %S\r\n"), &TheDbFileName); 
 	
 	TestEnvInit();
 	DoTests();
--- a/persistentstorage/sql/TEST/t_sqlperformance3.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlperformance3.cpp	Tue May 25 14:35:19 2010 +0300
@@ -1,4 +1,4 @@
-// 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"
@@ -17,6 +17,7 @@
 #include <bautils.h>
 #include <hal.h>
 #include <sqldb.h>
+#include "t_sqlcmdlineutil.h"
 
 RTest 			TheTest(_L("t_sqlperformance3 test"));
 RSqlDatabase 	TheDb;
@@ -24,9 +25,12 @@
 _LIT(KDbName, 	"c:\\test\\t_sqlperformance3.db");
 
 TFileName		TheDbFileName;
-TBuf<256>  		TheCmd;
-TDriveName 		TheDriveName;
-TParse     		TheParse;
+TBuf<200> 		TheTestTitle;
+TCmdLineParams 	TheCmdLineParams(TCmdLineParams::EDbUtf16, 4096, 10000);
+TBuf8<200> 		TheSqlConfigString;
+
+_LIT(KUtf8,  "UTF8 ");
+_LIT(KUtf16, "UTF16");
 
 TInt TheFastCounterFreq = 0;
 
@@ -156,14 +160,13 @@
 
 void DoCreateDbFile()
 	{
-	_LIT8(KConfig, "page_size=4096;cache_size=10000;");
 	TUint32 fc1 = User::FastCounter();
-    TInt err = TheDb.Create(TheDbFileName, &KConfig);
+    TInt err = TheDb.Create(TheDbFileName, &TheSqlConfigString);
     if(err != KErrNone)
     	{
     	if(err == KErrAlreadyExists)
     		{
-    		err = TheDb.Open(TheDbFileName, &KConfig);
+    		err = TheDb.Open(TheDbFileName, &TheSqlConfigString);
     		if(err == KErrNone)
     			{
     			TUint32 fc2 = User::FastCounter();
@@ -1080,19 +1083,19 @@
 	{
 	CalcIterationsCount();
 	
-	TheTest.Start(_L("@SYMTestCaseID:PDS-SQL-UT-4149 Create database"));
+	TheTestTitle.Format(_L("@SYMTestCaseID:PDS-SQL-UT-4149 Create database, encoding: \"%S\", page size: %d\r\n"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+	TheTest.Start(TheTestTitle);
 	CreateDb();
 
-	TBuf<80> buf;
-	buf.Format(_L("@SYMTestCaseID:PDS-SQL-UT-4150 Harvest %d items"), KItemCnt);
-	TheTest.Next(buf);
+	TheTestTitle.Format(_L("@SYMTestCaseID:PDS-SQL-UT-4150 Harvest %d items, encoding: \"%S\", page size: %d\r\n"), 
+			KItemCnt, TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+	TheTest.Next(TheTestTitle);
 	Harvest();
 	
 	PrintResults();
 	}
 
-//Usage: "t_sqlperformance3 [<drive letter>:]"
-
 TInt E32Main()
 	{
 	TheTest.Title();
@@ -1101,17 +1104,11 @@
 	TheTest(tc != NULL);
 	
 	__UHEAP_MARK;
-	
-	User::CommandLine(TheCmd);
-	TheCmd.TrimAll();
-	if(TheCmd.Length() > 0)
-		{
-		TheDriveName.Copy(TheCmd);
-		}
-	TheParse.Set(TheDriveName, &KDbName, 0);
-	const TDesC& dbFilePath = TheParse.FullName();
-	TheDbFileName.Copy(dbFilePath);
-	TheTest.Printf(_L("==Database file name: %S\r\n"), &TheDbFileName);
+
+	GetCmdLineParamsAndSqlConfigString(TheTest, _L("t_sqlperformance3"), TheCmdLineParams, TheSqlConfigString);
+	PrepareDbName(KDbName, TheCmdLineParams.iDriveName, TheDbFileName);
+
+	TheTest.Printf(_L("==Databases: %S\r\n"), &TheDbFileName); 
 	
 	TestEnvDestroy();
 	TestEnvInit();
--- a/persistentstorage/sql/TEST/t_sqlperformance4.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlperformance4.cpp	Tue May 25 14:35:19 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-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"
@@ -17,6 +17,7 @@
 #include <bautils.h>
 #include <sqldb.h>
 #include <hal.h>
+#include "t_sqlcmdlineutil.h"
 
 ///////////////////////////////////////////////////////////////////////////////////////
 
@@ -27,11 +28,12 @@
 _LIT(KCDriveDatabase, "c:[a000017f]t_sqlperformance4.db");
 
 TFileName		TheDbFileName;
-TBuf<256>  		TheCmd;
-TDriveName 		TheDriveName;
-TParse     		TheParse;
+TBuf<200> TheTestTitle;
+TCmdLineParams TheCmdLineParams;
+TBuf8<200> TheSqlConfigString;
 
-_LIT8( KMCSqlConfig, "cache_size=1024; page_size=1024; " );
+_LIT(KUtf8,  "UTF8 ");
+_LIT(KUtf16, "UTF16");
 
 _LIT(KMusicCreateTable, "CREATE TABLE Music("
     L"UniqueId INTEGER PRIMARY KEY,"
@@ -194,14 +196,8 @@
  
 	TheTest.Printf(_L("Creating Database %S\n"),  &aDbName);
 		
-	TInt err = TheDbC.Create(aDbName, securityPolicy, &KMCSqlConfig);
-	
-	TBuf<64> tmp;
-	tmp.Copy(KMCSqlConfig);
-	tmp.Append(_L("\n"));
-	
-	TheTest.Printf(tmp);
-	
+	TInt err = TheDbC.Create(aDbName, securityPolicy, &TheSqlConfigString);
+
 	if (KErrAlreadyExists == err)
 		{
 		
@@ -210,7 +206,7 @@
         User::LeaveIfError(TheDbC.Delete(aDbName));
 
         // try again
-        err = TheDbC.Create(aDbName, securityPolicy, &KMCSqlConfig);
+        err = TheDbC.Create(aDbName, securityPolicy, &TheSqlConfigString);
 
 		}
 	
@@ -280,7 +276,7 @@
 	TEST2(sql.Length(), fileLen);
 	
 	//Open main database
-	err = TheDbC.Open(TheDbFileName);
+	err = TheDbC.Open(TheDbFileName, &TheSqlConfigString);
 	TEST2(err, KErrNone);
 	
 	TheTest.Printf(_L("Beginning INSERTS...\n"));
@@ -372,13 +368,13 @@
 
 void DoTests()
 	{
-	TheTest.Start(_L("@SYMTestCaseID:PDS-SQL-UT-4151; SQL Music Player Db Performance Test"));
+	TheTestTitle.Format(_L("@SYMTestCaseID:PDS-SQL-UT-4151; SQL Music Player Db Performance Test, encoding: \"%S\", page size: %d\r\n"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+	TheTest.Start(TheTestTitle);
 	
 	RunTest();
 	}
 
-//Usage: "t_sqlperformance4 [<drive letter>:]"
-
 TInt E32Main()
 	{
 	TheTest.Title();
@@ -388,16 +384,10 @@
 
 	__UHEAP_MARK;
 
-	User::CommandLine(TheCmd);
-	TheCmd.TrimAll();
-	if(TheCmd.Length() > 0)
-		{
-		TheDriveName.Copy(TheCmd);
-		}
-	TheParse.Set(TheDriveName, &KCDriveDatabase, 0);
-	const TDesC& dbFilePath = TheParse.FullName();
-	TheDbFileName.Copy(dbFilePath);
-	TheTest.Printf(_L("==Database file name: %S\r\n"), &TheDbFileName);
+	GetCmdLineParamsAndSqlConfigString(TheTest, _L("t_sqlperformance4"), TheCmdLineParams, TheSqlConfigString);
+	PrepareDbName(KCDriveDatabase, TheCmdLineParams.iDriveName, TheDbFileName);
+
+	TheTest.Printf(_L("==Databases: %S\r\n"), &TheDbFileName); 
 	
 	TestEnvInit();
 	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/sql/TEST/t_sqlperformance5.cpp	Tue May 25 14:35:19 2010 +0300
@@ -0,0 +1,421 @@
+// 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
+//
+#include <e32test.h>
+#include <e32math.h>
+#include <bautils.h>
+#include <hal.h>
+#include <sqldb.h>
+#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<KThumbnailCount;++i)
+		{
+		TUint32 fc1 = User::FastCounter();
+	
+		TInt paramIndex = aStmt1.ParameterIndex(_L(":Path"));
+		TEST(paramIndex >= 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<KThumbnailCount;++i)
+		{
+		dataToCommit += KThumbnailSizes[i]; 
+		}
+	TReal d = dataToCommit / 1024.0;
+	TheTest.Printf(_L("==dataToCommit=%d bytes (%8.2lf Mb)\r\n"), dataToCommit, d);
+	
+	TInt err = TheDb.Open(TheDbFileName, &TheSqlConfigString);
+	TEST2(err, KErrNone);
+
+	err = TheDb.Exec(_L("CREATE TEMP TABLE TempThumbnailInfo (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,ThumbFromPath INTEGER,Modified LARGEINT);"));
+	TEST(err >= 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;
+	}
--- a/persistentstorage/sql/TEST/t_sqlscalarfullselect.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlscalarfullselect.cpp	Tue May 25 14:35:19 2010 +0300
@@ -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"
@@ -321,6 +321,75 @@
 	DestroyTestDb(db);
 	}
 
+/**
+@SYMTestCaseID          PDS-SQL-CT-4204
+@SYMTestCaseDesc        TSqlScalarFullSelectQuery - border test.
+@SYMTestPriority        High
+@SYMTestActions         The test checks some border test cases such as:
+						- retrieving NULL column as integer;
+						- retrieving NULL column as 64-bit integer;
+						- retrieving NULL column as TReal;
+						- retrieving column value smaller than KMinTInt, as integer;
+						- retrieving column value bigger than KMaxTInt, as integer;
+@SYMTestExpectedResults Test must not fail
+*/  
+void ScalarFullSelectBorderTest()
+	{
+	(void)RSqlDatabase::Delete(KTestDatabase1);
+	RSqlDatabase db;
+	TInt rc = db.Create(KTestDatabase1);
+	TEST2(rc, KErrNone);
+	rc = db.Exec(_L("CREATE TABLE A(F1 INTEGER NULL, F2 INTEGER NULL, F3 FLOAT NULL, F4 TEXT NULL, F5 BLOB NULL)"));
+	TEST(rc >= 0);
+	
+	TSqlScalarFullSelectQuery q(db);
+
+	//Insert one record. Bigger than KMaxTInt F1 column value. Smaller than KMinTInt F2 column value.
+	rc = db.Exec(_L("INSERT INTO A(F1,F2,F4) VALUES(5000000000,-5000000000,'aljhsfdlgefberveurfgvefkjgs;kjfgs;kjfsd')"));
+	TEST2(rc, 1);
+	//Select NULL column value as int.
+	TInt res = -1;
+	TRAP(rc, res = q.SelectIntL(_L("SELECT F5 FROM A")));
+	TEST2(rc, KErrNone);
+	TEST2(res, 0);
+	//Select NULL column value as int64.
+	res = -1;
+	TRAP(rc, res = q.SelectInt64L(_L("SELECT F5 FROM A")));
+	TEST2(rc, KErrNone);
+	TEST2(res, 0);
+	//Select NULL column value as TReal.
+	TReal res2 = -1.0;
+	TRAP(rc, res2 = q.SelectRealL(_L("SELECT F5 FROM A")));
+	TEST2(rc, KErrNone);
+	TEST(Abs(res2) < 0.000001);
+	//Select NULL column value as text.
+	TBuf<10> text;
+	TRAP(rc, res = q.SelectTextL(_L("SELECT F5 FROM A"), text));
+	TEST2(rc, KErrNone);
+	TEST2(res, 0);
+	TEST2(text.Length(), 0);
+	//Select NULL column value as binary.
+	TBuf8<10> data;
+	TRAP(rc, res = q.SelectBinaryL(_L("SELECT F5 FROM A"), data));
+	TEST2(rc, KErrNone);
+	TEST2(res, 0);
+	TEST2(data.Length(), 0);
+	//Select column value bigger than KMaxTInt, as int.
+	res = -1;
+	TRAP(rc, res = q.SelectIntL(_L("SELECT F1 FROM A")));
+	TEST2(rc, KErrNone);
+	TEST2(res, KMaxTInt);
+	//Select column value smaller than KMinTInt, as int.
+	res = -1;
+	TRAP(rc, res = q.SelectIntL(_L("SELECT F2 FROM A")));
+	TEST2(rc, KErrNone);
+	TEST2(res, KMinTInt);
+
+	db.Close();
+	(void)RSqlDatabase::Delete(KTestDatabase1);
+	}
+	
+
 void DoTestsL()
 	{
 	TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-SQL-CT-1809 Scalar fullselect test. 16-bit SQL "));
@@ -334,6 +403,9 @@
 
 	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-SQL-CT-1810 Scalar fullselect - negative test. 8-bit SQL "));
 	ScalarFullSelectNegativeTestL< TBuf8<100> >();
+	
+	TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-CT-4204 Scalar fullselect - border cases "));
+	ScalarFullSelectBorderTest();
 	}
 
 TInt E32Main()
--- a/persistentstorage/sql/TEST/t_sqlsecurity6.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlsecurity6.cpp	Tue May 25 14:35:19 2010 +0300
@@ -112,6 +112,7 @@
 	__UHEAP_MARK;
 		
 	TRAPD(err, DoTestsL());
+	DestroyTestEnv();
 	TEST2(err, KErrNone);
 
 	__UHEAP_MARKEND;
--- a/persistentstorage/sql/TEST/testexecute/SQLite/config/Configuration.ini	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/TEST/testexecute/SQLite/config/Configuration.ini	Tue May 25 14:35:19 2010 +0300
@@ -26,7 +26,7 @@
 
 Function4=ScalarFullSelect
 Method4=SelectIntL
-Result4=1024
+Result4=DEFAULT_SOFT_HEAP_LIMIT
 Use_Set4=1
 Statement4=PRAGMA cache_size;
 Close5=
@@ -214,7 +214,7 @@
 
 Function4=ScalarFullSelect
 Method4=SelectIntL
-Result4=1024
+Result4=DEFAULT_SOFT_HEAP_LIMIT
 Use_Set4=1
 Statement4=PRAGMA cache_size;
 
@@ -257,7 +257,7 @@
 
 Function5=ScalarFullSelect
 Method5=SelectIntL
-Result5=1024
+Result5=DEFAULT_SOFT_HEAP_LIMIT
 Use_Set5=1
 Statement5=PRAGMA cache_size;
 
--- a/persistentstorage/sql/TEST/testexecute/SQLite/src/cdtest.cpp	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sql/TEST/testexecute/SQLite/src/cdtest.cpp	Tue May 25 14:35:19 2010 +0300
@@ -18,6 +18,13 @@
 #include "common.h"
 #include<bautils.h>
 
+//Constants taken from SqlSrvConfig.h
+#ifdef __WINSCW__
+		const TInt KDefaultSoftHeapLimitKb = 1024;
+#else
+		const TInt KDefaultSoftHeapLimitKb = 8192;
+#endif	
+
 // Includes any code required for 'Code-Driven' testing, generally tests
 // that cannot be data-driven (or not completely).
 
@@ -476,8 +483,17 @@
                 actual = asfs->SelectIntL(stmt8);
             else
                 actual = asfs->SelectIntL(stmt);
-            TInt expected;
-            conv.Val(expected);
+			
+			TInt expected;	
+			if (res.CompareF(_L("DEFAULT_SOFT_HEAP_LIMIT")) == 0)
+				{
+				expected = KDefaultSoftHeapLimitKb;
+				}
+			else
+				{
+				conv.Val(expected);
+				}
+				
             if( actual != expected )
                 {
                 SetTestStepResult(EFail);
--- a/persistentstorage/sqlite3api/GROUP/BLD.INF	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sqlite3api/GROUP/BLD.INF	Tue May 25 14:35:19 2010 +0300
@@ -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
--- a/persistentstorage/sqlite3api/GROUP/sqlite3tests.iby	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/sqlite3api/GROUP/sqlite3tests.iby	Tue May 25 14:35:19 2010 +0300
@@ -20,6 +20,8 @@
 
 REM SQLITE3
 
+#include <sqlite3.iby>
+
 #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
--- a/persistentstorage/store/ROM/StoreTests.IBY	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/store/ROM/StoreTests.IBY	Tue May 25 14:35:19 2010 +0300
@@ -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
--- a/persistentstorage/store/group/BLD.INF	Tue May 11 17:49:39 2010 +0300
+++ b/persistentstorage/store/group/BLD.INF	Tue May 25 14:35:19 2010 +0300
@@ -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