os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/config/APIBasic2-8S.ini
First public contribution.
2 // Called by BasicSQL2-8S.script.
3 // Duplicates BasicSQL2.script/APIBasic2.ini but uses 8-bit methods (Prepare
4 // and Exec) and asynchronous methods rather than the usual synchronous
7 // Tests that a transaction which is not completed is visible to a EReadUncommitted
8 // session and simultaneously (so a bit of concurrency), not visible
9 // to a EReadSerializable session.
11 // Set up a new database.
16 Delete3=C:\Transaction0.db
17 ExpectedError3=KErrNotFound
18 Create4=C:\Transaction0.db
19 Exec5=Create Table Curtab(f1 int primary key, f2 real, f3 text);
20 Prepare6=Insert into Curtab(f1, f2, f3) values(:mary, :mungo, :midge);
22 ParameterIndex8=:mungo
23 ParameterIndex9=:midge
25 BindReal11=1,6.0827626
26 BindText12=2,Here's some text
30 // At this point one record outside of a transaction is present.
32 Exec16=Begin Transaction;
33 Prepare17=Insert into Curtab(f1, f2, f3) values(:mary, :mungo, :midge);
34 ParameterIndex18=:mary
35 ParameterIndex19=:mungo
36 ParameterIndex20=:midge
38 BindReal22=1,7.0710678
39 BindText23=2,Here's yet more text
43 BindReal27=1,182282.397
44 BindText28=2,I want chocolate. Now.
48 BindReal32=1,-1.60217733e-19
49 BindText33=2,Now I want ice-cream.
53 // At this point we've added one row outside of the transaction and 3 more
54 // within it. Send a signal to the slave threads which will check for the
55 // above content (one is ESerializable, one is EReadUncommitted, so they'll
56 // see different content).
57 // Wake up 2 threads..
59 // Wait for two signals to show they've finished..
65 // ESerializable thread.
70 // Wait until the db has been setup.
72 Open4=C:\Transaction0.db
73 SetIsolationLevel5=ESerializable
74 Prepare6=Select * from Curtab;
79 ExpectedError10=KSqlErrLocked
89 // Wait until the db has been setup.
91 Open4=C:\Transaction0.db
92 SetIsolationLevel5=EReadUncommitted
93 Prepare6=Select * from Curtab;
99 ColumnReal12=1,6.0827626
100 ColumnTextL13=2,Here's some text
103 ColumnReal16=1,7.0710678
104 ColumnTextL17=2,Here's yet more text
106 ColumnInt19=0,1011010
107 ColumnReal20=1,182282.397
108 ColumnTextL21=2,I want chocolate. Now.
110 ColumnInt23=0,7070707
111 ColumnReal24=1,-1.60217733e-19
112 ColumnTextL25=2,Now I want ice-cream.
119 [CheckFollowingRollback]
122 Open2=C:\Transaction0.db
123 Prepare3=Select * from Curtab;
129 ColumnReal9=1,6.0827626
130 ColumnTextL10=2,Here's some text
134 Delete14=C:\Transaction0.db
138 // Create some cells with text in. Copy these with streams - passing
139 // an RSqlColumnReadStream to an RSqlParamWriteStream.
140 [CopyCellsWithStreams]
143 Delete2=C:\CopyCells.db
144 ExpectedError2=KErrNotFound
145 Create3=C:\CopyCells.db
146 Exec4=Create table Table1(field1 text(50));
147 Exec5=Create table Table2(field1 text(50));
149 Exec6=Insert Into Table1(field1) values("We're going to copy this string");
150 Exec7=Insert Into Table1(field1) values("And this one");
151 Exec8=Insert Into Table1(field1) values("In fact, all of them. There's a loop");
153 // This is used to select the field we want to copy.
154 Prepare9=select field1 from Table1;
156 // This will copy the first cell into a new one (using a separate
157 // RSqlStatement object). The two lines below define values for the separate
158 // RSqlStatement to use.
159 Function10=CopyCellsUsingStreams
160 PrepareStatement=Insert into Table2(field1) values(:mob);
163 // Close PrepareX and read back the content of Table2 to see if the cell
166 Prepare12=select field1 from Table2;
169 ColumnTextL15=0,We're going to copy this string
171 ColumnTextL17=0,And this one
173 ColumnTextL19=0,In fact, all of them. There's a loop
176 // Shut down our RSqlStatement and RSqlDatabase resources.
179 Delete23=C:\CopyCells.db
182 // A separate test, here we bind the content of one file (to an integer
183 // field actually, but SQLite doesn't care about that), then we bind the
184 // content of another before performing the exec/reset. So which data
185 // ends up in the cell? The data from the second bind.
189 Delete2=C:\GenerateErrors2.db
190 ExpectedError2=KErrNotFound
191 Create3=C:\GenerateErrors2.db
192 Exec4=Create Table Table1(Field1 int);
193 Prepare5=Insert into Table1(Field1) Values (:Mickey);
194 ParameterIndex6=:Mickey
195 StreamWriteBindText7=0,Z:\TEF_SQL\TestData\reference1.bin
196 StreamWriteBindText8=0,Z:\TEF_SQL\TestData\reference1.txt
200 Prepare12=select * from Table1;
203 ColumnTextL15=0,Z:\TEF_SQL\TestData\reference1.txt
206 Delete18=C:\GenerateErrors2.db
210 // Test the 'leaving' version of Create, Prepare and Open, also see what
211 // happens if you try creating a database on ROM..
216 ExpectedError2=KErrNotFound
218 ExpectedError3=KErrNotFound
219 CreateL4=C:\Leave1.db
220 Exec5=Create table Leavetable(f1 text(50), f2 int, f3 real);
221 PrepareL6=Insert into Leavetable values(:wonka, :charlie, :joe);
222 ParameterIndex7=:wonka
223 ParameterIndex8=:charlie
225 BindText10=0,Great Glass Elevator
230 BindText15=0,Chocolate Factory
236 PrepareL21=select * from Leavetable;
241 ColumnTextL26=0,Great Glass Elevator
243 ColumnReal28=2,1.23456
245 ColumnTextL30=0,Chocolate Factory
247 ColumnReal32=2,9.87654
252 CreateL36=C:\Leave1.db
253 ExpectedError36=KErrAlreadyExists
254 Delete37=C:\Leave1.db
255 CreateL38=Z:\TEF_SQL\TestData\ReadOnly.db
256 ExpectedError38=KErrAlreadyExists
257 CreateL39=Z:\TEF_SQL\TestData\DoesntExist.db
258 ExpectedError39=KErrAccessDenied
261 // Create (and implicitly open) a database, then another, then another, etc.
262 // This actually isn't supposed to generate errors.
263 // This leaks memory, normally the programmer would be expected to close
264 // each of the databases before opening another, but we're explicitly
265 // checking that successive Opens/Creates give no error.
270 ExpectedError2=KErrNotFound
272 ExpectedError3=KErrNotFound
274 ExpectedError4=KErrNotFound
276 ExpectedError5=KErrNotFound
278 ExpectedError6=KErrNotFound
282 OpenL9=Z:\TEF_SQL\TestData\test1.db
288 ExpectedError13=KErrInUse
290 ExpectedError14=KErrInUse
292 ExpectedError15=KErrInUse
294 ExpectedError16=KErrInUse
296 ExpectedError17=KErrInUse
300 Open20=Z:\TEF_SQL\TestData\ReadOnly.db
301 OpenL21=Z:\TEF_SQL\TestData\test1.db
302 Open22=Z:\TEF_SQL\TestData\ReadOnly.db
309 // First set up a table.
310 Delete2=C:\ExtraBindTest.db
311 ExpectedError2=KErrNotFound
312 Create3=C:\ExtraBindTest.db
313 Exec4=Create table Sometable(Someint int, Somereal real, Sometext text);
314 Prepare5=Insert into Sometable(Someint, Somereal, Sometext) values (:FInt, :FReal, :FText);
315 Function6=WriteBigTable
320 Text=Here's some rather pointless text
321 EventuallyExpectedError=KErrNone
323 // Now try a non-trivial select. Ok then, fairly trivial, ;-)
324 Prepare8=Select * from Sometable where Someint > :Brian;
325 ParameterIndex9=:Brian
328 ColumnIndex12=Someint
329 ColumnIndex13=Somereal
330 ColumnIndex14=Sometext
333 ColumnTextL17=2,Here's some rather pointless text
337 ColumnTextL21=2,Here's some rather pointless text
341 Delete25=C:\ExtraBindTest.db
347 Delete2=C:\ExtraBindTest2.db
348 ExpectedError2=KErrNotFound
349 Create3=C:\ExtraBindTest2.db
350 Exec4=Create table Sometable(Someint int, Somereal real, Sometext text);
351 Prepare5=Insert into Sometable(Sometext) values (:FText);
352 ParameterIndex6=:FText
353 NewBlock7=WriteInts20
356 NewBlock10=WriteInts21
359 NewBlock13=WriteInts22
362 NewBlock16=WriteInts400
366 Prepare20=Select * from Sometable;
367 ColumnIndex21=Sometext
377 // MUST close the Statement or confusion ensues!!
379 Prepare32=Select Sometext from Sometable where Sometext=:Block
380 ParameterIndex33=:Block
381 // We're trying to recover one of the blocks. This function does a bind..
382 NewBlock34=WriteInts21
384 ColumnIndex36=Sometext
389 Delete41=C:\ExtraBindTest2.db
393 Function0=WriteIntsToStream
397 Function0=WriteIntsToStream
401 Function0=WriteIntsToStream
405 Function0=WriteIntsToStream