Exemplo n.º 1
0
/**
@SYMTestCaseID			SYSLIB-SQL-UT-4060
@SYMTestCaseDesc		Private database and compaction configuration test.
						The test verifies that a private database can be created using auto, background or 
						manual compaction mode and that the compaction mode does not chage after reopening 
						the database.
						The test also verifies that if the database is legacy, read-only, then the compaction
						mode is auto.
						The test also verifies that if the database is legacy, r/w, then the compaction
						mode will be changed from auto to background.
@SYMTestPriority		Medium
@SYMTestActions			Private database and compaction configuration test.
@SYMTestExpectedResults Test must not fail
@SYMREQ					REQ10273
                        REQ10274
                        REQ10400
                        REQ10402
*/
void CompactConfigTest5L()
	{
	//Create a private test database with "auto" compaction mode
	_LIT8(KConfigStr1, "encoding=utf-8;compaction=auto");
	TInt err = TheDb.Create(KTestPrivDbName, &KConfigStr1);
	TEST2(err, KErrNone);
	//Check the vacuum mode. The SQLite vacuum mode should be "auto"
	TSqlScalarFullSelectQuery scalarQuery(TheDb);
	TInt compact = scalarQuery.SelectIntL(_L("PRAGMA auto_vacuum"));
	TEST2(compact, KAutoVacuum);
	TheDb.Close();
	//Close and open the database again. The SQLite vacuum mode should be "auto".
	err = TheDb.Open(KTestPrivDbName);
	TEST2(err, KErrNone);
	scalarQuery.SetDatabase(TheDb);
	compact = scalarQuery.SelectIntL(_L("PRAGMA auto_vacuum"));
	TEST2(compact, KAutoVacuum);
	TheDb.Close();
	//Close and open the database again with a config string with "background" compaction mode. 
	//The SQLite vacuum mode should stay unchanged.
	_LIT8(KConfigStr2, "compaction=background");
	err = TheDb.Open(KTestPrivDbName, &KConfigStr2);
	TEST2(err, KErrNone);
	scalarQuery.SetDatabase(TheDb);
	compact = scalarQuery.SelectIntL(_L("PRAGMA auto_vacuum"));
	TEST2(compact, KAutoVacuum);
	TheDb.Close();
	//Delete database
	err = RSqlDatabase::Delete(KTestPrivDbName);
	TEST2(err, KErrNone);
	//Create a private test database - no config string
	err = TheDb.Create(KTestPrivDbName);
	TEST2(err, KErrNone);
	//Check the vacuum mode. The SQLite vacuum mode should be KSqlDefaultVacuum
	scalarQuery.SetDatabase(TheDb);
	compact = scalarQuery.SelectIntL(_L("PRAGMA auto_vacuum"));
	TEST2(compact, KSqlDefaultVacuum);
	TheDb.Close();
	//Close and open the database again. The SQLite vacuum mode should be KSqlDefaultVacuum.
	err = TheDb.Open(KTestPrivDbName);
	TEST2(err, KErrNone);
	scalarQuery.SetDatabase(TheDb);
	compact = scalarQuery.SelectIntL(_L("PRAGMA auto_vacuum"));
	TEST2(compact, KSqlDefaultVacuum);
	TheDb.Close();
	//Close and open the database again with a config string with "auto" compaction mode. 
	//The SQLite vacuum mode should stay unchanged.
	err = TheDb.Open(KTestPrivDbName, &KConfigStr1);
	TEST2(err, KErrNone);
	scalarQuery.SetDatabase(TheDb);
	compact = scalarQuery.SelectIntL(_L("PRAGMA auto_vacuum"));
	TEST2(compact, KSqlDefaultVacuum);
	TheDb.Close();
	//Delete database
	err = RSqlDatabase::Delete(KTestPrivDbName);
	TEST2(err, KErrNone);
	//Open an existing private database that is read-only (on drive Z:)
	err = TheDb.Open(KTestPrivDbNameZ, &KConfigStr1);
	TEST2(err, KErrNone);
	//Check the vacuum mode. The SQLite compact mode should be "auto" (this is an old database (pre-"background compact" era))
	scalarQuery.SetDatabase(TheDb);
	compact = scalarQuery.SelectIntL(_L("PRAGMA auto_vacuum"));
	TEST2(compact, KAutoVacuum);
	TheDb.Close();
	//Open the same database after copying it to drive C: (r/w private database). The compaction mode should change from auto to background.
	RFs fs;
	err = fs.Connect();
	TEST2(err, KErrNone);
	CFileMan* fm = CFileMan::NewL(fs);
	TEST(fm != NULL);
	err = fm->Copy(KTestPrivDbNameZ, KTestPrivDbNameC);
	TEST2(err, KErrNone);
	//"Copy" operation executed without errors. Now it is a time to turn off the read-only
	//flag of the target file (which may be on if the source file is on a read-only drive)
	err = fs.SetAtt(KTestPrivDbNameC, 0, KEntryAttReadOnly);
	TEST2(err, KErrNone);
	delete fm;
	fs.Close();
	err = TheDb.Open(KTestPrivDbNameC);
	TEST2(err, KErrNone);
	scalarQuery.SetDatabase(TheDb);
	compact = scalarQuery.SelectIntL(_L("PRAGMA auto_vacuum"));
	TEST2(compact, KSqlDefaultVacuum);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestPrivDbNameC);
	}
