]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add comments and testcase() macros to the fix for shared-cache schema default
authordrh <drh@noemail.net>
Wed, 18 Mar 2009 10:36:12 +0000 (10:36 +0000)
committerdrh <drh@noemail.net>
Wed, 18 Mar 2009 10:36:12 +0000 (10:36 +0000)
value problem of check-in (6353). (CVS 6356)

FossilOrigin-Name: 05d8607d44cd3ff262c07cc1192f4471f3192b09

manifest
manifest.uuid
src/expr.c

index 5626aee46fec5c7713047109e607d9f1a3ef25f8..d6161766da4e5c0b9d89795a2f07ef17a60744b0 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\ssome\scases\swhere\sexecuting\sSQL\sfrom\swithin\sa\suser-function\scallback\scould\scause\sproblems\srelated\sto\sstatement-transactions.\s(CVS\s6355)
-D 2009-03-18T10:33:01
+C Add\scomments\sand\stestcase()\smacros\sto\sthe\sfix\sfor\sshared-cache\sschema\sdefault\nvalue\sproblem\sof\scheck-in\s(6353).\s(CVS\s6356)
+D 2009-03-18T10:36:13
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -111,7 +111,7 @@ F src/callback.c 09c6fedc77a45db99ba25a75d61382830314b357
 F src/complete.c cb14e06dbe79dee031031f0d9e686ff306afe07c
 F src/date.c 0d804df3bbda46329946a01ff5c75c3f4f135218
 F src/delete.c eb1066b2f35489fee46ad765d2b66386fc7d8adf
-F src/expr.c cd95e2dd8892a1632647a8641e8753e3c1995928
+F src/expr.c 7252b38f6453043cd19c71f0d6a7787d94f854dc
 F src/fault.c dc88c821842157460750d2d61a8a8b4197d047ff
 F src/func.c de2eed7d96365210faecda877c5a12cf440bdf42
 F src/global.c 448419c44ce0701104c2121b0e06919b44514c0c
@@ -709,7 +709,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 189785832a7dc9f4a0a2113d850b92b987e0f9bf
-R d44f7a2fcf465cdcd3971d1da17f54cb
-U danielk1977
-Z 855899ed3ec24df7586ecfc973fa4034
+P a60f4191791dd7bb49d5c95b350a9924845b59a8
+R 2f36eda6e161e6a080cb184f285eac84
+U drh
+Z 23cf2226d7483135ac96d763abb548ba
index 48b10606ed78003a6e30f0fe6aeaaa12292a7a3f..4b79b118c5abc2248ead977135d02825839de201 100644 (file)
@@ -1 +1 @@
-a60f4191791dd7bb49d5c95b350a9924845b59a8
\ No newline at end of file
+05d8607d44cd3ff262c07cc1192f4471f3192b09
\ No newline at end of file
index fac0046621b6ffc5f8968e3023ac7d2b4a95c0fe..a7a954c092b405a24c2f695edf6f2112561594ed 100644 (file)
@@ -12,7 +12,7 @@
 ** This file contains routines used for analyzing expressions and
 ** for generating VDBE code that evaluates expressions in SQLite.
 **
-** $Id: expr.c,v 1.419 2009/03/17 17:49:00 danielk1977 Exp $
+** $Id: expr.c,v 1.420 2009/03/18 10:36:13 drh Exp $
 */
 #include "sqliteInt.h"
 
@@ -649,11 +649,22 @@ void sqlite3DequoteExpr(sqlite3 *db, Expr *p){
     return;
   }
   ExprSetProperty(p, EP_Dequoted);
+
+  /* If p->token.dyn==0 and none of EP_Reduced, EP_TokenOnly, or
+  ** EP_SpanOnly are set, that means that the p->token.z string points
+  ** back to the original SQL statement text.  In that case, we need
+  ** to make a copy before modifying the string, otherwise we would
+  ** corrupt the original SQL statement text.
+  */
+  testcase( p->token.dyn==0 && ExprHasProperty(p, EP_Reduced) );
+  testcase( p->token.dyn==0 && ExprHasProperty(p, EP_TokenOnly) );
+  testcase( p->token.dyn==0 && ExprHasProperty(p, EP_SpanOnly) );
   if( p->token.dyn==0
    && !ExprHasAnyProperty(p, EP_Reduced|EP_TokenOnly|EP_SpanOnly) 
   ){
     sqlite3TokenCopy(db, &p->token, &p->token);
   }
+
   sqlite3Dequote((char*)p->token.z);
 }