os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/config/Panics.ini
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
sl@0
     2
// Called by Panics.script.
sl@0
     3
// Tests that PANICs occur in the right situations.
sl@0
     4
sl@0
     5
// Attempt to use an RSqlStatement object without an RSqlDatabase.
sl@0
     6
[One-a]
sl@0
     7
Prepare0=one
sl@0
     8
[One-b]
sl@0
     9
AtRow0=True
sl@0
    10
[One-c]
sl@0
    11
ParameterIndex0=x
sl@0
    12
[One-d]
sl@0
    13
Next0=
sl@0
    14
[One-e]
sl@0
    15
Reset0=
sl@0
    16
[One-f]
sl@0
    17
// Doesn't actually call ParameterIndex, just gets it on the internal array,
sl@0
    18
// position 0..
sl@0
    19
ParameterIndex0=2,*explicit*
sl@0
    20
// Use position 0, which contains ParameterIndex 2 which is invalid.
sl@0
    21
StreamWriteBindBin1=0,Z:\TEF_SQL\TestData\reference1.bin
sl@0
    22
[One-g]
sl@0
    23
// Doesn't actually call ParameterIndex, just gets it on the internal array,
sl@0
    24
// position 0..
sl@0
    25
ParameterIndex0=2,*explicit*
sl@0
    26
// Use position 0, which contains ParameterIndex 2 which is invalid.
sl@0
    27
BindInt64_1=0,Z:\TEF_SQL\TestData\reference1.bin
sl@0
    28
[One-h]
sl@0
    29
// Doesn't actually call ColumnIndex, just gets it on the internal array,
sl@0
    30
// position 0..
sl@0
    31
ColumnIndex0=2,*explicit*
sl@0
    32
// Use position 0, which contains ColumnIndex 2 which is invalid.
sl@0
    33
ColumnSize1=0,43
sl@0
    34
[One-i]
sl@0
    35
// Doesn't actually call ColumnIndex, just gets it on the internal array,
sl@0
    36
// position 0..
sl@0
    37
ColumnIndex0=2,*explicit*
sl@0
    38
// Use position 0, which contains ColumnIndex 2 which is invalid.
sl@0
    39
ColumnInt1=0,43
sl@0
    40
[One-j]
sl@0
    41
// Doesn't actually call ColumnIndex, just gets it on the internal array,
sl@0
    42
// position 0..
sl@0
    43
ColumnIndex0=2,*explicit*
sl@0
    44
// Use position 0, which contains ColumnIndex 2 which is invalid.
sl@0
    45
ColumnTextL1=0,Banana
sl@0
    46
sl@0
    47
// ///////////////////////////////////////////////////////////////////////////
sl@0
    48
sl@0
    49
// Attempt to use an RSqlDatabase which isn't open. Not exhaustive..
sl@0
    50
[Two]
sl@0
    51
Open0=Z:\TEF_SQL\TestData\test1.db
sl@0
    52
Close1=
sl@0
    53
Exec2=Select * from MonkeyPuzzle;
sl@0
    54
[Two-b]
sl@0
    55
Open0=Z:\TEF_SQL\TestData\test1.db
sl@0
    56
Close1=
sl@0
    57
SetIsolationLevel2=EReadUncommitted
sl@0
    58
[Two-c]
sl@0
    59
Open0=Z:\TEF_SQL\TestData\test1.db
sl@0
    60
Close1=
sl@0
    61
Attach2=Z:\TEF_SQL\TestData\test1.db,fruitgum
sl@0
    62
[Two-d]
sl@0
    63
Open0=Z:\TEF_SQL\TestData\test1.db
sl@0
    64
Close1=
sl@0
    65
Detach2=fruitgum
sl@0
    66
[Two-e]
sl@0
    67
Open0=Z:\TEF_SQL\TestData\test1.db
sl@0
    68
Close1=
sl@0
    69
LastErrorMessage2=
sl@0
    70
[Two-f]
sl@0
    71
Open0=Z:\TEF_SQL\TestData\test1.db
sl@0
    72
Close1=
sl@0
    73
FreeReservedSpace2=
sl@0
    74
// Runs a create that should fail, then attempts to run an Exec..
sl@0
    75
[Two-g]
sl@0
    76
Create0=A:\wontwork.db
sl@0
    77
ExpectedError0=KErrNotReady
sl@0
    78
Exec1=delete * from hello;
sl@0
    79
sl@0
    80