Exemplo n.º 2
0
/**
@SYMTestCaseID			SYSLIB-SQL-UT-4061
@SYMTestCaseDesc		Secure shared database and compaction configuration test.
						The test verifies that a secure shared database can be created using auto, background or 
						manual compaction mode and that the compaction mode does not chage after reopening 
						the database.
@SYMTestPriority		Medium
@SYMTestActions			Secure shared database and compaction configuration test.
@SYMTestExpectedResults Test must not fail
@SYMREQ					REQ10273
                        REQ10274
                        REQ10400
                        REQ10402
*/
void CompactConfigTest6L()
	{
	//Create a secure test database with "auto" compaction mode.
	RSqlSecurityPolicy securityPolicy = CreateTestSecurityPolicy();
	_LIT8(KConfigStr1, "encoding=utf-8;compaction=auto");
	TInt err = TheDb.Create(KTestSecureDbName, securityPolicy, &KConfigStr1);
	TEST2(err, KErrNone);
	securityPolicy.Close();
	TheDb.Close();
	//Check the vacuum mode. The SQLite vacuum mode should be "auto"
	TestCompactMode(KAutoVacuum);
	//Close and open the database again. The SQLite vacuum mode should be "auto".
	err = TheDb.Open(KTestSecureDbName);
	TEST2(err, KErrNone);
	TheDb.Close();
	TestCompactMode(KAutoVacuum);
	//Close and open the database again with a config string with "background" compaction mode. 
	//The SQLite vacuum mode should stay unchanged.
	_LIT8(KConfigStr2, "compaction=background");
	err = TheDb.Open(KTestSecureDbName, &KConfigStr2);
	TEST2(err, KErrNone);
	TheDb.Close();
	TestCompactMode(KAutoVacuum);
	//Delete database
	err = RSqlDatabase::Delete(KTestSecureDbName);
	TEST2(err, KErrNone);
	//Create a private test database - no config string
	securityPolicy = CreateTestSecurityPolicy();
	err = TheDb.Create(KTestSecureDbName, securityPolicy);
	TEST2(err, KErrNone);
	securityPolicy.Close();
	TheDb.Close();
	//Check the vacuum mode. The SQLite vacuum mode should be KSqlDefaultVacuum.
	TestCompactMode(KSqlDefaultVacuum);
	//Close and open the database again. The SQLite vacuum mode should be KSqlDefaultVacuum.
	err = TheDb.Open(KTestSecureDbName);
	TEST2(err, KErrNone);
	TheDb.Close();
	TestCompactMode(KSqlDefaultVacuum);
	//Close and open the database again with a config string with "auto" compaction mode. 
	//The SQLite vacuum mode should stay unchanged.
	err = TheDb.Open(KTestSecureDbName, &KConfigStr1);
	TEST2(err, KErrNone);
	TheDb.Close();
	TestCompactMode(KSqlDefaultVacuum);
	//Delete database
	err = RSqlDatabase::Delete(KTestSecureDbName);
	TEST2(err, KErrNone);
	}
