From: drh Date: Mon, 14 May 2018 15:26:05 +0000 (+0000) Subject: Convert the schema creation logic in the rtree extension to use the X-Git-Tag: version-3.24.0~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a090ab90d6f570c518026487f35d2d6c94fa2b67;p=thirdparty%2Fsqlite.git Convert the schema creation logic in the rtree extension to use the new sqlite3_str interface. FossilOrigin-Name: fd8b8c4196d3f0f6cb129f43ebf473ada86eefdf16181fa70ceee21e1232b5e1 --- diff --git a/ext/rtree/rtree.c b/ext/rtree/rtree.c index 00513d4005..0211261821 100644 --- a/ext/rtree/rtree.c +++ b/ext/rtree/rtree.c @@ -3494,18 +3494,18 @@ static int rtreeInit( if( (rc = rtreeSqlInit(pRtree, db, argv[1], argv[2], isCreate)) ){ *pzErr = sqlite3_mprintf("%s", sqlite3_errmsg(db)); }else{ - char *zSql = sqlite3_mprintf("CREATE TABLE x(%s", argv[3]); - char *zTmp; + sqlite3_str *pSql = sqlite3_str_new(db); + char *zSql; int ii; - for(ii=4; zSql && ii