Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Disable the ability to have multiple values in the VALUES clause of an INSERT statement when SQLITE_OMIT_COMPOUND_SELECT is used. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
92131195d0c24c0116992db51ed5d831 |
User & Date: | drh 2012-02-10 17:38:58.524 |
Context
2012-02-10
| ||
20:43 | Fix a warning coming from the Solaris Studio compiler. (check-in: 33294bbd17 user: drh tags: trunk) | |
18:18 | Pull the latest trunk changes into the apple-osx branch. (check-in: e248598649 user: drh tags: apple-osx) | |
17:54 | Pull all the latest trunk changes into the sessions branch. (check-in: 361fb66a79 user: drh tags: sessions) | |
17:38 | Disable the ability to have multiple values in the VALUES clause of an INSERT statement when SQLITE_OMIT_COMPOUND_SELECT is used. (check-in: 92131195d0 user: drh tags: trunk) | |
03:10 | Fix an important bug in the handling of EINTR in unixRead(). Never came up on x86 but crashes on sparc. (check-in: 1a16db0bca user: drh tags: trunk) | |
Changes
Changes to src/parse.y.
︙ | ︙ | |||
707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 | sqlite3ExprListDelete(pParse->db, $$.pList); sqlite3SelectDelete(pParse->db, $$.pSelect); } valuelist(A) ::= VALUES LP nexprlist(X) RP. { A.pList = X; A.pSelect = 0; } valuelist(A) ::= valuelist(X) COMMA LP exprlist(Y) RP. { Select *pRight = sqlite3SelectNew(pParse, Y, 0, 0, 0, 0, 0, 0, 0, 0); if( X.pList ){ X.pSelect = sqlite3SelectNew(pParse, X.pList, 0, 0, 0, 0, 0, 0, 0, 0); X.pList = 0; } A.pList = 0; if( X.pSelect==0 || pRight==0 ){ sqlite3SelectDelete(pParse->db, pRight); sqlite3SelectDelete(pParse->db, X.pSelect); A.pSelect = 0; }else{ pRight->op = TK_ALL; pRight->pPrior = X.pSelect; pRight->selFlags |= SF_Values; pRight->pPrior->selFlags |= SF_Values; A.pSelect = pRight; } } %type inscollist_opt {IdList*} %destructor inscollist_opt {sqlite3IdListDelete(pParse->db, $$);} %type inscollist {IdList*} %destructor inscollist {sqlite3IdListDelete(pParse->db, $$);} inscollist_opt(A) ::= . {A = 0;} | > > > > > | 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 | sqlite3ExprListDelete(pParse->db, $$.pList); sqlite3SelectDelete(pParse->db, $$.pSelect); } valuelist(A) ::= VALUES LP nexprlist(X) RP. { A.pList = X; A.pSelect = 0; } // Since a list of VALUEs is inplemented as a compound SELECT, we have // to disable the value list option if compound SELECTs are disabled. %ifndef SQLITE_OMIT_COMPOUND_SELECT valuelist(A) ::= valuelist(X) COMMA LP exprlist(Y) RP. { Select *pRight = sqlite3SelectNew(pParse, Y, 0, 0, 0, 0, 0, 0, 0, 0); if( X.pList ){ X.pSelect = sqlite3SelectNew(pParse, X.pList, 0, 0, 0, 0, 0, 0, 0, 0); X.pList = 0; } A.pList = 0; if( X.pSelect==0 || pRight==0 ){ sqlite3SelectDelete(pParse->db, pRight); sqlite3SelectDelete(pParse->db, X.pSelect); A.pSelect = 0; }else{ pRight->op = TK_ALL; pRight->pPrior = X.pSelect; pRight->selFlags |= SF_Values; pRight->pPrior->selFlags |= SF_Values; A.pSelect = pRight; } } %endif SQLITE_OMIT_COMPOUND_SELECT %type inscollist_opt {IdList*} %destructor inscollist_opt {sqlite3IdListDelete(pParse->db, $$);} %type inscollist {IdList*} %destructor inscollist {sqlite3IdListDelete(pParse->db, $$);} inscollist_opt(A) ::= . {A = 0;} |
︙ | ︙ |