Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Move the test for an (illegal) scalar sub-query that returns more than one column to earlier in SELECT processing in order to avoid an assert() that can happen later on. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
a55842cfb56b659c88832dce9ce7bafb |
User & Date: | dan 2010-09-02 19:01:16.000 |
Context
2010-09-03
| ||
03:32 | Fix a discrepancy between the documented behavior of SQLITE_DBCONFIG_LOOKASIDE and what it actually does. Also add evidence marks on the DBCONFIG_LOOKASIDE implementation. (check-in: f483be4413 user: drh tags: trunk) | |
2010-09-02
| ||
19:01 | Move the test for an (illegal) scalar sub-query that returns more than one column to earlier in SELECT processing in order to avoid an assert() that can happen later on. (check-in: a55842cfb5 user: dan tags: trunk) | |
18:13 | Fix an off-by-one error in the scratch memory allocator. (check-in: 5a9591607a user: drh tags: trunk) | |
Changes
Changes to src/select.c.
︙ | |||
3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 | 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 | + + + + + + + + + | isAgg = (p->selFlags & SF_Aggregate)!=0; assert( pEList!=0 ); /* Begin generating code. */ v = sqlite3GetVdbe(pParse); if( v==0 ) goto select_end; /* If writing to memory or generating a set ** only a single column may be output. */ #ifndef SQLITE_OMIT_SUBQUERY if( checkForMultiColumnSelectError(pParse, pDest, pEList->nExpr) ){ goto select_end; } #endif /* Generate code for all sub-queries in the FROM clause */ #if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW) for(i=0; !p->pPrior && i<pTabList->nSrc; i++){ struct SrcList_item *pItem = &pTabList->a[i]; SelectDest dest; |
︙ | |||
3693 3694 3695 3696 3697 3698 3699 | 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 | - - - - - - - - - | if( mxSelect && cnt>mxSelect ){ sqlite3ErrorMsg(pParse, "too many terms in compound SELECT"); return 1; } } return multiSelect(pParse, p, pDest); } |
︙ |
Changes to test/e_expr.test.
︙ | |||
1725 1726 1727 1728 1729 1730 1731 | 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 | + + - + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | 2 { EXISTS (SELECT NULL FROM t1) } { EXISTS (SELECT 'bread' FROM t1) } } { set res [db one "SELECT $e1"] do_expr_test e_expr-34.5.${tn}a $e1 integer $res do_expr_test e_expr-34.5.${tn}b $e2 integer $res } #------------------------------------------------------------------------- # Test statements related to scalar sub-queries. |
Changes to test/in.test.
︙ | |||
400 401 402 403 404 405 406 | 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 | - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | SELECT a, b FROM t3 INTERSECT SELECT a, b FROM t2 ); } } {1 {only a single result allowed for a SELECT that is part of an expression}} do_test in-12.6 { catchsql { SELECT * FROM t2 WHERE a IN ( |
︙ |