/ Check-in [34cd2d92]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Disable the undocumented rtreenode() SQL function that is only used for testing, except when doing a build that is specifically intended for testing.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | branch-3.19
Files: files | file ages | folders
SHA3-256: 34cd2d929e21e41373368da846ae4ddd6385c7ba0c45410903717a07aab862a3
User & Date: drh 2019-09-03 17:55:55
Context
2019-09-03
18:43
Fix a buffer overread that could occur when running fts5 prefix queries inside a transaction. Leaf check-in: 0770363b user: drh tags: branch-3.19
17:55
Disable the undocumented rtreenode() SQL function that is only used for testing, except when doing a build that is specifically intended for testing. check-in: 34cd2d92 user: drh tags: branch-3.19
17:39
Disable the undocumented rtreenode() SQL function that is only used for testing, except when doing a build that is specifically intended for testing. check-in: 7b4583f9 user: drh tags: branch-3.9
2018-12-19
17:05
Add new interfaces sqlite3_result_pointer(), and sqlite3_value_pointer() and use them to transfer the eponymous FTS3 column pointer to the snippet() and offsets() routines. Cherrypick from commit [8201f4e1] on branch-3.18. check-in: 553a923c user: dan tags: branch-3.19
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/rtree/rtree.c.

  3545   3545       assert( pRtree->nBusy==1 );
  3546   3546       rtreeRelease(pRtree);
  3547   3547     }
  3548   3548     return rc;
  3549   3549   }
  3550   3550   
  3551   3551   
         3552  +#if defined(SQLITE_TEST)
  3552   3553   /*
  3553   3554   ** Implementation of a scalar function that decodes r-tree nodes to
  3554   3555   ** human readable strings. This can be used for debugging and analysis.
  3555   3556   **
  3556   3557   ** The scalar function takes two arguments: (1) the number of dimensions
  3557   3558   ** to the rtree (between 1 and 5, inclusive) and (2) a blob of data containing
  3558   3559   ** an r-tree node.  For a two-dimensional r-tree structure called "rt", to
................................................................................
  3606   3607       }else{
  3607   3608         zText = sqlite3_mprintf("{%s}", zCell);
  3608   3609       }
  3609   3610     }
  3610   3611     
  3611   3612     sqlite3_result_text(ctx, zText, -1, sqlite3_free);
  3612   3613   }
         3614  +#endif
  3613   3615   
  3614   3616   /* This routine implements an SQL function that returns the "depth" parameter
  3615   3617   ** from the front of a blob that is an r-tree node.  For example:
  3616   3618   **
  3617   3619   **     SELECT rtreedepth(data) FROM rt_node WHERE nodeno=1;
  3618   3620   **
  3619   3621   ** The depth value is 0 for all nodes other than the root node, and the root
................................................................................
  3635   3637   /*
  3636   3638   ** Register the r-tree module with database handle db. This creates the
  3637   3639   ** virtual table module "rtree" and the debugging/analysis scalar 
  3638   3640   ** function "rtreenode".
  3639   3641   */
  3640   3642   int sqlite3RtreeInit(sqlite3 *db){
  3641   3643     const int utf8 = SQLITE_UTF8;
  3642         -  int rc;
         3644  +  int rc = SQLITE_OK;
  3643   3645   
         3646  +#if defined(SQLITE_TEST)
  3644   3647     rc = sqlite3_create_function(db, "rtreenode", 2, utf8, 0, rtreenode, 0, 0);
         3648  +#endif
  3645   3649     if( rc==SQLITE_OK ){
  3646   3650       rc = sqlite3_create_function(db, "rtreedepth", 1, utf8, 0,rtreedepth, 0, 0);
  3647   3651     }
  3648   3652     if( rc==SQLITE_OK ){
  3649   3653   #ifdef SQLITE_RTREE_INT_ONLY
  3650   3654       void *c = (void *)RTREE_COORD_INT32;
  3651   3655   #else