diff -r 04ec7606545c -r fcc16690f446 persistentstorage/sql/TEST/t_sqlapi2.cpp --- 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();