336 //Initialise the file data object |
336 //Initialise the file data object |
337 iFileData.InitL(fs, TDriveUnit(sysDrive).Name(), serverPrivatePath, parse.FullName(), iDbConfigFiles); |
337 iFileData.InitL(fs, TDriveUnit(sysDrive).Name(), serverPrivatePath, parse.FullName(), iDbConfigFiles); |
338 |
338 |
339 //Set the soft heap limit (iFileData.ConfigParams() returns now a reference to the config file params, including the soft heap limit, if set) |
339 //Set the soft heap limit (iFileData.ConfigParams() returns now a reference to the config file params, including the soft heap limit, if set) |
340 const TSqlSrvConfigParams& configParams = iFileData.ConfigParams(); |
340 const TSqlSrvConfigParams& configParams = iFileData.ConfigParams(); |
341 if(configParams.iSoftHeapLimitKb > 0) |
341 __ASSERT_DEBUG(configParams.iSoftHeapLimitKb >= TSqlSrvConfigParams::KMinSoftHeapLimitKb && |
342 { |
342 configParams.iSoftHeapLimitKb <= TSqlSrvConfigParams::KMaxSoftHeapLimitKb, __SQLPANIC(ESqlPanicInternalError)); |
343 __ASSERT_DEBUG(configParams.iSoftHeapLimitKb >= TSqlSrvConfigParams::KMinSoftHeapLimitKb && |
343 sqlite3_soft_heap_limit(configParams.iSoftHeapLimitKb * 1024); |
344 configParams.iSoftHeapLimitKb <= TSqlSrvConfigParams::KMaxSoftHeapLimitKb, __SQLPANIC(ESqlPanicInternalError)); |
|
345 sqlite3_soft_heap_limit(configParams.iSoftHeapLimitKb * 1024); |
|
346 } |
|
347 //Enable shared cache |
344 //Enable shared cache |
348 (void)sqlite3SymbianLastOsError();//clear last OS error |
345 (void)sqlite3SymbianLastOsError();//clear last OS error |
349 TInt err = sqlite3_enable_shared_cache(static_cast <TInt> (EEnableSharedCache)); |
346 TInt err = sqlite3_enable_shared_cache(static_cast <TInt> (EEnableSharedCache)); |
350 __SQLLEAVE_IF_ERROR(::Sql2OsErrCode(err, sqlite3SymbianLastOsError())); |
347 __SQLLEAVE_IF_ERROR(::Sql2OsErrCode(err, sqlite3SymbianLastOsError())); |
351 //Create an empty "drive space" collection |
348 //Create an empty "drive space" collection |