/ Check-in [3ebedbb6]
Login

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

Overview
Comment:Tighten an assert (ticket #1920). Change to "sqlite3.h" from <sqlite3.h> on the sqlite3ext.h header (ticket #1916). Fix a bug in the test scripts. (CVS 3354)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3ebedbb6f90ec0f9d3bed181f8fb5366f91fc48c
User & Date: drh 2006-08-15 14:21:16
Context
2006-08-16
16:42
Allows UPDATE, INSERT, and DELETEs to occur while a SELECT is pending on the same table. (CVS 3355) check-in: 8c52d2ad user: drh tags: trunk
2006-08-15
14:21
Tighten an assert (ticket #1920). Change to "sqlite3.h" from <sqlite3.h> on the sqlite3ext.h header (ticket #1916). Fix a bug in the test scripts. (CVS 3354) check-in: 3ebedbb6 user: drh tags: trunk
2006-08-14
14:23
Change the table_info pragma to show the text of the default value expression, not the result of evaluating the default value expression. Ticket #1919. (CVS 3353) check-in: b4d53974 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqlite3ext.h.

    11     11   *************************************************************************
    12     12   ** This header file defines the SQLite interface for use by
    13     13   ** shared libraries that want to be imported as extensions into
    14     14   ** an SQLite instance.  Shared libraries that intend to be loaded
    15     15   ** as extensions by SQLite should #include this file instead of 
    16     16   ** sqlite3.h.
    17     17   **
    18         -** @(#) $Id: sqlite3ext.h,v 1.5 2006/06/27 00:14:28 drh Exp $
           18  +** @(#) $Id: sqlite3ext.h,v 1.6 2006/08/15 14:21:16 drh Exp $
    19     19   */
    20     20   #ifndef _SQLITE3EXT_H_
    21     21   #define _SQLITE3EXT_H_
    22         -#include <sqlite3.h>
           22  +#include "sqlite3.h"
    23     23   
    24     24   typedef struct sqlite3_api_routines sqlite3_api_routines;
    25     25   
    26     26   /*
    27     27   ** The following structure hold pointers to all of the SQLite API
    28     28   ** routines.
    29     29   */

Changes to src/test_tclvar.c.

    12     12   ** Code for testing the virtual table interfaces.  This code
    13     13   ** is not included in the SQLite library.  It is used for automated
    14     14   ** testing of the SQLite library.
    15     15   **
    16     16   ** The emphasis of this file is a virtual table that provides
    17     17   ** access to TCL variables.
    18     18   **
    19         -** $Id: test_tclvar.c,v 1.7 2006/07/08 17:06:44 drh Exp $
           19  +** $Id: test_tclvar.c,v 1.8 2006/08/15 14:21:16 drh Exp $
    20     20   */
    21     21   #include "sqliteInt.h"
    22     22   #include "tcl.h"
    23     23   #include "os.h"
    24     24   #include <stdlib.h>
    25     25   #include <string.h>
    26     26   
................................................................................
   159    159     Tcl_Interp *interp = ((tclvar_vtab *)(pVtabCursor->pVtab))->interp;
   160    160   
   161    161     Tcl_Obj *p = Tcl_NewStringObj("info vars", -1);
   162    162     Tcl_IncrRefCount(p);
   163    163   
   164    164     assert( argc==0 || argc==1 );
   165    165     if( argc==1 ){
   166         -    Tcl_Obj *pArg = Tcl_NewStringObj(sqlite3_value_text(argv[0]), -1);
          166  +    Tcl_Obj *pArg = Tcl_NewStringObj((char*)sqlite3_value_text(argv[0]), -1);
   167    167       Tcl_ListObjAppendElement(0, p, pArg);
   168    168     }
   169    169     Tcl_EvalObjEx(interp, p, TCL_EVAL_GLOBAL);
   170    170     pCur->pList1 = Tcl_GetObjResult(interp);
   171    171     Tcl_IncrRefCount(pCur->pList1);
   172    172     assert( pCur->i1==0 && pCur->i2==0 && pCur->pList2==0 );
   173    173   

Changes to src/vdbe.c.

    39     39   **
    40     40   ** Various scripts scan this source file in order to generate HTML
    41     41   ** documentation, headers files, or other derived files.  The formatting
    42     42   ** of the code in this file is, therefore, important.  See other comments
    43     43   ** in this file for details.  If in doubt, do not deviate from existing
    44     44   ** commenting and indentation practices when changing or adding code.
    45     45   **
    46         -** $Id: vdbe.c,v 1.573 2006/08/08 13:51:43 drh Exp $
           46  +** $Id: vdbe.c,v 1.574 2006/08/15 14:21:16 drh Exp $
    47     47   */
    48     48   #include "sqliteInt.h"
    49     49   #include "os.h"
    50     50   #include <ctype.h>
    51     51   #include "vdbeInt.h"
    52     52   
    53     53   /*
................................................................................
  2976   2976     /* Pop the value R off the top of the stack
  2977   2977     */
  2978   2978     assert( pNos>=p->aStack );
  2979   2979     sqlite3VdbeMemIntegerify(pTos);
  2980   2980     R = pTos->i;
  2981   2981     assert( (pTos->flags & MEM_Dyn)==0 );
  2982   2982     pTos--;
  2983         -  assert( i>=0 && i<=p->nCursor );
         2983  +  assert( i>=0 && i<p->nCursor );
  2984   2984     pCx = p->apCsr[i];
  2985   2985     assert( pCx!=0 );
  2986   2986     pCrsr = pCx->pCursor;
  2987   2987     if( pCrsr!=0 ){
  2988   2988       int res;
  2989   2989       i64 v;         /* The record number on the P1 entry that matches K */
  2990   2990       char *zKey;    /* The value of K */

Changes to test/vtab1.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file implements regression tests for SQLite library.  The
    12     12   # focus of this file is creating and dropping virtual tables.
    13     13   #
    14         -# $Id: vtab1.test,v 1.35 2006/07/08 18:35:00 drh Exp $
           14  +# $Id: vtab1.test,v 1.36 2006/08/15 14:21:16 drh Exp $
    15     15   
    16     16   set testdir [file dirname $argv0]
    17     17   source $testdir/tester.tcl
    18     18   
    19     19   ifcapable !vtab||!schema_pragmas {
    20     20     finish_test
    21     21     return
................................................................................
   392    392   } {1 {MATCH is not implemented}}
   393    393   do_test vtab1-3.13 {
   394    394     set echo_module
   395    395   } [list xBestIndex {SELECT rowid, * FROM 'treal'} \
   396    396           xFilter    {SELECT rowid, * FROM 'treal'}]
   397    397   do_test vtab1-3.14 {
   398    398     set echo_module ""
   399         -btree_breakpoint
   400    399     execsql {
   401    400       SELECT * FROM t1 WHERE b MATCH 'string';
   402    401     }
   403    402   } {}
   404    403   do_test vtab1-3.15 {
   405    404     set echo_module
   406    405   } [list xBestIndex \
................................................................................
   863    862   } {0 1}
   864    863   do_test vtab1.11-5 {
   865    864     execsql {
   866    865       SELECT  glob(a,'2') FROM e
   867    866     }
   868    867   } {{2 1} {2 2}}
   869    868   
          869  +unset -nocomplain echo_module_begin_fail
   870    870   finish_test

Changes to test/vtab_err.test.

     5      5   #
     6      6   #    May you do good and not evil.
     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   #
    12         -# $Id: vtab_err.test,v 1.2 2006/06/23 08:05:39 danielk1977 Exp $
           12  +# $Id: vtab_err.test,v 1.3 2006/08/15 14:21:16 drh Exp $
    13     13   
    14     14   set testdir [file dirname $argv0]
    15     15   source $testdir/tester.tcl
    16     16   
    17     17   ifcapable !vtab {
    18     18     finish_test
    19     19     return
................................................................................
   115    115       if {[info exists ::mallocopts(-cleanup)]} {
   116    116         catch [list uplevel #0 $::mallocopts(-cleanup)] msg
   117    117       }
   118    118     }
   119    119     unset ::mallocopts
   120    120   }
   121    121   
   122         -
          122  +unset -nocomplain echo_module_begin_fail
   123    123   do_ioerr_test vtab_err-1 -tclprep {
   124    124     register_echo_module [sqlite3_connection_pointer db]
   125    125   } -sqlbody {
   126    126     BEGIN;
   127    127     CREATE TABLE r(a PRIMARY KEY, b, c);
   128    128     CREATE VIRTUAL TABLE e USING echo(r);
   129    129     INSERT INTO e VALUES(1, 2, 3);
................................................................................
   155    155       INSERT INTO r2 SELECT * FROM e;
   156    156       INSERT INTO e SELECT a||'x', b, c FROM r2;
   157    157     COMMIT;
   158    158   } 
   159    159   
   160    160   sqlite_malloc_fail 0
   161    161   finish_test
   162         -