os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/config/Panics.ini
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/config/Panics.ini Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,242 @@
1.4 +
1.5 +// Called by Panics.script.
1.6 +// Tests that PANICs occur in the right situations.
1.7 +
1.8 +// Attempt to use an RSqlStatement object without an RSqlDatabase.
1.9 +[One-a]
1.10 +Prepare0=one
1.11 +[One-b]
1.12 +AtRow0=True
1.13 +[One-c]
1.14 +ParameterIndex0=x
1.15 +[One-d]
1.16 +Next0=
1.17 +[One-e]
1.18 +Reset0=
1.19 +[One-f]
1.20 +// Doesn't actually call ParameterIndex, just gets it on the internal array,
1.21 +// position 0..
1.22 +ParameterIndex0=2,*explicit*
1.23 +// Use position 0, which contains ParameterIndex 2 which is invalid.
1.24 +StreamWriteBindBin1=0,Z:\TEF_SQL\TestData\reference1.bin
1.25 +[One-g]
1.26 +// Doesn't actually call ParameterIndex, just gets it on the internal array,
1.27 +// position 0..
1.28 +ParameterIndex0=2,*explicit*
1.29 +// Use position 0, which contains ParameterIndex 2 which is invalid.
1.30 +BindInt64_1=0,Z:\TEF_SQL\TestData\reference1.bin
1.31 +[One-h]
1.32 +// Doesn't actually call ColumnIndex, just gets it on the internal array,
1.33 +// position 0..
1.34 +ColumnIndex0=2,*explicit*
1.35 +// Use position 0, which contains ColumnIndex 2 which is invalid.
1.36 +ColumnSize1=0,43
1.37 +[One-i]
1.38 +// Doesn't actually call ColumnIndex, just gets it on the internal array,
1.39 +// position 0..
1.40 +ColumnIndex0=2,*explicit*
1.41 +// Use position 0, which contains ColumnIndex 2 which is invalid.
1.42 +ColumnInt1=0,43
1.43 +[One-j]
1.44 +// Doesn't actually call ColumnIndex, just gets it on the internal array,
1.45 +// position 0..
1.46 +ColumnIndex0=2,*explicit*
1.47 +// Use position 0, which contains ColumnIndex 2 which is invalid.
1.48 +ColumnTextL1=0,Banana
1.49 +
1.50 +// ///////////////////////////////////////////////////////////////////////////
1.51 +
1.52 +// Attempt to use an RSqlDatabase which isn't open. Not exhaustive..
1.53 +[Two]
1.54 +Open0=Z:\TEF_SQL\TestData\test1.db
1.55 +Close1=
1.56 +Exec2=Select * from MonkeyPuzzle;
1.57 +[Two-b]
1.58 +Open0=Z:\TEF_SQL\TestData\test1.db
1.59 +Close1=
1.60 +SetIsolationLevel2=EReadUncommitted
1.61 +[Two-c]
1.62 +Open0=Z:\TEF_SQL\TestData\test1.db
1.63 +Close1=
1.64 +Attach2=Z:\TEF_SQL\TestData\test1.db,fruitgum
1.65 +[Two-d]
1.66 +Open0=Z:\TEF_SQL\TestData\test1.db
1.67 +Close1=
1.68 +Detach2=fruitgum
1.69 +[Two-e]
1.70 +Open0=Z:\TEF_SQL\TestData\test1.db
1.71 +Close1=
1.72 +LastErrorMessage2=
1.73 +[Two-f]
1.74 +Open0=Z:\TEF_SQL\TestData\test1.db
1.75 +Close1=
1.76 +FreeReservedSpace2=
1.77 +// Runs a create that should fail, then attempts to run an Exec..
1.78 +[Two-g]
1.79 +Create0=A:\wontwork.db
1.80 +ExpectedError0=KErrNotReady
1.81 +Exec1=delete * from hello;
1.82 +
1.83 +// ///////////////////////////////////////////////////////////////////////////
1.84 +
1.85 +// Try using a Column* call when we've gone off the end of the table, i.e
1.86 +// Next gave a KSqlAtEnd.
1.87 +[Three]
1.88 +Delete0=C:\Panics0.db
1.89 +ExpectedError0=KErrNotFound
1.90 +Create1=C:\Panics0.db
1.91 +Exec2=Create Table Con( Someint int primary key, Somereal real, Sometext text);
1.92 +Exec3=Insert into Con values(1, 2.0, "Three");
1.93 +Exec4=Insert into Con values(2, 3.0, "Four");
1.94 +Exec5=Insert into Con values(3, 4.0, "Five");
1.95 +Prepare6=select * from Con;
1.96 +ColumnIndex7=Someint
1.97 +Next7=KSqlAtRow
1.98 +Next8=KSqlAtRow
1.99 +Next9=KSqlAtRow
1.100 +Next10=KSqlAtEnd
1.101 +IsNull11=0,false
1.102 +// Try using a Column* call when we've gone off the end of the table.
1.103 +[Three-b]
1.104 +Open0=C:\Panics0.db
1.105 +Prepare1=select * from Con;
1.106 +ColumnIndex2=Someint
1.107 +Next3=KSqlAtRow
1.108 +Next4=KSqlAtRow
1.109 +Next5=KSqlAtRow
1.110 +Next6=KSqlAtEnd
1.111 +// Try using a Column* call when we've gone off the end of the table.
1.112 +ColumnSize7=0,123
1.113 +[Three-c]
1.114 +Open0=C:\Panics0.db
1.115 +Prepare1=select * from Con;
1.116 +ColumnIndex2=Someint
1.117 +Next3=KSqlAtRow
1.118 +Next4=KSqlAtRow
1.119 +Next5=KSqlAtRow
1.120 +Next6=KSqlAtEnd
1.121 +// Try using a Column* call when we've gone off the end of the table.
1.122 +ColumnInt7=0,123
1.123 +[Three-d]
1.124 +Open0=C:\Panics0.db
1.125 +Prepare1=select * from Con;
1.126 +ColumnIndex2=Someint
1.127 +Next3=KSqlAtRow
1.128 +Next4=KSqlAtRow
1.129 +Next5=KSqlAtRow
1.130 +Next6=KSqlAtEnd
1.131 +// Try using a Column* call when we've gone off the end of the table.
1.132 +ColumnInt64_7=0,123
1.133 +[Three-e]
1.134 +Open0=C:\Panics0.db
1.135 +Prepare1=select * from Con;
1.136 +ColumnIndex2=Someint
1.137 +Next3=KSqlAtRow
1.138 +Next4=KSqlAtRow
1.139 +Next5=KSqlAtRow
1.140 +Next6=KSqlAtEnd
1.141 +// Try using a Column* call when we've gone off the end of the table.
1.142 +ColumnReal7=0,123
1.143 +[Three-f]
1.144 +Open0=C:\Panics0.db
1.145 +Prepare1=select * from Con;
1.146 +ColumnIndex2=Someint
1.147 +Next3=KSqlAtRow
1.148 +Next4=KSqlAtRow
1.149 +Next5=KSqlAtRow
1.150 +Next6=KSqlAtEnd
1.151 +// Try using a Column* call when we've gone off the end of the table.
1.152 +// Don't bother with all 3 different columntext methods.
1.153 +ColumnTextP7=0,123
1.154 +[Three-g]
1.155 +Open0=C:\Panics0.db
1.156 +Prepare1=select * from Con;
1.157 +ColumnIndex2=Someint
1.158 +Next3=KSqlAtRow
1.159 +Next4=KSqlAtRow
1.160 +Next5=KSqlAtRow
1.161 +Next6=KSqlAtEnd
1.162 +// Try using a Column* call when we've gone off the end of the table.
1.163 +ColumnBinaryD7=0,123
1.164 +[Three-h]
1.165 +Open0=C:\Panics0.db
1.166 +Prepare1=select * from Con;
1.167 +ColumnIndex2=Someint
1.168 +Next3=KSqlAtRow
1.169 +Next4=KSqlAtRow
1.170 +Next5=KSqlAtRow
1.171 +Next6=KSqlAtEnd
1.172 +// Try using a Column* call when we've gone off the end of the table.
1.173 +StreamReadColText7=0,Z:\TEF_SQL\TestData\reference1.txt
1.174 +// Use a bad parameter index.
1.175 +[Three-i]
1.176 +Open0=C:\Panics0.db
1.177 +Prepare1=insert into Con(Someint, Somereal) values(:a, :b);
1.178 +ParameterIndex2=:a
1.179 +ParameterIndex3=:b
1.180 +// Parameter index 2 is bad.
1.181 +ParameterIndex4=2,*explicit*
1.182 +BindInt5=0,23
1.183 +BindReal6=1,2.3
1.184 +// Bang!
1.185 +BindText7=2,Ivor
1.186 +
1.187 +// ///////////////////////////////////////////////////////////////////////////
1.188 +
1.189 +// Use a parameter index which is out of bounds.
1.190 +[Four]
1.191 +Open0=C:\Panics0.db
1.192 +Prepare1=insert into con(Sometext) values (:fred);
1.193 +ParameterIndex2=:fred
1.194 +ParameterIndex3=3,*explicit*
1.195 +BindText4=0,My hovercraft
1.196 +BindText5=1,is full of eels
1.197 +
1.198 +// Attempt to find the columntype for a bad columnindex.
1.199 +[Four-b]
1.200 +Open0=C:\Panics0.db
1.201 +Prepare1=select * from Con;
1.202 +// Slot 0 ok..
1.203 +ColumnIndex2=Someint
1.204 +// Setup a bad column index in slot 1..
1.205 +ColumnIndex3=3,*explicit*
1.206 +Next4=KSqlAtRow
1.207 +// Have to be at a row for ColumnType to work. This is because SQLite isn't
1.208 +// strongly typed.
1.209 +ColumnType5=0,ESqlInt
1.210 +ColumnType6=1,kaboom!
1.211 +
1.212 +// Try doing a Next on an unprepared RSqlStatement.
1.213 +[Four-c]
1.214 +Open0=C:\Panics0.db
1.215 +Next1=Kaboom!
1.216 +
1.217 +// ///////////////////////////////////////////////////////////////////////////
1.218 +
1.219 +// Attempt to read a column entry without selecting it.
1.220 +[Five]
1.221 +Open0=C:\Panics0.db
1.222 +Prepare1=select Sometext, Somereal from Con;
1.223 +ColumnIndex2=Someint
1.224 +ExpectedError2=KErrNotFound
1.225 +Next3=KSqlAtRow
1.226 +// Blows up here.
1.227 +ColumnInt4=0,1
1.228 +Next5=KSqlAtRow
1.229 +ColumnInt6=0,2
1.230 +Next7=KSqlAtRow
1.231 +ColumnInt8=0,3
1.232 +Next9=KSqlAtEnd
1.233 +EndBlock10=
1.234 +
1.235 +// ///////////////////////////////////////////////////////////////////////////
1.236 +
1.237 +// Runs ParameterIndex on a non-existent table.
1.238 +[Six]
1.239 +Open0=C:\Panics0.db
1.240 +Prepare1=Insert into carpet(john, paul, george, ringo) values(:a, :b, :c, :d);
1.241 +ExpectedError1=KSqlErrGeneral
1.242 +LastErrorMessage2=
1.243 +ParameterIndex3=:a
1.244 +
1.245 +// ///////////////////////////////////////////////////////////////////////////