Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix an assert that could fail after a parse error in expr.c. (CVS 6555) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
a37d1174eb80e9a09522b236afdb4728 |
User & Date: | danielk1977 2009-04-28 11:10:39.000 |
Context
2009-04-28
| ||
12:08 | Another fix to the same assert as in (6555). It can also fail after a malloc error. (CVS 6556) (check-in: e096f90a57 user: danielk1977 tags: trunk) | |
11:10 | Fix an assert that could fail after a parse error in expr.c. (CVS 6555) (check-in: a37d1174eb user: danielk1977 tags: trunk) | |
05:27 | Avoid changing the pager journal-mode once a write-transaction is open, even if no database pages have been modified. (CVS 6554) (check-in: ad8aba3eff user: danielk1977 tags: trunk) | |
Changes
Changes to src/expr.c.
︙ | ︙ | |||
8 9 10 11 12 13 14 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains routines used for analyzing expressions and ** for generating VDBE code that evaluates expressions in SQLite. ** | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains routines used for analyzing expressions and ** for generating VDBE code that evaluates expressions in SQLite. ** ** $Id: expr.c,v 1.429 2009/04/28 11:10:39 danielk1977 Exp $ */ #include "sqliteInt.h" /* ** Return the 'affinity' of the expression pExpr if any. ** ** If pExpr is a column, a reference to a column via an 'AS' alias, |
︙ | ︙ | |||
2571 2572 2573 2574 2575 2576 2577 | if( pExpr->pRight ){ sqlite3ExprCachePush(pParse); sqlite3ExprCode(pParse, pExpr->pRight, target); sqlite3ExprCachePop(pParse, 1); }else{ sqlite3VdbeAddOp2(v, OP_Null, 0, target); } | | | 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 | if( pExpr->pRight ){ sqlite3ExprCachePush(pParse); sqlite3ExprCode(pParse, pExpr->pRight, target); sqlite3ExprCachePop(pParse, 1); }else{ sqlite3VdbeAddOp2(v, OP_Null, 0, target); } assert( pParse->nErr>0 || pParse->iCacheLevel==iCacheLevel ); sqlite3VdbeResolveLabel(v, endLabel); break; } #ifndef SQLITE_OMIT_TRIGGER case TK_RAISE: { if( !pParse->trigStack ){ sqlite3ErrorMsg(pParse, |
︙ | ︙ |
Changes to test/fuzz.test.
︙ | ︙ | |||
15 16 17 18 19 20 21 | # # The tests in this file are really about testing fuzzily generated # SQL parse-trees. The majority of the fuzzily generated SQL is # valid as far as the parser is concerned. # # The most complicated trees are for SELECT statements. # | | | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # # The tests in this file are really about testing fuzzily generated # SQL parse-trees. The majority of the fuzzily generated SQL is # valid as far as the parser is concerned. # # The most complicated trees are for SELECT statements. # # $Id: fuzz.test,v 1.19 2009/04/28 11:10:39 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl set ::REPEATS 5000 # If running quick.test, don't do so many iterations. |
︙ | ︙ | |||
282 283 284 285 286 287 288 289 290 291 292 293 294 295 | ) IN (SELECT 2147483649) FROM sqlite_master ) NOT IN (SELECT ALL 'The') ) )) } } {0 -4294967298} #---------------------------------------------------------------- # Test some fuzzily generated expressions. # do_fuzzy_test fuzz-2 -template { SELECT [Expr] } do_test fuzz-3.1 { | > > > > > > > > > > > > > > | 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | ) IN (SELECT 2147483649) FROM sqlite_master ) NOT IN (SELECT ALL 'The') ) )) } } {0 -4294967298} # At one point the following INSERT statement caused an assert() to fail. # do_test fuzz-1.19 { execsql { CREATE TABLE t1(a) } catchsql { INSERT INTO t1 VALUES( CASE WHEN NULL THEN NULL ELSE ( SELECT 0 ORDER BY 456 ) END ) } } {1 {1st ORDER BY term out of range - should be between 1 and 1}} do_test fuzz-1.20 { execsql { DROP TABLE t1 } } {} #---------------------------------------------------------------- # Test some fuzzily generated expressions. # do_fuzzy_test fuzz-2 -template { SELECT [Expr] } do_test fuzz-3.1 { |
︙ | ︙ |