]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Disable the undocumented rtreenode() SQL function that is only used for testing,
authordrh <drh@noemail.net>
Tue, 3 Sep 2019 17:55:55 +0000 (17:55 +0000)
committerdrh <drh@noemail.net>
Tue, 3 Sep 2019 17:55:55 +0000 (17:55 +0000)
except when doing a build that is specifically intended for testing.

FossilOrigin-Name: 34cd2d929e21e41373368da846ae4ddd6385c7ba0c45410903717a07aab862a3

ext/rtree/rtree.c
manifest
manifest.uuid

index 28a7c56fcf51bfe1f9b198679aa223065932c9e0..486280247c8e3965be72254f388f0f09d5367af1 100644 (file)
@@ -3549,6 +3549,7 @@ static int rtreeInit(
 }
 
 
+#if defined(SQLITE_TEST)
 /*
 ** Implementation of a scalar function that decodes r-tree nodes to
 ** human readable strings. This can be used for debugging and analysis.
@@ -3610,6 +3611,7 @@ static void rtreenode(sqlite3_context *ctx, int nArg, sqlite3_value **apArg){
   
   sqlite3_result_text(ctx, zText, -1, sqlite3_free);
 }
+#endif
 
 /* This routine implements an SQL function that returns the "depth" parameter
 ** from the front of a blob that is an r-tree node.  For example:
@@ -3639,9 +3641,11 @@ static void rtreedepth(sqlite3_context *ctx, int nArg, sqlite3_value **apArg){
 */
 int sqlite3RtreeInit(sqlite3 *db){
   const int utf8 = SQLITE_UTF8;
-  int rc;
+  int rc = SQLITE_OK;
 
+#if defined(SQLITE_TEST)
   rc = sqlite3_create_function(db, "rtreenode", 2, utf8, 0, rtreenode, 0, 0);
+#endif
   if( rc==SQLITE_OK ){
     rc = sqlite3_create_function(db, "rtreedepth", 1, utf8, 0,rtreedepth, 0, 0);
   }
index 846082bdd5bae8f0eb8d163fbabc1282ae43405a..2a16c720d116a37f131039ff3d5133ee490e759d 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\snew\sinterfaces\ssqlite3_result_pointer(),\sand\nsqlite3_value_pointer()\sand\suse\sthem\sto\stransfer\sthe\seponymous\sFTS3\scolumn\npointer\sto\sthe\ssnippet()\sand\soffsets()\sroutines.\s\sCherrypick\sfrom\scommit\n[8201f4e1]\son\sbranch-3.18.
-D 2018-12-19T17:05:48.510
+C Disable\sthe\sundocumented\srtreenode()\sSQL\sfunction\sthat\sis\sonly\sused\sfor\stesting,\nexcept\swhen\sdoing\sa\sbuild\sthat\sis\sspecifically\sintended\sfor\stesting.
+D 2019-09-03T17:55:55.993
 F Makefile.in 1cc758ce3374a32425e4d130c2fe7b026b20de5b8843243de75f087c0a2661fb
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
 F Makefile.msc 8eeb80162074004e906b53d7340a12a14c471a83743aab975947e95ce061efcc
@@ -273,7 +273,7 @@ F ext/rbu/sqlite3rbu.c 2a89efba9eeba8e6c89a498dc195e8efbdde2694
 F ext/rbu/sqlite3rbu.h 6fb6294c34a9ca93b5894a33bca530c6f08decba
 F ext/rbu/test_rbu.c 5aa22616afac6f71ebd3d9bc9bf1006cfabcca88
 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
-F ext/rtree/rtree.c 497a3040fdb41ba0cc04434b434a6b9e7b0ece78b2de5f9544b60b646a8e5aaa
+F ext/rtree/rtree.c fa37061661b50fc55f069d6f5eee050e6b593a389ecb24f2da20d04bf825585c
 F ext/rtree/rtree.h 834dbcb82dc85b2481cde6a07cdadfddc99e9b9e
 F ext/rtree/rtree1.test d5f0ba215b3bd1d05269ada86e74073b8445852aa0d33a63e10ec63a09c39473
 F ext/rtree/rtree2.test acbb3a4ce0f4fbc2c304d2b4b784cfa161856bba
@@ -1583,8 +1583,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P de0781485701c138be58dcb0bb8eaa9dd2bad828ccafcc40db906f606d967639
-Q +8201f4e1c566f7223c71c07e6b703d1352801f1b2daa0fd00895a18e1944cb4d
-R bf76a158ff1b8786cd0436ceb30a9674
-U dan
-Z dc92f0b4dd07f291e7813b0fabf6e892
+P 553a923c82e968104296253d07dc6e1219747d85ebb7b02640d33d7056418df4
+Q +7b4583f932ff0933280aa73ee69294b488f96d4f2bdc8422cd0136d944d9fb60
+R 160479229dfaf50c9c28f49f4cd87a8e
+U drh
+Z ac3d589fe78ec5d9641a884a62646a8f
index 2ab94187ffbbf67452b10979689b223416aa7a36..06e3a0c42566e3762e8e07fa547f8e635d2f075a 100644 (file)
@@ -1 +1 @@
-553a923c82e968104296253d07dc6e1219747d85ebb7b02640d33d7056418df4
\ No newline at end of file
+34cd2d929e21e41373368da846ae4ddd6385c7ba0c45410903717a07aab862a3
\ No newline at end of file