Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch early-vector-size-check Excluding Merge-Ins
This is equivalent to a diff from 7d9bd22c to 56562a03
2016-09-05
| ||
12:12 | Do vector comparison size checking early - at name resolution time - to forestall future problems. (check-in: ae127bcc user: drh tags: rowvalue) | |
12:02 | Catch vector size mismatch problems during name resolution to avoid later problems. (Closed-Leaf check-in: 56562a03 user: drh tags: early-vector-size-check) | |
09:44 | Fix a crash that could occur under certain circumstances if the vectors on either side of a comparison operator were of a different size. (check-in: 42670935 user: dan tags: rowvalue) | |
2016-09-03
| ||
19:52 | Fix a problem causing the affinity of sub-select row-value elements to be ignored in some contextes. (check-in: 7d9bd22c user: dan tags: rowvalue) | |
16:24 | Merge the fuzzershell enhancement from trunk. (check-in: ed206048 user: drh tags: rowvalue) | |
Changes to src/expr.c.
︙ | |||
518 519 520 521 522 523 524 | 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 | - - - - - - - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + - - - + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - | u8 op, /* Comparison operator */ u8 p5 /* SQLITE_NULLEQ or zero */ ){ Vdbe *v = pParse->pVdbe; Expr *pLeft = pExpr->pLeft; Expr *pRight = pExpr->pRight; int nLeft = sqlite3ExprVectorSize(pLeft); |
︙ |
Changes to src/resolve.c.
︙ | |||
771 772 773 774 775 776 777 778 779 780 781 782 783 784 | 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 | + + + + + + + + + + + + + + + + + + + + + + + + + + + | } } break; } case TK_VARIABLE: { notValid(pParse, pNC, "parameters", NC_IsCheck|NC_PartIdx|NC_IdxExpr); break; } case TK_EQ: case TK_NE: case TK_LT: case TK_LE: case TK_GT: case TK_GE: case TK_IS: case TK_ISNOT: { int nLeft, nRight; if( pParse->db->mallocFailed ) break; assert( pExpr->pRight!=0 ); assert( pExpr->pLeft!=0 ); nLeft = sqlite3ExprVectorSize(pExpr->pLeft); nRight = sqlite3ExprVectorSize(pExpr->pRight); if( nLeft!=nRight ){ testcase( pExpr->op==TK_EQ ); testcase( pExpr->op==TK_NE ); testcase( pExpr->op==TK_LT ); testcase( pExpr->op==TK_LE ); testcase( pExpr->op==TK_GT ); testcase( pExpr->op==TK_GE ); testcase( pExpr->op==TK_IS ); testcase( pExpr->op==TK_ISNOT ); sqlite3ErrorMsg(pParse, "row value misused"); } break; } } return (pParse->nErr || pParse->db->mallocFailed) ? WRC_Abort : WRC_Continue; } /* ** pEList is a list of expressions which are really the result set of the |
︙ |
Changes to src/whereexpr.c.
︙ | |||
1184 1185 1186 1187 1188 1189 1190 | 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 | - - - - - - - + + + + + + + - - - - - - - + + + + + + + - | if( pWC->op==TK_AND && (pExpr->op==TK_EQ || pExpr->op==TK_IS) && sqlite3ExprIsVector(pExpr->pLeft) && ( (pExpr->pLeft->flags & EP_xIsSelect)==0 || (pExpr->pRight->flags & EP_xIsSelect)==0 )){ int nLeft = sqlite3ExprVectorSize(pExpr->pLeft); |
︙ |
Changes to test/rowvalue.test.
︙ | |||
224 225 226 227 228 229 230 231 232 | 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | + + + + + + + + + + + + + + + + + + + + + + + + + + + | CREATE TABLE t3(a TEXT,b TEXT,c TEXT,d TEXT,e TEXT,f TEXT); CREATE INDEX t3x ON t3(b,c,d,e,f); SELECT a FROM t3 WHERE (c,d) IN (SELECT 'c','d' FROM dual) AND (a,b,e) IN (SELECT 'a','b','d' FROM dual); } do_catchsql_test 11.1 { CREATE TABLE t11(a); SELECT * FROM t11 WHERE (a,a)<=1; } {1 {row value misused}} do_catchsql_test 11.2 { SELECT * FROM t11 WHERE (a,a)<1; } {1 {row value misused}} do_catchsql_test 11.3 { SELECT * FROM t11 WHERE (a,a)>=1; } {1 {row value misused}} do_catchsql_test 11.4 { SELECT * FROM t11 WHERE (a,a)>1; } {1 {row value misused}} do_catchsql_test 11.5 { SELECT * FROM t11 WHERE (a,a)==1; } {1 {row value misused}} do_catchsql_test 11.6 { SELECT * FROM t11 WHERE (a,a)<>1; } {1 {row value misused}} do_catchsql_test 11.7 { SELECT * FROM t11 WHERE (a,a) IS 1; } {1 {row value misused}} do_catchsql_test 11.8 { SELECT * FROM t11 WHERE (a,a) IS NOT 1; } {1 {row value misused}} finish_test |
Changes to test/rowvalue4.test.
︙ | |||
302 303 304 305 306 307 308 | 302 303 304 305 306 307 308 309 310 311 | - + | CREATE TABLE c3(d); } do_catchsql_test 8.2 { SELECT * FROM c2 CROSS JOIN c3 WHERE ( (a, b) == (SELECT x, y FROM c1) AND c3.d = c ) OR ( c == (SELECT x, y FROM c1) AND c3.d = c ) |
Changes to test/subselect.test.
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + | } {3 4} # Try a select with more than one result column. # do_test subselect-1.2 { set v [catch {execsql {SELECT * FROM t1 WHERE a = (SELECT * FROM t1)}} msg] lappend v $msg |
︙ |