Updates to requirements marks. No code changes.
FossilOrigin-Name: 213020769f310aec1591d97756b53891d0b64005
This commit is contained in:
parent
e0c7efd9ae
commit
3975974780
40
manifest
40
manifest
@ -1,5 +1,5 @@
|
||||
C Add\sNEVER()\sand\sALWAYS()\smacros\son\ssome\sunreachable\syet\sprudent\sbranches.
|
||||
D 2013-08-02T20:11:19.665
|
||||
C Updates\sto\srequirements\smarks.\s\sNo\scode\schanges.
|
||||
D 2013-08-02T23:40:45.340
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
@ -271,7 +271,7 @@ F src/test_thread.c 1e133a40b50e9c035b00174035b846e7eef481cb
|
||||
F src/test_vfs.c e72f555ef7a59080f898fcf1a233deb9eb704ea9
|
||||
F src/test_vfstrace.c 34b544e80ba7fb77be15395a609c669df2e660a2
|
||||
F src/test_wsd.c 41cadfd9d97fe8e3e4e44f61a4a8ccd6f7ca8fe9
|
||||
F src/tokenize.c e0e8fd3cb90a88451f6b6425726c84747b6b20d7
|
||||
F src/tokenize.c 70061085a51f2f4fc15ece94f32c03bcb78e63b2
|
||||
F src/trigger.c 5c0ea9b8755e7c5e1a700f3e27ac4f8d92dd221e
|
||||
F src/update.c 7f3fe64d8f3b44c44a1eac293f0f85f87c355b7a
|
||||
F src/utf.c 8d819e2e5104a430fc2005f018db14347c95a38f
|
||||
@ -290,7 +290,7 @@ F src/vtab.c 2e8b489db47e20ae36cd247932dc671c9ded0624
|
||||
F src/wal.c 7dc3966ef98b74422267e7e6e46e07ff6c6eb1b4
|
||||
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
|
||||
F src/walker.c 4fa43583d0a84b48f93b1e88f11adf2065be4e73
|
||||
F src/where.c 30a9f5e4acd74e727b69a7f53a76863f9316b43b
|
||||
F src/where.c 67245bb73fd9cc04ee7796a0f358d4910c45cfe9
|
||||
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
||||
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
|
||||
F test/aggnested.test 45c0201e28045ad38a530b5a144b73cd4aa2cfd6
|
||||
@ -423,26 +423,26 @@ F test/descidx3.test 09ddbe3f5295f482d2f8b687cf6db8bad7acd9a2
|
||||
F test/diskfull.test 106391384780753ea6896b7b4f005d10e9866b6e
|
||||
F test/distinct.test 44028aaf161a5e80a2f229622b3a174d3b352810
|
||||
F test/distinctagg.test 1a6ef9c87a58669438fc771450d7a72577417376
|
||||
F test/e_createtable.test ddf3b2e4506e0813f46b69ccf55757c5570cc181
|
||||
F test/e_delete.test 89aa84d3d1bd284a0689ede04bce10226a5aeaa5
|
||||
F test/e_droptrigger.test afd5c4d27dec607f5997a66bf7e2498a082cb235
|
||||
F test/e_dropview.test 583411e470458c5d76148542cfb5a5fa84c8f93e
|
||||
F test/e_expr.test 2a599f40f37ee9e853c4396c28ff13c2c50f6628
|
||||
F test/e_createtable.test ee9b70a38369ae44360febb411976aa3c8cf2689
|
||||
F test/e_delete.test d5186e2f5478b659f16a2c8b66c09892823e542a
|
||||
F test/e_droptrigger.test 3cd080807622c13e5bbb61fc9a57bd7754da2412
|
||||
F test/e_dropview.test 0c9f7f60989164a70a67a9d9c26d1083bc808306
|
||||
F test/e_expr.test d5cdda0e4ffb17760858ed4c7c4ece07efc40f71
|
||||
F test/e_fkey.test 17cfb40002d165299681f39aac0cb5890c359935
|
||||
F test/e_fts3.test 5c02288842e4f941896fd44afdef564dd5fc1459
|
||||
F test/e_insert.test d5331cc95e101af2508159fc98b6801631659ffe
|
||||
F test/e_reindex.test 5e6dff3a060b5234d496f6e84c3e59a94b4dce4d
|
||||
F test/e_insert.test ea84688f3b27a6a3728e4ae7a7d9ad342579d7a4
|
||||
F test/e_reindex.test e175794fc41f8e8aef34772e87a7d7b7a9251dd3
|
||||
F test/e_resolve.test dcce9308fb13b934ce29591105d031d3e14fbba6
|
||||
F test/e_select.test d5af998a402740d8f0488158d22075df2b6f88fa
|
||||
F test/e_select2.test 5c3d3da19c7b3e90ae444579db2b70098599ab92
|
||||
F test/e_update.test 161d5dc6a3ed9dd08f5264d13e20735d7a89f00c
|
||||
F test/e_uri.test 8f2f56b29456a3f846276fa4e0993d4ef8a15b79
|
||||
F test/e_vacuum.test 331da289ae186656cf5f2eb27f577a89c0c221af
|
||||
F test/e_select.test f2358d074bd82240bc79a8348f284a2a8909dc1f
|
||||
F test/e_select2.test 22c660a7becf0712c95e1ca1b2d9e716a1261460
|
||||
F test/e_update.test bea00499e43ee1da77b03cdb0b20c7c864c1ec5a
|
||||
F test/e_uri.test a2c92d80093a7efdcfbb11093651cbea87097b6b
|
||||
F test/e_vacuum.test 5bfbdc21b65c0abf24398d0ba31dc88d93ca77a9
|
||||
F test/enc.test e54531cd6bf941ee6760be041dff19a104c7acea
|
||||
F test/enc2.test 83437a79ba1545a55fb549309175c683fb334473
|
||||
F test/enc3.test 90683ad0e6ea587b9d5542ca93568af9a9858c40
|
||||
F test/enc4.test c8f1ce3618508fd0909945beb8b8831feef2c020
|
||||
F test/eqp.test 8ef4d89dc44d8988b3ea6e60902905d739508db0
|
||||
F test/eqp.test d9e7ad4e7bd36d976f1b631f76e6e6ea090c41a0
|
||||
F test/errmsg.test 050717f1c6a5685de9c79f5f9f6b83d7c592f73a
|
||||
F test/eval.test bc269c365ba877554948441e91ad5373f9f91be3
|
||||
F test/exclusive.test c7ebbc756eacf544c108b15eed64d7d4e5f86b75
|
||||
@ -1105,7 +1105,7 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
|
||||
F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae
|
||||
F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
|
||||
P 478113f18b1d28606b107b5a0bed04cb90a82cf2
|
||||
R 0448265d2d2404edbe8ef2a70f660350
|
||||
P c5c0a8ab6c222185d5f9d4321e64d9f93cd36b7d
|
||||
R 20b1dec2302f0bdaf9f8a82570231a5d
|
||||
U drh
|
||||
Z 563793828301249458f36eed7f3789e7
|
||||
Z 33c56d2532f56c7cb339c035fb818e1a
|
||||
|
@ -1 +1 @@
|
||||
c5c0a8ab6c222185d5f9d4321e64d9f93cd36b7d
|
||||
213020769f310aec1591d97756b53891d0b64005
|
@ -123,7 +123,6 @@ int sqlite3GetToken(const unsigned char *z, int *tokenType){
|
||||
}
|
||||
case '-': {
|
||||
if( z[1]=='-' ){
|
||||
/* IMP: R-50417-27976 -- syntax diagram for comments */
|
||||
for(i=2; (c=z[i])!=0 && c!='\n'; i++){}
|
||||
*tokenType = TK_SPACE; /* IMP: R-22934-25134 */
|
||||
return i;
|
||||
@ -156,7 +155,6 @@ int sqlite3GetToken(const unsigned char *z, int *tokenType){
|
||||
*tokenType = TK_SLASH;
|
||||
return 1;
|
||||
}
|
||||
/* IMP: R-50417-27976 -- syntax diagram for comments */
|
||||
for(i=3, c=z[2]; (c!='*' || z[i]!='/') && (c=z[i])!=0; i++){}
|
||||
if( c ) i++;
|
||||
*tokenType = TK_SPACE; /* IMP: R-22934-25134 */
|
||||
|
40
src/where.c
40
src/where.c
@ -658,7 +658,7 @@ static void whereClauseClear(WhereClause *pWC){
|
||||
static int whereClauseInsert(WhereClause *pWC, Expr *p, u8 wtFlags){
|
||||
WhereTerm *pTerm;
|
||||
int idx;
|
||||
testcase( wtFlags & TERM_VIRTUAL ); /* EV: R-00211-15100 */
|
||||
testcase( wtFlags & TERM_VIRTUAL );
|
||||
if( pWC->nTerm>=pWC->nSlot ){
|
||||
WhereTerm *pOld = pWC->a;
|
||||
sqlite3 *db = pWC->pWInfo->pParse->db;
|
||||
@ -803,13 +803,6 @@ static Bitmask exprSelectTableUsage(WhereMaskSet *pMaskSet, Select *pS){
|
||||
** Return TRUE if the given operator is one of the operators that is
|
||||
** allowed for an indexable WHERE clause term. The allowed operators are
|
||||
** "=", "<", ">", "<=", ">=", "IN", and "IS NULL"
|
||||
**
|
||||
** IMPLEMENTATION-OF: R-59926-26393 To be usable by an index a term must be
|
||||
** of one of the following forms: column = expression column > expression
|
||||
** column >= expression column < expression column <= expression
|
||||
** expression = column expression > column expression >= column
|
||||
** expression < column expression <= column column IN
|
||||
** (expression-list) column IN (subquery) column IS NULL
|
||||
*/
|
||||
static int allowedOp(int op){
|
||||
assert( TK_GT>TK_EQ && TK_GT<TK_GE );
|
||||
@ -1483,8 +1476,6 @@ static void exprAnalyzeOrTerm(
|
||||
/* At this point, okToChngToIN is true if original pTerm satisfies
|
||||
** case 1. In that case, construct a new virtual term that is
|
||||
** pTerm converted into an IN operator.
|
||||
**
|
||||
** EV: R-00211-15100
|
||||
*/
|
||||
if( okToChngToIN ){
|
||||
Expr *pDup; /* A transient duplicate expression */
|
||||
@ -1726,9 +1717,7 @@ static void exprAnalyze(
|
||||
** inequality. To avoid this, make sure to also run the full
|
||||
** LIKE on all candidate expressions by clearing the isComplete flag
|
||||
*/
|
||||
if( c=='A'-1 ) isComplete = 0; /* EV: R-64339-08207 */
|
||||
|
||||
|
||||
if( c=='A'-1 ) isComplete = 0;
|
||||
c = sqlite3UpperToLower[c];
|
||||
}
|
||||
*pC = c + 1;
|
||||
@ -2818,9 +2807,6 @@ static int whereInScanEst(
|
||||
** in the ON clause. The term is disabled in (3) because it is not part
|
||||
** of a LEFT OUTER JOIN. In (1), the term is not disabled.
|
||||
**
|
||||
** IMPLEMENTATION-OF: R-24597-58655 No tests are done for terms that are
|
||||
** completely satisfied by indices.
|
||||
**
|
||||
** Disabling a term causes that term to not be tested in the inner loop
|
||||
** of the join. Disabling is an optimization. When terms are satisfied
|
||||
** by indices, we disable them to prevent redundant tests in the inner
|
||||
@ -3050,7 +3036,7 @@ static int codeAllEqualityTerms(
|
||||
/* The following true for indices with redundant columns.
|
||||
** Ex: CREATE INDEX i1 ON t1(a,b,a); SELECT * FROM t1 WHERE a=0 AND b=0; */
|
||||
testcase( (pTerm->wtFlags & TERM_CODED)!=0 );
|
||||
testcase( pTerm->wtFlags & TERM_VIRTUAL ); /* EV: R-30575-11662 */
|
||||
testcase( pTerm->wtFlags & TERM_VIRTUAL );
|
||||
r1 = codeEqualityTerm(pParse, pTerm, pLevel, j, bRev, regBase+j);
|
||||
if( r1!=regBase+j ){
|
||||
if( nReg==1 ){
|
||||
@ -3361,7 +3347,7 @@ static Bitmask codeOneLoopStart(
|
||||
assert( pTerm!=0 );
|
||||
assert( pTerm->pExpr!=0 );
|
||||
assert( omitTable==0 );
|
||||
testcase( pTerm->wtFlags & TERM_VIRTUAL ); /* EV: R-30575-11662 */
|
||||
testcase( pTerm->wtFlags & TERM_VIRTUAL );
|
||||
iRowidReg = codeEqualityTerm(pParse, pTerm, pLevel, 0, bRev, iReleaseReg);
|
||||
addrNxt = pLevel->addrNxt;
|
||||
sqlite3VdbeAddOp2(v, OP_MustBeInt, iRowidReg, addrNxt);
|
||||
@ -3409,7 +3395,7 @@ static Bitmask codeOneLoopStart(
|
||||
assert( TK_GE==TK_GT+3 ); /* ... is correcct. */
|
||||
|
||||
assert( (pStart->wtFlags & TERM_VNULL)==0 );
|
||||
testcase( pStart->wtFlags & TERM_VIRTUAL ); /* EV: R-30575-11662 */
|
||||
testcase( pStart->wtFlags & TERM_VIRTUAL );
|
||||
pX = pStart->pExpr;
|
||||
assert( pX!=0 );
|
||||
testcase( pStart->leftCursor!=iCur ); /* transitive constraints */
|
||||
@ -3428,7 +3414,7 @@ static Bitmask codeOneLoopStart(
|
||||
assert( pX!=0 );
|
||||
assert( (pEnd->wtFlags & TERM_VNULL)==0 );
|
||||
testcase( pEnd->leftCursor!=iCur ); /* Transitive constraints */
|
||||
testcase( pEnd->wtFlags & TERM_VIRTUAL ); /* EV: R-30575-11662 */
|
||||
testcase( pEnd->wtFlags & TERM_VIRTUAL );
|
||||
memEndValue = ++pParse->nMem;
|
||||
sqlite3ExprCode(pParse, pX->pRight, memEndValue);
|
||||
if( pX->op==TK_LT || pX->op==TK_GT ){
|
||||
@ -3594,7 +3580,7 @@ static Bitmask codeOneLoopStart(
|
||||
}
|
||||
}
|
||||
nConstraint++;
|
||||
testcase( pRangeStart->wtFlags & TERM_VIRTUAL ); /* EV: R-30575-11662 */
|
||||
testcase( pRangeStart->wtFlags & TERM_VIRTUAL );
|
||||
}else if( isMinQuery ){
|
||||
sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq);
|
||||
nConstraint++;
|
||||
@ -3636,7 +3622,7 @@ static Bitmask codeOneLoopStart(
|
||||
}
|
||||
codeApplyAffinity(pParse, regBase, nEq+1, zEndAff);
|
||||
nConstraint++;
|
||||
testcase( pRangeEnd->wtFlags & TERM_VIRTUAL ); /* EV: R-30575-11662 */
|
||||
testcase( pRangeEnd->wtFlags & TERM_VIRTUAL );
|
||||
}
|
||||
sqlite3DbFree(db, zStartAff);
|
||||
sqlite3DbFree(db, zEndAff);
|
||||
@ -3923,14 +3909,10 @@ static Bitmask codeOneLoopStart(
|
||||
|
||||
/* Insert code to test every subexpression that can be completely
|
||||
** computed using the current set of tables.
|
||||
**
|
||||
** IMPLEMENTATION-OF: R-49525-50935 Terms that cannot be satisfied through
|
||||
** the use of indices become tests that are evaluated against each row of
|
||||
** the relevant input tables.
|
||||
*/
|
||||
for(pTerm=pWC->a, j=pWC->nTerm; j>0; j--, pTerm++){
|
||||
Expr *pE;
|
||||
testcase( pTerm->wtFlags & TERM_VIRTUAL ); /* IMP: R-30575-11662 */
|
||||
testcase( pTerm->wtFlags & TERM_VIRTUAL );
|
||||
testcase( pTerm->wtFlags & TERM_CODED );
|
||||
if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue;
|
||||
if( (pTerm->prereqAll & newNotReady)!=0 ){
|
||||
@ -3990,7 +3972,7 @@ static Bitmask codeOneLoopStart(
|
||||
VdbeComment((v, "record LEFT JOIN hit"));
|
||||
sqlite3ExprCacheClear(pParse);
|
||||
for(pTerm=pWC->a, j=0; j<pWC->nTerm; j++, pTerm++){
|
||||
testcase( pTerm->wtFlags & TERM_VIRTUAL ); /* IMP: R-30575-11662 */
|
||||
testcase( pTerm->wtFlags & TERM_VIRTUAL );
|
||||
testcase( pTerm->wtFlags & TERM_CODED );
|
||||
if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue;
|
||||
if( (pTerm->prereqAll & newNotReady)!=0 ){
|
||||
@ -5763,7 +5745,7 @@ WhereInfo *sqlite3WhereBegin(
|
||||
initMaskSet(pMaskSet);
|
||||
whereClauseInit(&pWInfo->sWC, pWInfo);
|
||||
sqlite3ExprCodeConstants(pParse, pWhere);
|
||||
whereSplit(&pWInfo->sWC, pWhere, TK_AND); /* IMP: R-15842-53296 */
|
||||
whereSplit(&pWInfo->sWC, pWhere, TK_AND);
|
||||
sqlite3CodeVerifySchema(pParse, -1); /* Insert the cookie verifier Goto */
|
||||
|
||||
/* Special case: a WHERE clause that is constant. Evaluate the
|
||||
|
@ -58,8 +58,6 @@ proc table_list {} {
|
||||
}
|
||||
|
||||
|
||||
# EVIDENCE-OF: R-47266-09114 -- syntax diagram type-name
|
||||
#
|
||||
do_createtable_tests 0.1.1 -repair {
|
||||
drop_all_tables
|
||||
} {
|
||||
@ -79,7 +77,7 @@ do_createtable_tests 0.1.2 -error {
|
||||
}
|
||||
|
||||
|
||||
# EVIDENCE-OF: R-60689-48779 -- syntax diagram column-constraint
|
||||
# syntax diagram column-constraint
|
||||
#
|
||||
do_createtable_tests 0.2.1 -repair {
|
||||
drop_all_tables
|
||||
@ -126,7 +124,7 @@ do_createtable_tests 0.2.1 -repair {
|
||||
} {}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-58169-51804 -- syntax diagram table-constraint
|
||||
# -- syntax diagram table-constraint
|
||||
#
|
||||
do_createtable_tests 0.3.1 -repair {
|
||||
drop_all_tables
|
||||
@ -145,7 +143,7 @@ do_createtable_tests 0.3.1 -repair {
|
||||
4.1 "CREATE TABLE t1(c1, c2, FOREIGN KEY(c1) REFERENCES t2)" {}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-44826-22243 -- syntax diagram column-def
|
||||
# -- syntax diagram column-def
|
||||
#
|
||||
do_createtable_tests 0.4.1 -repair {
|
||||
drop_all_tables
|
||||
@ -160,7 +158,7 @@ do_createtable_tests 0.4.1 -repair {
|
||||
} {}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-45698-45677 -- syntax diagram create-table-stmt
|
||||
# -- syntax diagram create-table-stmt
|
||||
#
|
||||
do_createtable_tests 0.5.1 -repair {
|
||||
drop_all_tables
|
||||
@ -185,7 +183,6 @@ do_createtable_tests 0.5.1 -repair {
|
||||
15 "CREATE TABLE t1 AS SELECT count(*), max(b), min(a) FROM t2" {}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-24369-11919 -- syntax diagram foreign-key-clause
|
||||
#
|
||||
# 1: Explicit parent-key columns.
|
||||
# 2: Implicit child-key columns.
|
||||
|
@ -29,9 +29,8 @@ do_execsql_test e_delete-0.0 {
|
||||
CREATE INDEX i1 ON t1(a);
|
||||
} {}
|
||||
|
||||
# EVIDENCE-OF: R-62077-19799 -- syntax diagram delete-stmt
|
||||
#
|
||||
# EVIDENCE-OF: R-60796-31013 -- syntax diagram qualified-table-name
|
||||
# -- syntax diagram delete-stmt
|
||||
# -- syntax diagram qualified-table-name
|
||||
#
|
||||
do_delete_tests e_delete-0.1 {
|
||||
1 "DELETE FROM t1" {}
|
||||
@ -292,7 +291,7 @@ do_delete_tests e_delete-2.5 -error { near "%s": syntax error } {
|
||||
# of the DELETE statement is extended by the addition of optional ORDER
|
||||
# BY and LIMIT clauses:
|
||||
#
|
||||
# EVIDENCE-OF: R-52694-53361 -- syntax diagram delete-stmt-limited
|
||||
# -- syntax diagram delete-stmt-limited
|
||||
#
|
||||
do_delete_tests e_delete-3.1 {
|
||||
1 "DELETE FROM t1 LIMIT 5" {}
|
||||
|
@ -69,7 +69,7 @@ proc droptrigger_reopen_db {{event INSERT}} {
|
||||
}
|
||||
|
||||
|
||||
# EVIDENCE-OF: R-27975-10951 -- syntax diagram drop-trigger-stmt
|
||||
# -- syntax diagram drop-trigger-stmt
|
||||
#
|
||||
do_droptrigger_tests 1.1 -repair {
|
||||
droptrigger_reopen_db
|
||||
|
@ -70,7 +70,7 @@ proc do_dropview_tests {nm args} {
|
||||
uplevel do_select_tests $nm $args
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-53136-36436 -- syntax diagram drop-view-stmt
|
||||
# -- syntax diagram drop-view-stmt
|
||||
#
|
||||
# All paths in the syntax diagram for DROP VIEW are tested by tests 1.*.
|
||||
#
|
||||
|
@ -366,9 +366,9 @@ db collate reverse reverse_collate
|
||||
# EVIDENCE-OF: R-59577-33471 The COLLATE operator is a unary postfix
|
||||
# operator that assigns a collating sequence to an expression.
|
||||
#
|
||||
# EVIDENCE-OF: R-23441-22541 The COLLATE operator has a higher
|
||||
# precedence (binds more tightly) than any prefix unary operator or any
|
||||
# binary operator.
|
||||
# EVIDENCE-OF: R-36231-30731 The COLLATE operator has a higher
|
||||
# precedence (binds more tightly) than any binary operator and any unary
|
||||
# prefix operator except "~".
|
||||
#
|
||||
do_execsql_test e_expr-9.1 { SELECT 'abcd' < 'bbbb' COLLATE reverse } 0
|
||||
do_execsql_test e_expr-9.2 { SELECT ('abcd' < 'bbbb') COLLATE reverse } 1
|
||||
@ -631,7 +631,7 @@ do_test e_expr-11.7.1 { sqlite3_finalize $stmt } SQLITE_OK
|
||||
#-------------------------------------------------------------------------
|
||||
# "Test" the syntax diagrams in lang_expr.html.
|
||||
#
|
||||
# EVIDENCE-OF: R-02989-21050 -- syntax diagram signed-number
|
||||
# -- syntax diagram signed-number
|
||||
#
|
||||
do_execsql_test e_expr-12.1.1 { SELECT 0, +0, -0 } {0 0 0}
|
||||
do_execsql_test e_expr-12.1.2 { SELECT 1, +1, -1 } {1 1 -1}
|
||||
@ -646,7 +646,7 @@ do_execsql_test e_expr-12.1.6 {
|
||||
SELECT 0.0001, +0.0001, -0.0001
|
||||
} {0.0001 0.0001 -0.0001}
|
||||
|
||||
# EVIDENCE-OF: R-43188-60852 -- syntax diagram literal-value
|
||||
# -- syntax diagram literal-value
|
||||
#
|
||||
set sqlite_current_time 1
|
||||
do_execsql_test e_expr-12.2.1 {SELECT 123} {123}
|
||||
@ -659,7 +659,7 @@ do_execsql_test e_expr-12.2.7 {SELECT CURRENT_DATE} {1970-01-01}
|
||||
do_execsql_test e_expr-12.2.8 {SELECT CURRENT_TIMESTAMP} {{1970-01-01 00:00:01}}
|
||||
set sqlite_current_time 0
|
||||
|
||||
# EVIDENCE-OF: R-50544-32159 -- syntax diagram expr
|
||||
# -- syntax diagram expr
|
||||
#
|
||||
forcedelete test.db2
|
||||
execsql {
|
||||
@ -816,7 +816,7 @@ foreach {tn expr} {
|
||||
}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-39820-63916 -- syntax diagram raise-function
|
||||
# -- syntax diagram raise-function
|
||||
#
|
||||
foreach {tn raiseexpr} {
|
||||
1 "RAISE(IGNORE)"
|
||||
|
@ -50,7 +50,7 @@ proc do_insert_tests {args} {
|
||||
uplevel do_select_tests $args
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-21350-31508 -- syntax diagram insert-stmt
|
||||
# -- syntax diagram insert-stmt
|
||||
#
|
||||
do_insert_tests e_insert-0 {
|
||||
1 "INSERT INTO a1 DEFAULT VALUES" {}
|
||||
|
@ -26,7 +26,7 @@ do_execsql_test e_reindex-0.0 {
|
||||
CREATE INDEX i2 ON t1(b, a);
|
||||
} {}
|
||||
|
||||
# EVIDENCE-OF: R-51477-38549 -- syntax diagram reindex-stmt
|
||||
# -- syntax diagram reindex-stmt
|
||||
#
|
||||
do_reindex_tests e_reindex-0.1 {
|
||||
1 "REINDEX" {}
|
||||
|
@ -83,7 +83,7 @@ proc do_join_test {tn select res} {
|
||||
# The following tests check that all paths on the syntax diagrams on
|
||||
# the lang_select.html page may be taken.
|
||||
#
|
||||
# EVIDENCE-OF: R-11353-33501 -- syntax diagram join-constraint
|
||||
# -- syntax diagram join-constraint
|
||||
#
|
||||
do_join_test e_select-0.1.1 {
|
||||
SELECT count(*) FROM t1 %JOIN% t2 ON (t1.a=t2.a)
|
||||
@ -101,7 +101,7 @@ do_catchsql_test e_select-0.1.5 {
|
||||
SELECT count(*) FROM t1, t2 USING (a) ON (t1.a=t2.a)
|
||||
} {1 {near "ON": syntax error}}
|
||||
|
||||
# EVIDENCE-OF: R-40919-40941 -- syntax diagram select-core
|
||||
# -- syntax diagram select-core
|
||||
#
|
||||
# 0: SELECT ...
|
||||
# 1: SELECT DISTINCT ...
|
||||
@ -226,7 +226,7 @@ do_select_tests e_select-0.2 {
|
||||
}
|
||||
|
||||
|
||||
# EVIDENCE-OF: R-41378-26734 -- syntax diagram result-column
|
||||
# -- syntax diagram result-column
|
||||
#
|
||||
do_select_tests e_select-0.3 {
|
||||
1 "SELECT * FROM t1" {a one b two c three}
|
||||
@ -236,9 +236,9 @@ do_select_tests e_select-0.3 {
|
||||
5 "SELECT 'x'||a||'x' AS alias FROM t1" {xax xbx xcx}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-43129-35648 -- syntax diagram join-source
|
||||
# -- syntax diagram join-source
|
||||
#
|
||||
# EVIDENCE-OF: R-36683-37460 -- syntax diagram join-op
|
||||
# -- syntax diagram join-op
|
||||
#
|
||||
do_select_tests e_select-0.4 {
|
||||
1 "SELECT t1.rowid FROM t1" {1 2 3}
|
||||
@ -263,7 +263,7 @@ do_select_tests e_select-0.4 {
|
||||
16 "SELECT t1.rowid FROM t1 CROSS JOIN t3" {1 1 2 2 3 3}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-28308-37813 -- syntax diagram compound-operator
|
||||
# -- syntax diagram compound-operator
|
||||
#
|
||||
do_select_tests e_select-0.5 {
|
||||
1 "SELECT rowid FROM t1 UNION ALL SELECT rowid+2 FROM t4" {1 2 3 3 4}
|
||||
@ -272,7 +272,7 @@ do_select_tests e_select-0.5 {
|
||||
4 "SELECT rowid FROM t1 EXCEPT SELECT rowid+2 FROM t4" {1 2}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-06480-34950 -- syntax diagram ordering-term
|
||||
# -- syntax diagram ordering-term
|
||||
#
|
||||
do_select_tests e_select-0.6 {
|
||||
1 "SELECT b||a FROM t1 ORDER BY b||a" {onea threec twob}
|
||||
@ -281,7 +281,7 @@ do_select_tests e_select-0.6 {
|
||||
4 "SELECT b||a FROM t1 ORDER BY (b||a) DESC" {twob threec onea}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-23926-36668 -- syntax diagram select-stmt
|
||||
# -- syntax diagram select-stmt
|
||||
#
|
||||
do_select_tests e_select-0.7 {
|
||||
1 "SELECT * FROM t1" {a one b two c three}
|
||||
@ -395,8 +395,8 @@ do_select_tests e_select-1.3 {
|
||||
# EVIDENCE-OF: R-46256-57243 There is no difference between the "INNER
|
||||
# JOIN", "JOIN" and "," join operators.
|
||||
#
|
||||
# EVIDENCE-OF: R-07544-24155 The "CROSS JOIN" join operator produces the
|
||||
# same data as the "INNER JOIN", "JOIN" and "," operators
|
||||
# EVIDENCE-OF: R-25071-21202 The "CROSS JOIN" join operator produces the
|
||||
# same result as the "INNER JOIN", "JOIN" and "," operators
|
||||
#
|
||||
# All tests are run 4 times, with the only difference in each run being
|
||||
# which of the 4 equivalent cartesian product join operators are used.
|
||||
@ -1226,7 +1226,7 @@ do_select_tests e_select-5.1 {
|
||||
# EVIDENCE-OF: R-08861-34280 If the simple SELECT is a SELECT ALL, then
|
||||
# the entire set of result rows are returned by the SELECT.
|
||||
#
|
||||
# EVIDENCE-OF: R-47911-02086 If neither ALL or DISTINCT are present,
|
||||
# EVIDENCE-OF: R-01256-01950 If neither ALL or DISTINCT are present,
|
||||
# then the behavior is as if ALL were specified.
|
||||
#
|
||||
# EVIDENCE-OF: R-14442-41305 If the simple SELECT is a SELECT DISTINCT,
|
||||
|
@ -352,8 +352,8 @@ foreach {tn indexes} {
|
||||
# EVIDENCE-OF: R-46256-57243 There is no difference between the "INNER
|
||||
# JOIN", "JOIN" and "," join operators.
|
||||
#
|
||||
# EVIDENCE-OF: R-07544-24155 The "CROSS JOIN" join operator produces the
|
||||
# same data as the "INNER JOIN", "JOIN" and "," operators
|
||||
# EVIDENCE-OF: R-25071-21202 The "CROSS JOIN" join operator produces the
|
||||
# same result as the "INNER JOIN", "JOIN" and "," operators
|
||||
#
|
||||
test_join $tn.1.1 "t1, t2" {t1 t2}
|
||||
test_join $tn.1.2 "t1 INNER JOIN t2" {t1 t2}
|
||||
|
@ -49,7 +49,7 @@ proc do_update_tests {args} {
|
||||
uplevel do_select_tests $args
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-62337-45828 -- syntax diagram update-stmt
|
||||
# -- syntax diagram update-stmt
|
||||
#
|
||||
do_update_tests e_update-0 {
|
||||
1 "UPDATE t1 SET a=10" {}
|
||||
@ -493,7 +493,7 @@ do_update_tests e_update-2.5 -error {
|
||||
# of the UPDATE statement is extended with optional ORDER BY and LIMIT
|
||||
# clauses
|
||||
#
|
||||
# EVIDENCE-OF: R-45169-39597 -- syntax diagram update-stmt-limited
|
||||
# -- syntax diagram update-stmt-limited
|
||||
#
|
||||
do_update_tests e_update-3.0 {
|
||||
1 "UPDATE t1 SET a=b LIMIT 5" {}
|
||||
|
@ -359,7 +359,7 @@ foreach {tn uri error} "
|
||||
# EVIDENCE-OF: R-49793-28525 Setting the cache parameter to "private" is
|
||||
# equivalent to setting the SQLITE_OPEN_PRIVATECACHE bit.
|
||||
#
|
||||
# EVIDENCE-OF: R-19510-48080 If sqlite3_open_v2() is used and the
|
||||
# EVIDENCE-OF: R-31773-41793 If sqlite3_open_v2() is used and the
|
||||
# "cache" parameter is present in a URI filename, its value overrides
|
||||
# any behavior requested by setting SQLITE_OPEN_PRIVATECACHE or
|
||||
# SQLITE_OPEN_SHAREDCACHE flag.
|
||||
|
@ -65,7 +65,7 @@ proc fragment_count {name} {
|
||||
}
|
||||
|
||||
|
||||
# EVIDENCE-OF: R-45173-45977 -- syntax diagram vacuum-stmt
|
||||
# -- syntax diagram vacuum-stmt
|
||||
#
|
||||
do_execsql_test e_vacuum-0.1 { VACUUM } {}
|
||||
|
||||
|
@ -370,32 +370,37 @@ do_eqp_test 4.3.3 {
|
||||
#
|
||||
drop_all_tables
|
||||
|
||||
# EVIDENCE-OF: R-64208-08323 sqlite> EXPLAIN QUERY PLAN SELECT a, b
|
||||
# FROM t1 WHERE a=1; 0|0|0|SCAN TABLE t1
|
||||
# EVIDENCE-OF: R-47779-47605 sqlite> EXPLAIN QUERY PLAN SELECT a, b
|
||||
# FROM t1 WHERE a=1;
|
||||
# 0|0|0|SCAN TABLE t1
|
||||
#
|
||||
do_execsql_test 5.1.0 { CREATE TABLE t1(a, b) }
|
||||
det 5.1.1 "SELECT a, b FROM t1 WHERE a=1" {
|
||||
0 0 0 {SCAN TABLE t1}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-09022-44606 sqlite> CREATE INDEX i1 ON t1(a);
|
||||
# EVIDENCE-OF: R-55852-17599 sqlite> CREATE INDEX i1 ON t1(a);
|
||||
# sqlite> EXPLAIN QUERY PLAN SELECT a, b FROM t1 WHERE a=1;
|
||||
# 0|0|0|SEARCH TABLE t1 USING INDEX i1 (a=?)
|
||||
# 0|0|0|SEARCH TABLE t1 USING INDEX i1
|
||||
#
|
||||
do_execsql_test 5.2.0 { CREATE INDEX i1 ON t1(a) }
|
||||
det 5.2.1 "SELECT a, b FROM t1 WHERE a=1" {
|
||||
0 0 0 {SEARCH TABLE t1 USING INDEX i1 (a=?)}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-62228-34103 sqlite> CREATE INDEX i2 ON t1(a, b);
|
||||
# EVIDENCE-OF: R-21179-11011 sqlite> CREATE INDEX i2 ON t1(a, b);
|
||||
# sqlite> EXPLAIN QUERY PLAN SELECT a, b FROM t1 WHERE a=1;
|
||||
# 0|0|0|SEARCH TABLE t1 USING COVERING INDEX i2 (a=?)
|
||||
#
|
||||
do_execsql_test 5.3.0 { CREATE INDEX i2 ON t1(a, b) }
|
||||
det 5.3.1 "SELECT a, b FROM t1 WHERE a=1" {
|
||||
0 0 0 {SEARCH TABLE t1 USING COVERING INDEX i2 (a=?)}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-22253-05302 sqlite> EXPLAIN QUERY PLAN SELECT t1.*,
|
||||
# t2.* FROM t1, t2 WHERE t1.a=1 AND t1.b>2; 0|0|0|SEARCH TABLE t1
|
||||
# USING COVERING INDEX i2 (a=? AND b>?) 0|1|1|SCAN TABLE t2
|
||||
# EVIDENCE-OF: R-09991-48941 sqlite> EXPLAIN QUERY PLAN
|
||||
# SELECT t1.*, t2.* FROM t1, t2 WHERE t1.a=1 AND t1.b>2;
|
||||
# 0|0|0|SEARCH TABLE t1 USING COVERING INDEX i2 (a=? AND b>?)
|
||||
# 0|1|1|SCAN TABLE t2
|
||||
#
|
||||
do_execsql_test 5.4.0 {CREATE TABLE t2(c, d)}
|
||||
det 5.4.1 "SELECT t1.*, t2.* FROM t1, t2 WHERE t1.a=1 AND t1.b>2" {
|
||||
@ -403,47 +408,54 @@ det 5.4.1 "SELECT t1.*, t2.* FROM t1, t2 WHERE t1.a=1 AND t1.b>2" {
|
||||
0 1 1 {SCAN TABLE t2}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-21040-07025 sqlite> EXPLAIN QUERY PLAN SELECT t1.*,
|
||||
# t2.* FROM t2, t1 WHERE t1.a=1 AND t1.b>2; 0|0|1|SEARCH TABLE t1
|
||||
# USING COVERING INDEX i2 (a=? AND b>?) 0|1|0|SCAN TABLE t2
|
||||
# EVIDENCE-OF: R-33626-61085 sqlite> EXPLAIN QUERY PLAN
|
||||
# SELECT t1.*, t2.* FROM t2, t1 WHERE t1.a=1 AND t1.b>2;
|
||||
# 0|0|1|SEARCH TABLE t1 USING COVERING INDEX i2 (a=? AND b>?)
|
||||
# 0|1|0|SCAN TABLE t2
|
||||
#
|
||||
det 5.5 "SELECT t1.*, t2.* FROM t2, t1 WHERE t1.a=1 AND t1.b>2" {
|
||||
0 0 1 {SEARCH TABLE t1 USING COVERING INDEX i2 (a=? AND b>?)}
|
||||
0 1 0 {SCAN TABLE t2}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-39007-61103 sqlite> CREATE INDEX i3 ON t1(b);
|
||||
# EVIDENCE-OF: R-04002-25654 sqlite> CREATE INDEX i3 ON t1(b);
|
||||
# sqlite> EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE a=1 OR b=2;
|
||||
# 0|0|0|SEARCH TABLE t1 USING COVERING INDEX i2 (a=?)
|
||||
# 0|0|0|SEARCH TABLE t1 USING INDEX i3 (b=?)
|
||||
#
|
||||
do_execsql_test 5.5.0 {CREATE INDEX i3 ON t1(b)}
|
||||
det 5.6.1 "SELECT * FROM t1 WHERE a=1 OR b=2" {
|
||||
0 0 0 {SEARCH TABLE t1 USING COVERING INDEX i2 (a=?)}
|
||||
0 0 0 {SEARCH TABLE t1 USING INDEX i3 (b=?)}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-33025-54904 sqlite> EXPLAIN QUERY PLAN SELECT c, d
|
||||
# FROM t2 ORDER BY c; 0|0|0|SCAN TABLE t2 0|0|0|USE TEMP
|
||||
# B-TREE FOR ORDER BY
|
||||
# EVIDENCE-OF: R-24577-38891 sqlite> EXPLAIN QUERY PLAN
|
||||
# SELECT c, d FROM t2 ORDER BY c;
|
||||
# 0|0|0|SCAN TABLE t2
|
||||
# 0|0|0|USE TEMP B-TREE FOR ORDER BY
|
||||
#
|
||||
det 5.7 "SELECT c, d FROM t2 ORDER BY c" {
|
||||
0 0 0 {SCAN TABLE t2}
|
||||
0 0 0 {USE TEMP B-TREE FOR ORDER BY}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-38854-22809 sqlite> CREATE INDEX i4 ON t2(c);
|
||||
# EVIDENCE-OF: R-58157-12355 sqlite> CREATE INDEX i4 ON t2(c);
|
||||
# sqlite> EXPLAIN QUERY PLAN SELECT c, d FROM t2 ORDER BY c;
|
||||
# 0|0|0|SCAN TABLE t2 USING INDEX i4
|
||||
#
|
||||
do_execsql_test 5.8.0 {CREATE INDEX i4 ON t2(c)}
|
||||
det 5.8.1 "SELECT c, d FROM t2 ORDER BY c" {
|
||||
0 0 0 {SCAN TABLE t2 USING INDEX i4}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-29884-43993 sqlite> EXPLAIN QUERY PLAN SELECT
|
||||
# EVIDENCE-OF: R-13931-10421 sqlite> EXPLAIN QUERY PLAN SELECT
|
||||
# (SELECT b FROM t1 WHERE a=0), (SELECT a FROM t1 WHERE b=t2.c) FROM t2;
|
||||
# 0|0|0|SCAN TABLE t2 0|0|0|EXECUTE SCALAR SUBQUERY 1
|
||||
# 0|0|0|SCAN TABLE t2
|
||||
# 0|0|0|EXECUTE SCALAR SUBQUERY 1
|
||||
# 1|0|0|SEARCH TABLE t1 USING COVERING INDEX i2 (a=?)
|
||||
# 0|0|0|EXECUTE CORRELATED SCALAR SUBQUERY 2 2|0|0|SEARCH TABLE t1 USING
|
||||
# INDEX i3 (b=?)
|
||||
# 0|0|0|EXECUTE CORRELATED SCALAR SUBQUERY 2
|
||||
# 2|0|0|SEARCH TABLE t1 USING INDEX i3 (b=?)
|
||||
#
|
||||
det 5.9 {
|
||||
SELECT (SELECT b FROM t1 WHERE a=0), (SELECT a FROM t1 WHERE b=t2.c) FROM t2
|
||||
} {
|
||||
@ -454,10 +466,12 @@ det 5.9 {
|
||||
2 0 0 {SEARCH TABLE t1 USING INDEX i3 (b=?)}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-17911-16445 sqlite> EXPLAIN QUERY PLAN SELECT
|
||||
# count(*) FROM (SELECT max(b) AS x FROM t1 GROUP BY a) GROUP BY x;
|
||||
# 1|0|0|SCAN TABLE t1 USING COVERING INDEX i2 0|0|0|SCAN
|
||||
# SUBQUERY 1 0|0|0|USE TEMP B-TREE FOR GROUP BY
|
||||
# EVIDENCE-OF: R-50892-45943 sqlite> EXPLAIN QUERY PLAN
|
||||
# SELECT count(*) FROM (SELECT max(b) AS x FROM t1 GROUP BY a) GROUP BY x;
|
||||
# 1|0|0|SCAN TABLE t1 USING COVERING INDEX i2
|
||||
# 0|0|0|SCAN SUBQUERY 1
|
||||
# 0|0|0|USE TEMP B-TREE FOR GROUP BY
|
||||
#
|
||||
det 5.10 {
|
||||
SELECT count(*) FROM (SELECT max(b) AS x FROM t1 GROUP BY a) GROUP BY x
|
||||
} {
|
||||
@ -466,29 +480,34 @@ det 5.10 {
|
||||
0 0 0 {USE TEMP B-TREE FOR GROUP BY}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-18544-33103 sqlite> EXPLAIN QUERY PLAN SELECT * FROM
|
||||
# (SELECT * FROM t2 WHERE c=1), t1; 0|0|0|SEARCH TABLE t2 USING INDEX i4
|
||||
# (c=?) 0|1|1|SCAN TABLE t1
|
||||
# EVIDENCE-OF: R-46219-33846 sqlite> EXPLAIN QUERY PLAN
|
||||
# SELECT * FROM (SELECT * FROM t2 WHERE c=1), t1;
|
||||
# 0|0|0|SEARCH TABLE t2 USING INDEX i4 (c=?)
|
||||
# 0|1|1|SCAN TABLE t1
|
||||
#
|
||||
det 5.11 "SELECT * FROM (SELECT * FROM t2 WHERE c=1), t1" {
|
||||
0 0 0 {SEARCH TABLE t2 USING INDEX i4 (c=?)}
|
||||
0 1 1 {SCAN TABLE t1 USING COVERING INDEX i2}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-40701-42164 sqlite> EXPLAIN QUERY PLAN SELECT a FROM
|
||||
# t1 UNION SELECT c FROM t2; 1|0|0|SCAN TABLE t1
|
||||
# 2|0|0|SCAN TABLE t2 0|0|0|COMPOUND SUBQUERIES 1 AND 2
|
||||
# USING TEMP B-TREE (UNION)
|
||||
# EVIDENCE-OF: R-37879-39987 sqlite> EXPLAIN QUERY PLAN
|
||||
# SELECT a FROM t1 UNION SELECT c FROM t2;
|
||||
# 1|0|0|SCAN TABLE t1
|
||||
# 2|0|0|SCAN TABLE t2
|
||||
# 0|0|0|COMPOUND SUBQUERIES 1 AND 2 USING TEMP B-TREE (UNION)
|
||||
#
|
||||
det 5.12 "SELECT a FROM t1 UNION SELECT c FROM t2" {
|
||||
1 0 0 {SCAN TABLE t1 USING COVERING INDEX i2}
|
||||
2 0 0 {SCAN TABLE t2 USING COVERING INDEX i4}
|
||||
0 0 0 {COMPOUND SUBQUERIES 1 AND 2 USING TEMP B-TREE (UNION)}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-61538-24748 sqlite> EXPLAIN QUERY PLAN SELECT a FROM
|
||||
# t1 EXCEPT SELECT d FROM t2 ORDER BY 1; 1|0|0|SCAN TABLE t1 USING
|
||||
# COVERING INDEX i2 2|0|0|SCAN TABLE t2
|
||||
# 2|0|0|USE TEMP B-TREE FOR ORDER BY 0|0|0|COMPOUND SUBQUERIES 1 AND 2
|
||||
# (EXCEPT)
|
||||
# EVIDENCE-OF: R-44864-63011 sqlite> EXPLAIN QUERY PLAN
|
||||
# SELECT a FROM t1 EXCEPT SELECT d FROM t2 ORDER BY 1;
|
||||
# 1|0|0|SCAN TABLE t1 USING COVERING INDEX i2
|
||||
# 2|0|0|SCAN TABLE t2 2|0|0|USE TEMP B-TREE FOR ORDER BY
|
||||
# 0|0|0|COMPOUND SUBQUERIES 1 AND 2 (EXCEPT)
|
||||
#
|
||||
det 5.13 "SELECT a FROM t1 EXCEPT SELECT d FROM t2 ORDER BY 1" {
|
||||
1 0 0 {SCAN TABLE t1 USING COVERING INDEX i2}
|
||||
2 0 0 {SCAN TABLE t2}
|
||||
|
Loading…
Reference in New Issue
Block a user