Exemplo n.º 3
0
/**
@SYMTestCaseID          PDS-SQL-UT-4152
@SYMTestCaseDesc		Test for DEF142305 - RSqlDatabase::Attach does not use cache_size configuration parameters.
						The test verifies that when a database is attached, the attached database cache size will be set
						based on the page size, soft heap limit and default cache size.
@SYMTestPriority        High
@SYMTestActions			Test for DEF142305 - RSqlDatabase::Attach does not use cache_size configuration parameters.
@SYMTestExpectedResults The test must not fail.
@SYMDEF INC106788
*/
void DEF142305()
	{
	_LIT8(KConfig, "cache_size=500");
	
	//Create main db
	TInt err = TheDb.Create(KTestDbName, &KConfig);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, 500, KDefaultPageSize, KDefaultEncoding);
	TheDb.Close();
	
	//Create non-secure db that will be attached 
	err = TheDb.Create(KTestDbName2, &KConfig);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, 500, KDefaultPageSize, KDefaultEncoding);
	TheDb.Close();

	//Create private db that will be attached 
	_LIT8(KConfig2, "page_size=2048");
	err = TheDb.Create(KTestDbName4, &KConfig2);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, (TSqlSrvConfigParams::KDefaultSoftHeapLimitKb * 1024) / 2048, 2048, KDefaultEncoding);//2048? - see KConfig2 string
	TheDb.Close();

	_LIT(KAttachDbName, "Attached");
	
	//Attach non-secure db
	err = TheDb.Open(KTestDbName, &KConfig);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, 500, KDefaultPageSize, KDefaultEncoding);
	err = TheDb.Attach(KTestDbName2, KAttachDbName);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, KDefaultCacheSize, KDefaultPageSize, KDefaultEncoding, KAttachDbName);
	err = TheDb.Detach(KAttachDbName);
	TEST2(err, KErrNone);
	TheDb.Close();
	
	//Attach private db
	err = TheDb.Open(KTestDbName, &KConfig);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, 500, KDefaultPageSize, KDefaultEncoding);
	err = TheDb.Attach(KTestDbName4, KAttachDbName);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, (TSqlSrvConfigParams::KDefaultSoftHeapLimitKb * 1024) / 2048, 2048, KDefaultEncoding, KAttachDbName);//2048? - see KConfig2 string
	err = TheDb.Detach(KAttachDbName);
	TEST2(err, KErrNone);
	TheDb.Close();
	
	(void)RSqlDatabase::Delete(KTestDbName4);
	(void)RSqlDatabase::Delete(KTestDbName2);
	(void)RSqlDatabase::Delete(KTestDbName);
	}