// ///////////////////////////////////////////////////////////////////////////
sl@0
    81
sl@0
    82
// Try using a Column* call when we've gone off the end of the table, i.e
sl@0
    83
// Next gave a KSqlAtEnd.
sl@0
    84
[Three]
sl@0
    85
Delete0=C:\Panics0.db
sl@0
    86
ExpectedError0=KErrNotFound
sl@0
    87
Create1=C:\Panics0.db
sl@0
    88
Exec2=Create Table Con( Someint int primary key, Somereal real, Sometext text);
sl@0
    89
Exec3=Insert into Con values(1, 2.0, "Three");
sl@0
    90
Exec4=Insert into Con values(2, 3.0, "Four");
sl@0
    91
Exec5=Insert into Con values(3, 4.0, "Five");
sl@0
    92
Prepare6=select * from Con;
sl@0
    93
ColumnIndex7=Someint
sl@0
    94
Next7=KSqlAtRow
sl@0
    95
Next8=KSqlAtRow
sl@0
    96
Next9=KSqlAtRow
sl@0
    97
Next10=KSqlAtEnd
sl@0
    98
IsNull11=0,false
sl@0
    99
// Try using a Column* call when we've gone off the end of the table.
sl@0
   100
[Three-b]
sl@0
   101
Open0=C:\Panics0.db
sl@0
   102
Prepare1=select * from Con;
sl@0
   103
ColumnIndex2=Someint
sl@0
   104
Next3=KSqlAtRow
sl@0
   105
Next4=KSqlAtRow
sl@0
   106
Next5=KSqlAtRow
sl@0
   107
Next6=KSqlAtEnd
sl@0
   108
// Try using a Column* call when we've gone off the end of the table.
sl@0
   109
ColumnSize7=0,123
sl@0
   110
[Three-c]
sl@0
   111
Open0=C:\Panics0.db
sl@0
   112
Prepare1=select * from Con;
sl@0
   113
ColumnIndex2=Someint
sl@0
   114
Next3=KSqlAtRow
sl@0
   115
Next4=KSqlAtRow
sl@0
   116
Next5=KSqlAtRow
sl@0
   117
Next6=KSqlAtEnd
sl@0
   118
// Try using a Column* call when we've gone off the end of the table.
sl@0
   119
ColumnInt7=0,123
sl@0
   120
[Three-d]
sl@0
   121
Open0=C:\Panics0.db
sl@0
   122
Prepare1=select * from Con;
sl@0
   123
ColumnIndex2=Someint
sl@0
   124
Next3=KSqlAtRow
sl@0
   125
Next4=KSqlAtRow
sl@0
   126
Next5=KSqlAtRow
sl@0
   127
Next6=KSqlAtEnd
sl@0
   128
// Try using a Column* call when we've gone off the end of the table.
sl@0
   129
ColumnInt64_7=0,123
sl@0
   130
[Three-e]
sl@0
   131
Open0=C:\Panics0.db
sl@0
   132
Prepare1=select * from Con;
sl@0
   133
ColumnIndex2=Someint
sl@0
   134
Next3=KSqlAtRow
sl@0
   135
Next4=KSqlAtRow
sl@0
   136
Next5=KSqlAtRow
sl@0
   137
Next6=KSqlAtEnd
sl@0
   138
// Try using a Column* call when we've gone off the end of the table.
sl@0
   139
ColumnReal7=0,123
sl@0
   140
[Three-f]
sl@0
   141
Open0=C:\Panics0.db
sl@0
   142
Prepare1=select * from Con;
sl@0
   143
ColumnIndex2=Someint
sl@0
   144
Next3=KSqlAtRow
sl@0
   145
Next4=KSqlAtRow
sl@0
   146
Next5=KSqlAtRow
sl@0
   147
Next6=KSqlAtEnd
sl@0
   148
// Try using a Column* call when we've gone off the end of the table.
sl@0
   149
// Don't bother with all 3 different columntext methods.
sl@0
   150
ColumnTextP7=0,123
sl@0
   151
[Three-g]
sl@0
   152
Open0=C:\Panics0.db
sl@0
   153
Prepare1=select * from Con;
sl@0
   154
ColumnIndex2=Someint
sl@0
   155
Next3=KSqlAtRow
sl@0
   156
Next4=KSqlAtRow
sl@0
   157
Next5=KSqlAtRow
sl@0
   158
Next6=KSqlAtEnd
sl@0
   159
// Try using a Column* call when we've gone off the end of the table.
sl@0
   160
