/ Check-in [3771faa8]
Login

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

Overview
Comment:Add evidence marks for the sqlite3_blob_reopen() interface. Fix compiler warnings in test1.c. Fix incorrect evidence marks on e_select.tcl.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3771faa88eda3eb91264ce0982e22f53596abd4b
User & Date: drh 2010-11-02 15:26:24
Context
2010-11-02
17:41
Changes to allow FTS4 tables to be created without the underlying %_docsize table (in order to save space). (check-in: 31989b18 user: dan tags: trunk)
15:26
Add evidence marks for the sqlite3_blob_reopen() interface. Fix compiler warnings in test1.c. Fix incorrect evidence marks on e_select.tcl. (check-in: 3771faa8 user: drh tags: trunk)
2010-11-01
18:45
Add test cases to restore coverage of pager.c and wal.c. (check-in: 6cae5529 user: dan tags: trunk)
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqlite.h.in.

  3366   3366   ** aggregate. ^A scalar SQL function requires an implementation of the xFunc
  3367   3367   ** callback only; NULL pointers must be passed as the xStep and xFinal
  3368   3368   ** parameters. ^An aggregate SQL function requires an implementation of xStep
  3369   3369   ** and xFinal and NULL pointer must be passed for xFunc. ^To delete an existing
  3370   3370   ** SQL function or aggregate, pass NULL poiners for all three function
  3371   3371   ** callbacks.
  3372   3372   **
  3373         -** ^If the tenth parameter to sqlite3_create_function_v2() is not NULL,
  3374         -** then it is destructor for the application data point that is invoked
  3375         -** when the function is deleted, either by being
  3376         -** overloaded or when the database connection closes.  
         3373  +** ^(If the tenth parameter to sqlite3_create_function_v2() is not NULL,
         3374  +** then it is destructor for the application data pointer. 
         3375  +** The destructor is invoked when the function is deleted, either by being
         3376  +** overloaded or when the database connection closes.)^
  3377   3377   ** ^The destructor is also invoked if the call to
  3378   3378   ** sqlite3_create_function_v2() fails.
  3379   3379   ** ^When the destructor callback of the tenth parameter is invoked, it
  3380   3380   ** is passed a single argument which is a copy of the application data 
  3381   3381   ** pointer which was the fifth parameter to sqlite3_create_function_v2().
  3382   3382   **
  3383   3383   ** ^It is permitted to register multiple implementations of the same