Exemplo n.º 4
0
/**
@SYMTestCaseID			SYSLIB-SQL-UT-3439
@SYMTestCaseDesc		Test for DEF105928 "SQL server ignores config string parameters".
						The test creates two databases using configuration strings and checks that database 1
						configuration has no impact on database 2 configuration.
@SYMTestPriority		High
@SYMTestActions			Test for DEF105928 "SQL server ignores config string parameters".
@SYMTestExpectedResults The test must not fail
@SYMDEF					DEF105928
*/
void CfgCrossConnectionTest()
	{
	//Create database 1 with cache size = 40, page size = 2048.
	_LIT8(KCfgStr1, "cache_size = 40; page_size = 2048");
	TInt err = TheDb.Create(KTestDbName, &KCfgStr1);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, 40, 2048, KDefaultEncoding);
	//Without closing database 1, create database 2 without a configuration string.
	//Check that database 2 uses the default configuration parameters
	err = TheDb2.Create(KTestDbName2);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb2, KDefaultCacheSize, KDefaultPageSize, KDefaultEncoding);
	//Close database 2. Check the configuration parameters of database 1
	TheDb2.Close();
	AssertConfigPrmValues(TheDb, 40, 2048, KDefaultEncoding);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName2);
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create 2 databases with different configuration parameters
	_LIT8(KCfgStr2_1, "cache_size = 50; page_size = 512; encoding = \"UTF-16\"");
	_LIT8(KCfgStr2_2, "cache_size = 80; page_size = 4096; encoding = \"UTF-8\"");
	err = TheDb.Create(KTestDbName, &KCfgStr2_1);
	TEST2(err, KErrNone);
	err = TheDb2.Create(KTestDbName2, &KCfgStr2_2);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, 50, 512, TSqlSrvConfigParams::EEncUtf16);
	AssertConfigPrmValues(TheDb2, 80, 4096, TSqlSrvConfigParams::EEncUtf8);
	TheDb2.Close();
	TheDb.Close();
	//Reopen the databases and check the configuration parameters
	err = TheDb.Open(KTestDbName);
	TEST2(err, KErrNone);
	err = TheDb2.Open(KTestDbName2);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, (TSqlSrvConfigParams::KDefaultSoftHeapLimitKb * 1024) / 512, 512, TSqlSrvConfigParams::EEncUtf16);
	AssertConfigPrmValues(TheDb2, (TSqlSrvConfigParams::KDefaultSoftHeapLimitKb * 1024) / 4096, 4096, TSqlSrvConfigParams::EEncUtf8);
	TheDb2.Close();
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName2);
	(void)RSqlDatabase::Delete(KTestDbName);
	}
Exemplo n.º 5
0
/**
@SYMTestCaseID			SYSLIB-SQL-UT-3438
@SYMTestCaseDesc		Test for DEF105928 "SQL server ignores config string parameters".
						The test attempts to create a database with configuration string containing:
						negative or zero page size and cache size, too small or too big page size,
						page size, not power of two. The test expects the SQL server will detect those 
						invalid page size and cache size values and will refuse to execute the operation.
@SYMTestPriority		High
@SYMTestActions			Test for DEF105928 "SQL server ignores config string parameters".
@SYMTestExpectedResults The test must not fail
@SYMDEF					DEF105928
*/
void CfgInvalidCacheAndPageSizeTest()
	{
	//Create a database. Page size < 512.
	_LIT8(KCfgStr1, "page_size=128;");
	TInt err = TheDb.Create(KTestDbName, &KCfgStr1);
	TEST2(err, KErrNone);//Invalid page size: KErrNone expected, but the page size will not be set
	AssertConfigPrmValues(TheDb, KDefaultCacheSize, KDefaultPageSize, KDefaultEncoding);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. Page size > 32768.
	_LIT8(KCfgStr2, "page_size=65535;");
	err = TheDb.Create(KTestDbName, &KCfgStr2);
	TEST2(err, KErrNone);//Invalid page size: KErrNone expected, but the page size will not be set
	AssertConfigPrmValues(TheDb, KDefaultCacheSize, KDefaultPageSize, KDefaultEncoding);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. Page size is not power of two.
	_LIT8(KCfgStr3, "page_size=5000;");
	err = TheDb.Create(KTestDbName, &KCfgStr3);
	TEST2(err, KErrNone);//Invalid page size: KErrNone expected, but the page size will not be set
	AssertConfigPrmValues(TheDb, KDefaultCacheSize, KDefaultPageSize, KDefaultEncoding);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. Zero cache size.
	_LIT8(KCfgStr4, "cache_size=0");
	err = TheDb.Create(KTestDbName, &KCfgStr4);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, 0, KDefaultPageSize, KDefaultEncoding);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. Negative cache size.
	_LIT8(KCfgStr5, "cache_size=-32");
	err = TheDb.Create(KTestDbName, &KCfgStr5);
	TEST2(err, KErrArgument);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. Zero page size.
	_LIT8(KCfgStr6, "page_size=0");
	err = TheDb.Create(KTestDbName, &KCfgStr6);
	TEST2(err, KErrNone);//Invalid page size: KErrNone expected, but the page size will not be set
	AssertConfigPrmValues(TheDb, KDefaultCacheSize, KDefaultPageSize, KDefaultEncoding);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. Negative page size.
	_LIT8(KCfgStr7, "page_size=-1024");
	err = TheDb.Create(KTestDbName, &KCfgStr7);
	TEST2(err, KErrArgument);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	}
