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