Use %w instead of %q when constructing shadow table names for rtree. (CVS 5161)
FossilOrigin-Name: 78f4ba974d9b768b62391d8cd2ed407d49584cb8
This commit is contained in:
parent
58f1c8b773
commit
9f86ad2354
@ -12,7 +12,7 @@
|
||||
** This file contains code for implementations of the r-tree and r*-tree
|
||||
** algorithms packaged as an SQLite virtual table module.
|
||||
**
|
||||
** $Id: rtree.c,v 1.2 2008/05/26 20:19:25 drh Exp $
|
||||
** $Id: rtree.c,v 1.3 2008/05/26 20:49:03 drh Exp $
|
||||
*/
|
||||
|
||||
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RTREE)
|
||||
@ -2411,9 +2411,9 @@ static int rtreeRename(sqlite3_vtab *pVtab, const char *zNewName){
|
||||
Rtree *pRtree = (Rtree *)pVtab;
|
||||
int rc = SQLITE_NOMEM;
|
||||
char *zSql = sqlite3_mprintf(
|
||||
"ALTER TABLE %Q.'%q_node' RENAME TO '%q_node';"
|
||||
"ALTER TABLE %Q.'%q_parent' RENAME TO '%q_parent';"
|
||||
"ALTER TABLE %Q.'%q_rowid' RENAME TO '%q_rowid';"
|
||||
"ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";"
|
||||
"ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";"
|
||||
"ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";"
|
||||
, pRtree->zDb, pRtree->zName, zNewName
|
||||
, pRtree->zDb, pRtree->zName, zNewName
|
||||
, pRtree->zDb, pRtree->zName, zNewName
|
||||
@ -2481,9 +2481,9 @@ static int rtreeSqlInit(
|
||||
|
||||
if( isCreate ){
|
||||
char *zCreate = sqlite3_mprintf(
|
||||
"CREATE TABLE '%q'.'%q_node'(nodeno INTEGER PRIMARY KEY, data BLOB);"
|
||||
"CREATE TABLE '%q'.'%q_rowid'(rowid INTEGER PRIMARY KEY, nodeno INTEGER);"
|
||||
"CREATE TABLE '%q'.'%q_parent'(nodeno INTEGER PRIMARY KEY, parentnode INTEGER);"
|
||||
"CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY, data BLOB);"
|
||||
"CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY, nodeno INTEGER);"
|
||||
"CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY, parentnode INTEGER);"
|
||||
"INSERT INTO '%q'.'%q_node' VALUES(1, zeroblob(%d))",
|
||||
zDb, zPrefix, zDb, zPrefix, zDb, zPrefix, zDb, zPrefix, pRtree->iNodeSize
|
||||
);
|
||||
|
@ -11,7 +11,7 @@
|
||||
#
|
||||
# The focus of this file is testing the r-tree extension.
|
||||
#
|
||||
# $Id: rtree1.test,v 1.1 2008/05/26 18:41:54 danielk1977 Exp $
|
||||
# $Id: rtree1.test,v 1.2 2008/05/26 20:49:04 drh Exp $
|
||||
#
|
||||
|
||||
set testdir [file join [file dirname $argv0] .. .. test]
|
||||
@ -140,7 +140,7 @@ do_test rtree-1.6.1 {
|
||||
catchsql {
|
||||
CREATE VIRTUAL TABLE t1 USING rtree("the key", "x dim.", "x2'dim");
|
||||
}
|
||||
} {1 {table 't1_rowid' already exists}}
|
||||
} {1 {table "t1_rowid" already exists}}
|
||||
do_test rtree-1.6.1 {
|
||||
execsql { DROP TABLE t1_rowid }
|
||||
} {}
|
||||
@ -358,4 +358,3 @@ do_test rtree-8.1.8 { execsql { SELECT ii FROM t6 WHERE x1<5 } } {1 2}
|
||||
|
||||
|
||||
finish_test
|
||||
|
||||
|
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Update\sthe\samalgamation\sbuilder\sto\sincorporate\sthe\sRTREE\sextension.\s(CVS\s5160)
|
||||
D 2008-05-26T20:19:25
|
||||
C Use\s%w\sinstead\sof\s%q\swhen\sconstructing\sshadow\stable\snames\sfor\srtree.\s(CVS\s5161)
|
||||
D 2008-05-26T20:49:03
|
||||
F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
|
||||
F Makefile.in 79aeba12300a54903f1b1257c1e7c190234045dd
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@ -64,10 +64,10 @@ F ext/fts3/mkfts3amal.tcl 252ecb7fe6467854f2aa237bf2c390b74e71f100
|
||||
F ext/icu/README.txt 3b130aa66e7a681136f6add198b076a2f90d1e33
|
||||
F ext/icu/icu.c 12e763d288d23b5a49de37caa30737b971a2f1e2
|
||||
F ext/rtree/README 64b8300581ba2553a4522ec78812dc940482906b
|
||||
F ext/rtree/rtree.c 9352fa04c917a3603ddfa9b0623e0cf039227470
|
||||
F ext/rtree/rtree.c 8b849f0460545eca83b23878914aca7891657b4f
|
||||
F ext/rtree/rtree.h 834dbcb82dc85b2481cde6a07cdadfddc99e9b9e
|
||||
F ext/rtree/rtree.test ec173a9420ff012e4d29b3063add143583a597a7
|
||||
F ext/rtree/rtree1.test 96563843773129eaec544f52768853f06be61d9c
|
||||
F ext/rtree/rtree1.test 7504a4bd3aaad379d2d712bbb05fc75460e8537d
|
||||
F ext/rtree/rtree2.test 98f3c39b03577330566abf3c7e1e0baf8f9aa521
|
||||
F ext/rtree/rtree3.test 46d1959aa651d3df8b64d93762d3061c62b38105
|
||||
F ext/rtree/rtree_perf.tcl 0fabb6d5c48cb8024e042ce5d4bb88998b6ec1cb
|
||||
@ -589,7 +589,7 @@ F tool/speedtest16.c 6f5bc019dcf8b6537f379bbac0408a9e1a86f0b6
|
||||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c e74126bc12178fa29904f711bb100212a5448041
|
||||
F tool/speedtest8inst1.c 025879132979a5fdec11218472cba6cf8f6ec854
|
||||
P b104dcd6adadbd3fe15a348fe9d4d290119e139e
|
||||
R b2d59c86708fea19320a46b10d663097
|
||||
P aa8eba3360c31182f5238e96b83a382374f40fab
|
||||
R 6ae55ee931b382f2653693522f39d2a9
|
||||
U drh
|
||||
Z 0bf3965fe2dcc107d2419d0fa0170efc
|
||||
Z 38ba8ba8b7fad64dd7f56bc5220bc609
|
||||
|
@ -1 +1 @@
|
||||
aa8eba3360c31182f5238e96b83a382374f40fab
|
||||
78f4ba974d9b768b62391d8cd2ed407d49584cb8
|
Loading…
x
Reference in New Issue
Block a user