/ Check-in [56d61895]
Login

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

Overview
Comment:Missing implementation for sqlite3TransferBindings(). (CVS 5675)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 56d618957571f65e88375aad34a6e7dcf22508e1
User & Date: shane 2008-09-04 12:03:43
Context
2008-09-04
17:17
Add support for the SQLITE_THREADSAFE=2 and SQLITE_DEFAULT_MEMSTATUS compilation options. (CVS 5676) check-in: 85c2a589 user: danielk1977 tags: trunk
12:03
Missing implementation for sqlite3TransferBindings(). (CVS 5675) check-in: 56d61895 user: shane tags: trunk
06:22
If SQLITE_ENABLE_LOCKING_STYLE is defined, have the os_unix.c module offer the following extra VFS implementations for explicitly selecting a locking-style: "unix-none", "unix-afp", "unix-posix", "unix-flock" and "unix-dotfile". (CVS 5674) check-in: 6e8fb646 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/prepare.c.

     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains the implementation of the sqlite3_prepare()
    13     13   ** interface, and routines that contribute to loading the database schema
    14     14   ** from disk.
    15     15   **
    16         -** $Id: prepare.c,v 1.95 2008/09/04 05:53:45 danielk1977 Exp $
           16  +** $Id: prepare.c,v 1.96 2008/09/04 12:03:43 shane Exp $
    17     17   */
    18     18   #include "sqliteInt.h"
    19     19   #include <ctype.h>
    20     20   
    21     21   /*
    22     22   ** Fill the InitData structure with an error message that indicates
    23     23   ** that the database is corrupt.
................................................................................
   688    688       }
   689    689       assert( pNew==0 );
   690    690       return 0;
   691    691     }else{
   692    692       assert( pNew!=0 );
   693    693     }
   694    694     sqlite3VdbeSwap((Vdbe*)pNew, p);
   695         -  sqlite3_transfer_bindings(pNew, (sqlite3_stmt*)p);
          695  +  sqlite3TransferBindings(pNew, (sqlite3_stmt*)p);
   696    696     sqlite3VdbeResetStepResult((Vdbe*)pNew);
   697    697     sqlite3VdbeFinalize((Vdbe*)pNew);
   698    698     return 1;
   699    699   }
   700    700   
   701    701   
   702    702   /*

Changes to src/vdbeapi.c.

     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   **
    13     13   ** This file contains code use to implement APIs that are part of the
    14     14   ** VDBE.
    15     15   **
    16         -** $Id: vdbeapi.c,v 1.140 2008/08/21 12:19:44 danielk1977 Exp $
           16  +** $Id: vdbeapi.c,v 1.141 2008/09/04 12:03:43 shane Exp $
    17     17   */
    18     18   #include "sqliteInt.h"
    19     19   #include "vdbeInt.h"
    20     20   
    21     21   #if 0 && defined(SQLITE_ENABLE_MEMORY_MANAGEMENT)
    22     22   /*
    23     23   ** The following structure contains pointers to the end points of a
................................................................................
  1223   1223   }
  1224   1224   
  1225   1225   /*
  1226   1226   ** Transfer all bindings from the first statement over to the second.
  1227   1227   ** If the two statements contain a different number of bindings, then
  1228   1228   ** an SQLITE_ERROR is returned.
  1229   1229   */
  1230         -int sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){
         1230  +int sqlite3TransferBindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){
  1231   1231     Vdbe *pFrom = (Vdbe*)pFromStmt;
  1232   1232     Vdbe *pTo = (Vdbe*)pToStmt;
  1233   1233     int i, rc = SQLITE_OK;
  1234   1234     if( (pFrom->magic!=VDBE_MAGIC_RUN && pFrom->magic!=VDBE_MAGIC_HALT)
  1235   1235       || (pTo->magic!=VDBE_MAGIC_RUN && pTo->magic!=VDBE_MAGIC_HALT)
  1236   1236       || pTo->db!=pFrom->db ){
  1237   1237       return SQLITE_MISUSE;
................................................................................
  1243   1243     for(i=0; rc==SQLITE_OK && i<pFrom->nVar; i++){
  1244   1244       sqlite3VdbeMemMove(&pTo->aVar[i], &pFrom->aVar[i]);
  1245   1245     }
  1246   1246     sqlite3_mutex_leave(pTo->db->mutex);
  1247   1247     assert( rc==SQLITE_OK || rc==SQLITE_NOMEM );
  1248   1248     return rc;
  1249   1249   }
         1250  +
         1251  +/*
         1252  +** Deprecated external interface.  Internal/core SQLite code
         1253  +** should call sqlite3TransferBindings.
         1254  +*/
         1255  +int sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){
         1256  +  return sqlite3TransferBindings(pFromStmt, pToStmt);
         1257  +}
  1250   1258   
  1251   1259   /*
  1252   1260   ** Return the sqlite3* database handle to which the prepared statement given
  1253   1261   ** in the argument belongs.  This is the same database handle that was
  1254   1262   ** the first argument to the sqlite3_prepare() that was used to create
  1255   1263   ** the statement in the first place.
  1256   1264   */