/ Check-in [90f4cf2a]
Login

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

Overview
Comment:Add hooks for the SSE extension. (CVS 2449)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:90f4cf2ad57309dbd20954fc7fd60859bc44bcf4
User & Date: drh 2005-04-28 19:03:37
Context
2005-04-29
02:10
Prevent a segfault described by ticket #1229. (CVS 2450) check-in: 0667eae9 user: drh tags: trunk
2005-04-28
19:03
Add hooks for the SSE extension. (CVS 2449) check-in: 90f4cf2a user: drh tags: trunk
17:18
Enhancements to allow for extensions. (CVS 2448) check-in: 6863703a user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pragma.c.

     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains code used to implement the PRAGMA command.
    13     13   **
    14         -** $Id: pragma.c,v 1.91 2005/03/29 03:10:59 danielk1977 Exp $
           14  +** $Id: pragma.c,v 1.92 2005/04/28 19:03:37 drh Exp $
    15     15   */
    16     16   #include "sqliteInt.h"
    17     17   #include "os.h"
    18     18   #include <ctype.h>
    19     19   
    20     20   /* Ignore this whole file if pragmas are disabled
    21     21   */
................................................................................
   900    900           sqlite3VdbeOp3(v, OP_String, 0, 0, 
   901    901               (j>=0 && j<=4) ? azLockName[j] : "unknown", P3_STATIC);
   902    902         }
   903    903         sqlite3VdbeAddOp(v, OP_Callback, 2, 0);
   904    904       }
   905    905     }else
   906    906   #endif
          907  +
          908  +#ifdef SQLITE_SSE
          909  +  /*
          910  +  ** Check to see if the sqlite_statements table exists.  Create it
          911  +  ** if it does not.
          912  +  */
          913  +  if( sqlite3StrICmp(zLeft, "create_sqlite_statement_table")==0 ){
          914  +    extern int sqlite3CreateStatementsTable(sqlite3*);
          915  +    sqlite3CreateStatementsTable(db);
          916  +  }else
          917  +#endif
   907    918   
   908    919     {}
   909    920   
   910    921     if( v ){
   911    922       /* Code an OP_Expire at the end of each PRAGMA program to cause
   912    923       ** the VDBE implementing the pragma to expire. Most (all?) pragmas
   913    924       ** are only valid for a single execution.

Changes to src/tclsqlite.c.

     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** A TCL Interface to SQLite
    13     13   **
    14         -** $Id: tclsqlite.c,v 1.122 2005/04/28 17:18:49 drh Exp $
           14  +** $Id: tclsqlite.c,v 1.123 2005/04/28 19:03:37 drh Exp $
    15     15   */
    16     16   #ifndef NO_TCL     /* Omit this whole file if TCL is unavailable */
    17     17   
    18     18   #include "sqliteInt.h"
    19     19   #include "hash.h"
    20     20   #include "tcl.h"
    21     21   #include <stdlib.h>
................................................................................
  1775   1775   
  1776   1776       Sqlitetest1_Init(interp);
  1777   1777       Sqlitetest2_Init(interp);
  1778   1778       Sqlitetest3_Init(interp);
  1779   1779       Sqlitetest4_Init(interp);
  1780   1780       Sqlitetest5_Init(interp);
  1781   1781       Md5_Init(interp);
  1782         -#ifdef SQLITE_TEST_SSE
         1782  +#ifdef SQLITE_SSE
  1783   1783       Sqlitetestsse_Init(interp);
  1784   1784   #endif
  1785   1785     }
  1786   1786   #endif
  1787   1787     if( argc>=2 || TCLSH==2 ){
  1788   1788       int i;
  1789   1789       Tcl_SetVar(interp,"argv0",argv[1],TCL_GLOBAL_ONLY);

Changes to src/vacuum.c.

    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains code used to implement the VACUUM command.
    13     13   **
    14     14   ** Most of the code in this file may be omitted by defining the
    15     15   ** SQLITE_OMIT_VACUUM macro.
    16     16   **
    17         -** $Id: vacuum.c,v 1.40 2005/02/16 03:27:05 drh Exp $
           17  +** $Id: vacuum.c,v 1.41 2005/04/28 19:03:37 drh Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   #include "os.h"
    21     21   
    22     22   #ifndef SQLITE_OMIT_VACUUM
    23     23   /*
    24     24   ** Generate a random name of 20 character in length.
................................................................................
   292    292     if( zTemp ){
   293    293       sqlite3OsDelete(zTemp);
   294    294       sqliteFree(zTemp);
   295    295     }
   296    296     if( zSql ) sqliteFree( zSql );
   297    297     sqlite3ResetInternalSchema(db, 0);
   298    298   #endif
          299  +
          300  +#ifdef SQLITE_SSE
          301  +  /* If the SSE extension is compiled in, recompile all statements
          302  +  ** in the sqlite_statements table after a successful VACUUM
          303  +  */
          304  +  if( rc==SQLITE_OK ){
          305  +    extern int sqlite3RecompileStatements(sqlite3*);
          306  +    rc = sqlite3RecompileStatements(db);
          307  +  }
          308  +#endif /* SQLITE_SSE */
          309  +
   299    310     return rc;
   300    311   }