Exemplo n.º 6
0
/**
@SYMTestCaseID			SYSLIB-SQL-UT-3437
@SYMTestCaseDesc		Test for DEF105928 "SQL server ignores config string parameters".
						The test attempts to create/open a database using invalid configuration strings,
						too long configuration string, string with missing parameter values, string with
						invalid database encodings. The test expects the SQL server will report a failure
						and will refuse to execute the operation.
@SYMTestPriority		High
@SYMTestActions			Test for DEF105928 "SQL server ignores config string parameters".
@SYMTestExpectedResults The test must not fail
@SYMDEF					DEF105928
*/
void CfgNegativeTest()
	{
	//Create a database. Spelling problem in the parameter name. This is not reported as an error by the SQL server
	//(treated as unknown parameter)
	_LIT8(KCfgStr1, "casche_size = 32");
	TInt err = TheDb.Create(KTestDbName, &KCfgStr1);
	TEST2(err, KErrNone);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. Spelling problem in the parameter value. 
	_LIT8(KCfgStr2, "encoding = UTF-32");
	err = TheDb.Create(KTestDbName, &KCfgStr2);
	TEST2(err, KErrNone);//Invalid encoding: KErrNone, but the encoding will not be used
	AssertConfigPrmValues(TheDb, KDefaultCacheSize, KDefaultPageSize, KDefaultEncoding);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. Invalid config string.
	_LIT8(KCfgStr3, "dfgjkdfgkdfk; sfkgjhdfgjkdfk; dfgdfetrwer");
	err = TheDb.Create(KTestDbName, &KCfgStr3);
	TEST2(err, KErrArgument);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. Too long and invalid config string.
	_LIT8(KCfgStr4, "A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J123456789K123456789L123456789M123456789N123456789O123456789");
	err = TheDb.Create(KTestDbName, &KCfgStr4);
	TEST2(err, KErrArgument);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. No parameter value - 1.
	_LIT8(KCfgStr5, "page_size=");
	err = TheDb.Create(KTestDbName, &KCfgStr5);
	TEST2(err, KErrArgument);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. No parameter value - 2.
	_LIT8(KCfgStr6, "page_size=;");
	err = TheDb.Create(KTestDbName, &KCfgStr6);
	TEST2(err, KErrArgument);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. Non-number parameter value - 1.
	_LIT8(KCfgStr7, "page_size=aaa;");
	err = TheDb.Create(KTestDbName, &KCfgStr7);
	TEST2(err, KErrArgument);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. Non-number parameter value - 2.
	_LIT8(KCfgStr8, "cache_size=weyu34;");
	err = TheDb.Create(KTestDbName, &KCfgStr8);
	TEST2(err, KErrArgument);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. "soft_heap_limit_kb" in the config string.
	_LIT8(KCfgStr9, "soft_heap_limit_kb=512;");
	err = TheDb.Create(KTestDbName, &KCfgStr9);
	TEST2(err, KErrArgument);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. "free_space_threshold_kb" in the config string.
	_LIT8(KCfgStr10, "free_space_threshold_kb=256;");
	err = TheDb.Create(KTestDbName, &KCfgStr10);
	TEST2(err, KErrArgument);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	}
