]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
A minor variation on check-in [1685610ef8e0dc] which (hopefully) makes the
authordrh <drh@noemail.net>
Mon, 20 May 2019 18:35:49 +0000 (18:35 +0000)
committerdrh <drh@noemail.net>
Mon, 20 May 2019 18:35:49 +0000 (18:35 +0000)
logic a little easier to follow.  Also disallows the use of the double-quoted
string hack in the query expression used for VACUUM INTO, which is not
strictly required, but moves us toward the goal of disallowing the double-quoted
string hack everywhere.

FossilOrigin-Name: 3e1b55f3ab85710ed81574904718205c7370b5f0b5a41029e961486d2e3f37c7

manifest
manifest.uuid
src/resolve.c
src/sqliteInt.h

index 1eaaa80fbf54de49f8e457dd3282bd41d57e4296..b7c519ebfcd74468a327ba0a9150042c90d1fa9e 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Disallow\sstring\sconstants\senclosed\sin\sdouble-quotes\swithin\snew\sCREATE\sTABLE\sand\sCREATE\sINDEX\sstatements.\sIt\sis\sstill\spossible\sto\senclose\scolumn\snames\sin\sdouble-quotes,\sand\sexisting\sdatabase\sschemas\sthat\suse\sdouble-quotes\sfor\sstrings\scan\sstill\sbe\sloaded.\sThis\saddresses\sticket\s[9b78184b].
-D 2019-05-20T17:14:25.060
+C A\sminor\svariation\son\scheck-in\s[1685610ef8e0dc]\swhich\s(hopefully)\smakes\sthe\nlogic\sa\slittle\seasier\sto\sfollow.\s\sAlso\sdisallows\sthe\suse\sof\sthe\sdouble-quoted\nstring\shack\sin\sthe\squery\sexpression\sused\sfor\sVACUUM\sINTO,\swhich\sis\snot\nstrictly\srequired,\sbut\smoves\sus\stoward\sthe\sgoal\sof\sdisallowing\sthe\sdouble-quoted\nstring\shack\severywhere.
+D 2019-05-20T18:35:49.273
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -520,14 +520,14 @@ F src/pragma.h 482c26f352efd7a4ed1354d83ffa992e13004f6528edeee44cdbfd5025a490bd
 F src/prepare.c 78027c6231fbb19ca186a5f5f0c0a1375d9c2cec0655273f9bd90d9ff74a34b3
 F src/printf.c 67f79227273a9009d86a017619717c3f554f50b371294526da59faa6014ed2cd
 F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
-F src/resolve.c 0b046cc3d4d980c92d37200b0d1c4d4c4685103d82734162aa991f965f01b1cb
+F src/resolve.c bae0a7562db77b02d87101b587819d5a5dcd8625e477d2d8a228a20bba4fead6
 F src/rowset.c d977b011993aaea002cab3e0bb2ce50cf346000dff94e944d547b989f4b1fe93
 F src/select.c c620bcd03b1fbf9fed7d0e49c5e32bea3233c3f7c67d896271c36d6e5a4c621c
 F src/shell.c.in 6c992809abf20dbb4aad89299d7c15c98ddf2504b23c83ef71eb435ad392cdc3
 F src/sqlite.h.in d19c873a17c2effd4417f687fad942b6cc0ab0c64535f669cc2f22a5b05db23b
 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
 F src/sqlite3ext.h 9ecc93b8493bd20c0c07d52e2ac0ed8bab9b549c7f7955b59869597b650dd8b5
-F src/sqliteInt.h 4f3edd821ba26fd226a98cec496de1a610460824accbc59dad9640fee5c5b232
+F src/sqliteInt.h edde1d3fa1e267a9b57ed39ca9293994ab957e45298af4681f4a71f584a8e415
 F src/sqliteLimit.h 1513bfb7b20378aa0041e7022d04acb73525de35b80b252f1b83fedb4de6a76b
 F src/status.c 46e7aec11f79dad50965a5ca5fa9de009f7d6bde08be2156f1538a0a296d4d0e
 F src/table.c b46ad567748f24a326d9de40e5b9659f96ffff34
@@ -1827,7 +1827,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 99eba69b3a64741c69d167bf7a05dbe138c9e7faecc54a1b8d8220cb23902830
-R d198ec0c1dbc6e91f8bbe5cf32cf98a3
-U dan
-Z 7143d8b31f164a671db524d2917365c4
+P 1685610ef8e0dc9218b02461ceab14dc6114f4f5ef7fcda0da395094aff443e1
+R 1113170f9c5e5be87c5119deda88593e
+U drh
+Z cb44fd552c668e19c46ce895661ff940
index f0bf5c08d4d65e4f51e77c5a278be27cca6de423..6bb3086cda932061f6542f62eeb4fcc83f637375 100644 (file)
@@ -1 +1 @@
-1685610ef8e0dc9218b02461ceab14dc6114f4f5ef7fcda0da395094aff443e1
\ No newline at end of file
+3e1b55f3ab85710ed81574904718205c7370b5f0b5a41029e961486d2e3f37c7
\ No newline at end of file
index c8cce58685793dfca1941d56a8010314428e2b70..65906da90c4d581fd6a0b0a00c4cff7f9b6322b7 100644 (file)
@@ -477,7 +477,7 @@ static int lookupName(
   if( cnt==0 && zTab==0 ){
     assert( pExpr->op==TK_ID );
     if( ExprHasProperty(pExpr,EP_DblQuoted) 
-     && 0==(pTopNC->ncFlags&NC_NewSchema
+     && 0==(pTopNC->ncFlags&NC_NoDblQStr
     ){
       /* If a double-quoted identifier does not match any known column name,
       ** then treat it as a string.
@@ -1771,8 +1771,8 @@ int sqlite3ResolveSelfReference(
   sNC.pParse = pParse;
   sNC.pSrcList = &sSrc;
   sNC.ncFlags = type;
-  if( pTab && !pParse->db->init.busy && !sqlite3WritableSchema(pParse->db) ){
-    sNC.ncFlags |= NC_NewSchema;
+  if( !pParse->db->init.busy && !sqlite3WritableSchema(pParse->db) ){
+    sNC.ncFlags |= NC_NoDblQStr;
   }
   if( (rc = sqlite3ResolveExprNames(&sNC, pExpr))!=SQLITE_OK ) return rc;
   if( pList ) rc = sqlite3ResolveExprListNames(&sNC, pList);
index fc4b4600295ad281878ec9351e3f3bd6fc3f9208..630239ff4b5ef48bac50cc42d145315d59c62e78 100644 (file)
@@ -2793,7 +2793,8 @@ struct NameContext {
 #define NC_Complex   0x2000  /* True if a function or subquery seen */
 #define NC_AllowWin  0x4000  /* Window functions are allowed here */
 #define NC_HasWin    0x8000  /* One or more window functions seen */
-#define NC_NewSchema 0x10000 /* Currently resolving self-refs for new object */
+#define NC_NoDblQStr 0x10000 /* Do not allow double-quoted string hack.
+                             ** Mnemonic: "NO DouBLe-Quoted STRings" */
 
 /*
 ** An instance of the following object describes a single ON CONFLICT