ColumnBinaryD7=0,123
sl@0
   161
[Three-h]
sl@0
   162
Open0=C:\Panics0.db
sl@0
   163
Prepare1=select * from Con;
sl@0
   164
ColumnIndex2=Someint
sl@0
   165
Next3=KSqlAtRow
sl@0
   166
Next4=KSqlAtRow
sl@0
   167
Next5=KSqlAtRow
sl@0
   168
Next6=KSqlAtEnd
sl@0
   169
// Try using a Column* call when we've gone off the end of the table.
sl@0
   170
StreamReadColText7=0,Z:\TEF_SQL\TestData\reference1.txt
sl@0
   171
// Use a bad parameter index.
sl@0
   172
[Three-i]
sl@0
   173
Open0=C:\Panics0.db
sl@0
   174
Prepare1=insert into Con(Someint, Somereal) values(:a, :b);
sl@0
   175
ParameterIndex2=:a
sl@0
   176
ParameterIndex3=:b
sl@0
   177
// Parameter index 2 is bad.
sl@0
   178
ParameterIndex4=2,*explicit*
sl@0
   179
BindInt5=0,23
sl@0
   180
BindReal6=1,2.3
sl@0
   181
// Bang!
sl@0
   182
BindText7=2,Ivor
sl@0
   183
sl@0
   184
// ///////////////////////////////////////////////////////////////////////////
sl@0
   185
sl@0
   186
// Use a parameter index which is out of bounds.
sl@0
   187
[Four]
sl@0
   188
Open0=C:\Panics0.db
sl@0
   189
Prepare1=insert into con(Sometext) values (:fred);
sl@0
   190
ParameterIndex2=:fred
sl@0
   191
ParameterIndex3=3,*explicit*
sl@0
   192
BindText4=0,My hovercraft
sl@0
   193
BindText5=1,is full of eels
sl@0
   194
sl@0
   195
// Attempt to find the columntype for a bad columnindex.
sl@0
   196
[Four-b]
sl@0
   197
Open0=C:\Panics0.db
sl@0
   198
Prepare1=select * from Con;
sl@0
   199
// Slot 0 ok..
sl@0
   200
ColumnIndex2=Someint
sl@0
   201
// Setup a bad column index in slot 1..
sl@0
   202
ColumnIndex3=3,*explicit*
sl@0
   203
Next4=KSqlAtRow
sl@0
   204
// Have to be at a row for ColumnType to work. This is because SQLite isn't
sl@0
   205
// strongly typed.
sl@0
   206
ColumnType5=0,ESqlInt
sl@0
   207
ColumnType6=1,kaboom!
sl@0
   208
sl@0
   209
// Try doing a Next on an unprepared RSqlStatement.
sl@0
   210
[Four-c]
sl@0
   211
Open0=C:\Panics0.db
sl@0
   212
Next1=Kaboom!
sl@0
   213
sl@0
   214
// ///////////////////////////////////////////////////////////////////////////
sl@0
   215
sl@0
   216
// Attempt to read a column entry without selecting it.
sl@0
   217
[Five]
sl@0
   218
Open0=C:\Panics0.db
sl@0
   219
Prepare1=select Sometext, Somereal from Con;
sl@0
   220
ColumnIndex2=Someint
sl@0
   221
ExpectedError2=KErrNotFound
sl@0
   222
Next3=KSqlAtRow
sl@0
   223
// Blows up here.
sl@0
   224
ColumnInt4=0,1
sl@0
   225
Next5=KSqlAtRow
sl@0
   226
ColumnInt6=0,2
sl@0
   227
Next7=KSqlAtRow
sl@0
   228
ColumnInt8=0,3
sl@0
   229
Next9=KSqlAtEnd
sl@0
   230
EndBlock10=
sl@0
   231
sl@0
   232
// ///////////////////////////////////////////////////////////////////////////
sl@0
   233
sl@0
   234
// Runs ParameterIndex on a non-existent table.
sl@0
   235
[Six]
sl@0
   236
Open0=C:\Panics0.db
sl@0
   237
Prepare1=Insert into carpet(john, paul, george, ringo) values(:a, :b, :c, :d);
sl@0
   238
ExpectedError1=KSqlErrGeneral
sl@0
   239
LastErrorMessage2=
sl@0
   240
ParameterIndex3=:a
sl@0
   241
sl@0
   242
// ///////////////////////////////////////////////////////////////////////////