Exemplo n.º 7
0
/**
@SYMTestCaseID			SYSLIB-SQL-UT-3436
@SYMTestCaseDesc		Test for DEF105928 "SQL server ignores config string parameters".
						The test attempts to create/open a database using different cache size/page size/
						database encoding configurations and then checks that the configuration parameters
						have been set properly and have the expected values.
@SYMTestPriority		High
@SYMTestActions			Test for DEF105928 "SQL server ignores config string parameters".
@SYMTestExpectedResults The test must not fail
@SYMDEF					DEF105928
*/
void CfgFunctionalTest()
	{
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. No config string. The default config parameters will be used.
	TInt err = TheDb.Create(KTestDbName);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, KDefaultCacheSize, KDefaultPageSize, KDefaultEncoding);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. Cache size set.
	_LIT8(KCfgStr1, "cache_size=32");
	err = TheDb.Create(KTestDbName, &KCfgStr1);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, 32, KDefaultPageSize, KDefaultEncoding);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. Page size set.
	_LIT8(KCfgStr2, "page_size=2048");
	err = TheDb.Create(KTestDbName, &KCfgStr2);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, (TSqlSrvConfigParams::KDefaultSoftHeapLimitKb * 1024) / 2048, 2048, KDefaultEncoding);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. Cache & Page size set.
	_LIT8(KCfgStr3, "cache_size=256;page_size=4096");
	err = TheDb.Create(KTestDbName, &KCfgStr3);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, 256, 4096, KDefaultEncoding);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. Cache size & Page size & db encoding set.
	_LIT8(KCfgStr4, "cache_size=512;page_size=512;encoding=UTF-8");
	err = TheDb.Create(KTestDbName, &KCfgStr4);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, 512, 512, TSqlSrvConfigParams::EEncUtf8);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. Cache size & Page size & db encoding set.
	_LIT8(KCfgStr5, "cache_size=16;page_size=1024;encoding=UTF-16");
	err = TheDb.Create(KTestDbName, &KCfgStr5);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, 16, 1024, TSqlSrvConfigParams::EEncUtf16);
	TheDb.Close();
	//Open the database. Cache size set. The rest of parameter values must be the same as for KCfgStr5.
	_LIT8(KCfgStr6, "cache_size=80");
	err = TheDb.Open(KTestDbName, &KCfgStr6);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, 80, 1024, TSqlSrvConfigParams::EEncUtf16);
	TheDb.Close();
	//Open the database. Attempt to set the page size (impossible when opening a database).
	_LIT8(KCfgStr7, "page_size=2048");
	err = TheDb.Open(KTestDbName, &KCfgStr7);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, KDefaultCacheSize, 1024, TSqlSrvConfigParams::EEncUtf16);
	TheDb.Close();
	//Open the database. Attempt to set the encoding (impossible when opening a database).
	_LIT8(KCfgStr8, "encoding=UTF-8");
	err = TheDb.Open(KTestDbName, &KCfgStr8);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, KDefaultCacheSize, 1024, TSqlSrvConfigParams::EEncUtf16);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. Empty config string - 1
	_LIT8(KCfgStr9, "");
	err = TheDb.Create(KTestDbName, &KCfgStr9);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, KDefaultCacheSize, KDefaultPageSize, KDefaultEncoding);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. Empty config string - 2
	_LIT8(KCfgStr10, "       ");
	err = TheDb.Create(KTestDbName, &KCfgStr10);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, KDefaultCacheSize, KDefaultPageSize, KDefaultEncoding);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	//Create a database. Empty config string - 3
	_LIT8(KCfgStr11, " ; ;   ;;   ");
	err = TheDb.Create(KTestDbName, &KCfgStr11);
	TEST2(err, KErrNone);
	AssertConfigPrmValues(TheDb, KDefaultCacheSize, KDefaultPageSize, KDefaultEncoding);
	TheDb.Close();
	(void)RSqlDatabase::Delete(KTestDbName);
	}