................................................................................
  4789   4789     int flags,
  4790   4790     sqlite3_blob **ppBlob
  4791   4791   );
  4792   4792   
  4793   4793   /*
  4794   4794   ** CAPI3REF: Move a BLOB Handle to a New Row
  4795   4795   **
  4796         -** This function is used to move an existing blob handle so that it points
  4797         -** to a different row of the same database table. The new row is identified
         4796  +** ^This function is used to move an existing blob handle so that it points
         4797  +** to a different row of the same database table. ^The new row is identified
  4798   4798   ** by the rowid value passed as the second argument. Only the row can be
  4799         -** changed, the database, table and column on which the blob handle is open
         4799  +** changed. ^The database, table and column on which the blob handle is open
  4800   4800   ** remain the same. Moving an existing blob handle to a new row can be
  4801   4801   ** faster than closing the existing handle and opening a new one.
  4802   4802   **
  4803         -** The new row must meet the same criteria as for [sqlite3_blob_open()] -
         4803  +** ^(The new row must meet the same criteria as for [sqlite3_blob_open()] -
  4804   4804   ** it must exist and there must be either a blob or text value stored in
  4805         -** the nominated column. If the new row is not present in the table, or if
         4805  +** the nominated column.)^ ^If the new row is not present in the table, or if
  4806   4806   ** it does not contain a blob or text value, or if another error occurs, an
  4807   4807   ** SQLite error code is returned and the blob handle is considered aborted.
  4808         -** All subsequent calls to [sqlite3_blob_read()], [sqlite3_blob_write()] or
         4808  +** ^All subsequent calls to [sqlite3_blob_read()], [sqlite3_blob_write()] or
  4809   4809   ** [sqlite3_blob_reopen()] on an aborted blob handle immediately return
  4810   4810   ** SQLITE_ABORT.
  4811   4811   **
  4812         -** This function sets the database handle error code and message.
         4812  +** ^This function sets the database handle error code and message.
  4813   4813   */
  4814   4814   SQLITE_EXPERIMENTAL int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
  4815   4815   
  4816   4816   /*
  4817   4817   ** CAPI3REF: Close A BLOB Handle
  4818   4818   **
  4819   4819   ** ^Closes an open [BLOB handle].

Changes to src/test1.c.

  1649   1649   static int test_blob_close(
  1650   1650     ClientData clientData, /* Not used */
  1651   1651     Tcl_Interp *interp,    /* The TCL interpreter that invoked this command */
  1652   1652     int objc,              /* Number of arguments */
  1653   1653     Tcl_Obj *CONST objv[]  /* Command arguments */
  1654   1654   ){
  1655   1655     sqlite3_blob *pBlob;
  1656         -  int nByte;
  1657   1656     
  1658   1657     if( objc!=2 ){
  1659   1658       Tcl_WrongNumArgs(interp, 1, objv, "CHANNEL");
  1660   1659       return TCL_ERROR;
  1661   1660     }
  1662   1661   
  1663   1662     if( blobHandleFromObj(interp, objv[1], &pBlob) ) return TCL_ERROR;
................................................................................
  1774   1773     int objc,              /* Number of arguments */
  1775   1774     Tcl_Obj *CONST objv[]  /* Command arguments */
  1776   1775   ){
  1777   1776     Tcl_WideInt iRowid;
  1778   1777     sqlite3_blob *pBlob;
  1779   1778     int rc;
  1780   1779   
  1781         -  unsigned char *zBuf;
  1782         -  int nBuf;
  1783         -  
  1784   1780     if( objc!=3 ){
  1785   1781       Tcl_WrongNumArgs(interp, 1, objv, "CHANNEL ROWID");
  1786   1782       return TCL_ERROR;
  1787   1783     }
  1788   1784   
  1789   1785     if( blobHandleFromObj(interp, objv[1], &pBlob) ) return TCL_ERROR;
  1790   1786     if( Tcl_GetWideIntFromObj(interp, objv[2], &iRowid) ) return TCL_ERROR;

Changes to test/e_select.test.

   229    229     3  "SELECT 'x'||a||'x' FROM t1" {xax xbx xcx}
   230    230     4  "SELECT 'x'||a||'x' alias FROM t1" {xax xbx xcx}
   231    231     5  "SELECT 'x'||a||'x' AS alias FROM t1" {xax xbx xcx}
   232    232   }
   233    233   
   234    234   # EVIDENCE-OF: R-41233-21397 -- syntax diagram join-source
   235    235   #
   236         -# EVIDENCE-OF: R-28036-03696 -- syntax diagram join-op
          236  +# EVIDENCE-OF: R-45040-11121 -- syntax diagram join-op
   237    237   #
   238    238   do_select_tests e_select-0.4 {
   239    239     1  "SELECT t1.rowid FROM t1" {1 2 3}
   240    240     2  "SELECT t1.rowid FROM t1,t2" {1 1 1 2 2 2 3 3 3}
   241    241     3  "SELECT t1.rowid FROM t1,t2,t3" {1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3}
   242    242   
   243    243     4  "SELECT t1.rowid FROM t1" {1 2 3}
   244    244     5  "SELECT t1.rowid FROM t1 JOIN t2" {1 1 1 2 2 2 3 3 3}
   245    245     6  "SELECT t1.rowid FROM t1 JOIN t2 JOIN t3" 
   246    246        {1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3}
   247    247   
   248    248     7  "SELECT t1.rowid FROM t1 NATURAL JOIN t3" {1 2}
   249    249     8  "SELECT t1.rowid FROM t1 NATURAL LEFT OUTER JOIN t3" {1 2 3}
   250         -  9  "SELECT t1.rowid FROM t1 NATURAL INNER JOIN t3" {1 2}
   251         -  10 "SELECT t1.rowid FROM t1 NATURAL CROSS JOIN t3" {1 2}
          250  +  9  "SELECT t1.rowid FROM t1 NATURAL LEFT JOIN t3" {1 2 3}
          251  +  10 "SELECT t1.rowid FROM t1 NATURAL INNER JOIN t3" {1 2}
          252  +  11 "SELECT t1.rowid FROM t1 NATURAL CROSS JOIN t3" {1 2}
   252    253   
   253         -  11 "SELECT t1.rowid FROM t1 JOIN t3" {1 1 2 2 3 3}
   254         -  12 "SELECT t1.rowid FROM t1 LEFT OUTER JOIN t3" {1 1 2 2 3 3}
   255         -  13 "SELECT t1.rowid FROM t1 INNER JOIN t3" {1 1 2 2 3 3}
   256         -  14 "SELECT t1.rowid FROM t1 CROSS JOIN t3" {1 1 2 2 3 3}
          254  +  12 "SELECT t1.rowid FROM t1 JOIN t3" {1 1 2 2 3 3}
          255  +  13 "SELECT t1.rowid FROM t1 LEFT OUTER JOIN t3" {1 1 2 2 3 3}
          256  +  14 "SELECT t1.rowid FROM t1 LEFT JOIN t3" {1 1 2 2 3 3}
          257  +  15 "SELECT t1.rowid FROM t1 INNER JOIN t3" {1 1 2 2 3 3}
          258  +  16 "SELECT t1.rowid FROM t1 CROSS JOIN t3" {1 1 2 2 3 3}
   257    259   }
   258    260   
   259    261   # EVIDENCE-OF: R-56911-63533 -- syntax diagram compound-operator
   260    262   #
   261    263   do_select_tests e_select-0.5 {
   262    264     1  "SELECT rowid FROM t1 UNION ALL SELECT rowid+2 FROM t4" {1 2 3 3 4}
   263    265     2  "SELECT rowid FROM t1 UNION     SELECT rowid+2 FROM t4" {1 2 3 4}