os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/config/APIBasic2.ini
First public contribution.
2 // Called by BasicSQL2.script.
3 // Tests that a transaction which is not completed is visible to a EReadUncommitted
4 // session and simultaneously (so a bit of concurrency), not visible
5 // to a EReadSerializable session.
7 // Set up a new database.
10 Delete1=C:\Transaction0.db
11 ExpectedError1=KErrNotFound
12 Create2=C:\Transaction0.db
13 Exec3=Create Table Curtab(f1 int primary key, f2 real, f3 text);
14 Prepare4=Insert into Curtab(f1, f2, f3) values(:mary, :mungo, :midge);
16 ParameterIndex6=:mungo
17 ParameterIndex7=:midge
20 BindText10=2,Here's some text
24 // At this point one record outside of a transaction is present.
27 Exec15=Begin Transaction;
28 Prepare16=Insert into Curtab(f1, f2, f3) values(:mary, :mungo, :midge);
29 ParameterIndex17=:mary
30 ParameterIndex18=:mungo
31 ParameterIndex19=:midge
33 BindReal21=1,7.0710678
34 BindText22=2,Here's yet more text
38 BindReal26=1,182282.397
39 BindText27=2,I want chocolate. Now.
43 BindReal31=1,-1.60217733e-19
44 BindText32=2,Now I want ice-cream.
48 // At this point we've added one row outside of the transaction and 3 more
49 // within it. Send a signal to the slave threads which will check for the
50 // above content (one is ESerializable, one is EReadUncommitted, so they'll
51 // see different content).
52 // Wake up 2 threads..
54 // Wait for two signals to show they've finished..
60 // ESerializable thread.
63 // Wait until the db has been setup.
65 Open2=C:\Transaction0.db
66 SetIsolationLevel3=ESerializable
67 Prepare4=Select * from Curtab;
72 ExpectedError8=KSqlErrLocked
80 // Wait until the db has been setup.
82 Open2=C:\Transaction0.db
83 SetIsolationLevel3=EReadUncommitted
84 Prepare4=Select * from Curtab;
90 ColumnReal10=1,6.0827626
91 ColumnTextL11=2,Here's some text
94 ColumnReal14=1,7.0710678
95 ColumnTextL15=2,Here's yet more text
98 ColumnReal18=1,182282.397
99 ColumnTextL19=2,I want chocolate. Now.
101 ColumnInt21=0,7070707
102 ColumnReal22=1,-1.60217733e-19
103 ColumnTextL23=2,Now I want ice-cream.
110 [CheckFollowingRollback]
111 Open0=C:\Transaction0.db
114 Prepare3=Select * from Curtab;
120 ColumnReal9=1,6.0827626
121 ColumnTextL10=2,Here's some text
125 Delete14=C:\Transaction0.db
129 // Create some cells with text in. Copy these with streams - passing
130 // an RSqlColumnReadStream to an RSqlParamWriteStream.
131 [CopyCellsWithStreams]
132 Delete0=C:\CopyCells.db
133 ExpectedError0=KErrNotFound
134 Create1=C:\CopyCells.db
135 Exec2=Create table Table1(field1 text(50));
136 Exec3=Create table Table2(field1 text(50));
138 Exec4=Insert Into Table1(field1) values("We're going to copy this string");
139 Exec5=Insert Into Table1(field1) values("And this one");
140 Exec6=Insert Into Table1(field1) values("In fact, all of them. There's a loop");
142 // This is used to select the field we want to copy.
143 Prepare7=select field1 from Table1;
146 // This will copy the first cell into a new one (using a separate
147 // RSqlStatement object). The two lines below define values for the separate
148 // RSqlStatement to use.
149 Function9=CopyCellsUsingStreams
150 PrepareStatement=Insert into Table2(field1) values(:mob);
153 // Close Prepare6 and read back the content of Table2 to see if the cell
156 Prepare11=select field1 from Table2;
159 ColumnTextL14=0,We're going to copy this string
161 ColumnTextL16=0,And this one
163 ColumnTextL18=0,In fact, all of them. There's a loop
166 // Shut down our RSqlStatement and RSqlDatabase resources.
169 Delete22=C:\CopyCells.db
172 // A separate test, here we bind the content of one file (to an integer
173 // field actually, but SQLite doesn't care about that), then we bind the
174 // content of another before performing the exec/reset. So which data
175 // ends up in the cell? The data from the second bind.
177 Delete0=C:\GenerateErrors2.db
178 ExpectedError0=KErrNotFound
179 Create1=C:\GenerateErrors2.db
180 Exec2=Create Table Table1(Field1 int);
181 Prepare3=Insert into Table1(Field1) Values (:Mickey);
182 ParameterIndex4=:Mickey
183 StreamWriteBindText5=0,Z:\TEF_SQL\TestData\reference1.bin
184 StreamWriteBindText6=0,Z:\TEF_SQL\TestData\reference1.txt
188 Prepare10=select * from Table1;
191 ColumnTextL13=0,Z:\TEF_SQL\TestData\reference1.txt
194 Delete16=C:\GenerateErrors2.db
198 // Test the 'leaving' version of Create, Prepare and Open, also see what
199 // happens if you try creating a database on ROM..
202 ExpectedError0=KErrNotFound
204 ExpectedError1=KErrNotFound
205 CreateL2=C:\Leave1.db
206 Exec3=Create table Leavetable(f1 text(50), f2 int, f3 real);
207 PrepareL4=Insert into Leavetable values(:wonka, :charlie, :joe);
208 ParameterIndex5=:wonka
209 ParameterIndex6=:charlie
211 BindText8=0,Great Glass Elevator
216 BindText13=0,Chocolate Factory
222 PrepareL19=select * from Leavetable;
228 ColumnTextL25=0,Great Glass Elevator
230 ColumnReal27=2,1.23456
232 ColumnTextL29=0,Chocolate Factory
234 ColumnReal31=2,9.87654
239 CreateL35=C:\Leave1.db
240 ExpectedError35=KErrAlreadyExists
241 Delete36=C:\Leave1.db
242 CreateL37=Z:\TEF_SQL\TestData\ReadOnly.db
243 ExpectedError37=KErrAlreadyExists
244 CreateL38=Z:\TEF_SQL\TestData\DoesntExist.db
245 ExpectedError38=KErrAccessDenied
248 // Create (and implicitly open) a database, then another, then another, etc.
249 // This actually isn't supposed to generate errors.
250 // This leaks memory, normally the programmer would be expected to close
251 // each of the databases before opening another, but we're explicitly
252 // checking that successive Opens/Creates give no error.
255 ExpectedError0=KErrNotFound
257 ExpectedError1=KErrNotFound
259 ExpectedError2=KErrNotFound
261 ExpectedError3=KErrNotFound
263 ExpectedError4=KErrNotFound
267 OpenL7=Z:\TEF_SQL\TestData\test1.db
273 ExpectedError11=KErrInUse
275 ExpectedError12=KErrInUse
277 ExpectedError13=KErrInUse
279 ExpectedError14=KErrInUse
281 ExpectedError15=KErrInUse
285 Open18=Z:\TEF_SQL\TestData\ReadOnly.db
286 OpenL19=Z:\TEF_SQL\TestData\test1.db
287 Open20=Z:\TEF_SQL\TestData\ReadOnly.db
288 NoOperation21=10000000
295 // First set up a table.
296 Delete2=C:\ExtraBindTest.db
297 ExpectedError2=KErrNotFound
298 Create3=C:\ExtraBindTest.db
299 Exec4=Create table Sometable(Someint int, Somereal real, Sometext text);
300 Prepare5=Insert into Sometable(Someint, Somereal, Sometext) values (:FInt, :FReal, :FText);
301 Function6=WriteBigTable
306 Text=Here's some rather pointless text
307 EventuallyExpectedError=KErrNone
309 // Now try a non-trivial select. Ok then, fairly trivial, ;-)
310 Prepare8=Select * from Sometable where Someint > :Brian;
311 ParameterIndex9=:Brian
314 ColumnIndex12=Someint
315 ColumnIndex13=Somereal
316 ColumnIndex14=Sometext
319 ColumnTextL17=2,Here's some rather pointless text
323 ColumnTextL21=2,Here's some rather pointless text
327 Delete25=C:\ExtraBindTest.db
333 Delete2=C:\ExtraBindTest2.db
334 ExpectedError2=KErrNotFound
335 Create3=C:\ExtraBindTest2.db
336 Exec4=Create table Sometable(Someint int, Somereal real, Sometext text);
337 Prepare5=Insert into Sometable(Sometext) values (:FText);
338 ParameterIndex6=:FText
339 NewBlock7=WriteInts20
342 NewBlock10=WriteInts21
345 NewBlock13=WriteInts22
348 NewBlock16=WriteInts400
352 Prepare20=Select * from Sometable;
353 ColumnIndex21=Sometext
363 // MUST close the Statement or confusion ensues!!
365 Prepare32=Select Sometext from Sometable where Sometext=:Block
366 ParameterIndex33=:Block
367 // We're trying to recover one of the blocks. This function does a bind..
368 NewBlock34=WriteInts21
370 ColumnIndex36=Sometext
375 Delete41=C:\ExtraBindTest2.db
379 Function0=WriteIntsToStream
383 Function0=WriteIntsToStream
387 Function0=WriteIntsToStream
391 Function0=WriteIntsToStream