From: drh Date: Fri, 10 Feb 2012 17:38:58 +0000 (+0000) Subject: Disable the ability to have multiple values in the VALUES clause of an X-Git-Tag: mountain-lion~6^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=76aad0d1dfa48ec113de235766573f26e0bb32d4;p=thirdparty%2Fsqlite.git Disable the ability to have multiple values in the VALUES clause of an INSERT statement when SQLITE_OMIT_COMPOUND_SELECT is used. FossilOrigin-Name: 92131195d0c24c0116992db51ed5d8316626ba57 --- diff --git a/manifest b/manifest index 6b465d4e87..fb04f1bdd8 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\san\simportant\sbug\sin\sthe\shandling\sof\sEINTR\sin\sunixRead().\s\sNever\scame\nup\son\sx86\sbut\scrashes\son\ssparc. -D 2012-02-10T03:10:27.620 +C Disable\sthe\sability\sto\shave\smultiple\svalues\sin\sthe\sVALUES\sclause\sof\san\nINSERT\sstatement\swhen\sSQLITE_OMIT_COMPOUND_SELECT\sis\sused. +D 2012-02-10T17:38:58.524 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 3f79a373e57c3b92dabf76f40b065e719d31ac34 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -170,7 +170,7 @@ F src/os_unix.c d509b369ed376c77bc547961844a105d3907e4fa F src/os_win.c 5ac061ae1326a71500cee578ed0fd9113b4f6a37 F src/pager.c 2d892f7b901a8867a33bc21742086165a3a99af8 F src/pager.h a435da8421dc7844b7f9c7f37b636c160c50208a -F src/parse.y f36fb379d4f82be77fab088ae280b86ed524016c +F src/parse.y 1ddd71ae55f4b7cbb2672526ea4de023de0f519e F src/pcache.c f8043b433a57aba85384a531e3937a804432a346 F src/pcache.h 1b5dcc3dc8103d03e625b177023ee67764fa6b7c F src/pcache1.c b30b1c35908346ecc43d8d9d17f2ddf6817f8f60 @@ -989,7 +989,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 -P bea05ddddf5089bac9b1aa9fe1d2cd24b069ad44 -R c0159fca8df351a2a43a5aba36c14e85 +P 1a16db0bca717a2582a48332d81854ca90d6d49b +R 4ae3522fd6eccbfc1737e8f5c9c63cf7 U drh -Z fadd9eaaad3a4f73aa794a26fa5c7111 +Z 485b3d0d156b49609a8dc8c25c8298f5 diff --git a/manifest.uuid b/manifest.uuid index 45ce260926..866f339ebe 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -1a16db0bca717a2582a48332d81854ca90d6d49b \ No newline at end of file +92131195d0c24c0116992db51ed5d8316626ba57 \ No newline at end of file diff --git a/src/parse.y b/src/parse.y index 66d5cb695d..ed18e7f973 100644 --- a/src/parse.y +++ b/src/parse.y @@ -711,6 +711,10 @@ 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 ){ @@ -730,6 +734,7 @@ valuelist(A) ::= valuelist(X) COMMA LP exprlist(Y) RP. { A.pSelect = pRight; } } +%endif SQLITE_OMIT_COMPOUND_SELECT %type inscollist_opt {IdList*} %destructor inscollist_opt {sqlite3IdListDelete(pParse->db, $$);}