/ Check-in [e8313825]
Login

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

Overview
Comment:More changes to do with the new sqlite3_step() API. (CVS 1458)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e83138250ce0a8caacbd1822eec2e06796d2f5f2
User & Date: danielk1977 2004-05-26 00:07:25
Context
2004-05-26
02:04
Use the new API calls more consistently. (CVS 1459) check-in: 17e7db48 user: danielk1977 tags: trunk
00:07
More changes to do with the new sqlite3_step() API. (CVS 1458) check-in: e8313825 user: danielk1977 tags: trunk
00:01
Minor code fixes in btree.c and pragma.c to help with watcom C. (CVS 1457) check-in: 143c502a user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqlite.h.in.

     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 header file defines the interface that the SQLite library
    13     13   ** presents to client programs.
    14     14   **
    15         -** @(#) $Id: sqlite.h.in,v 1.77 2004/05/25 23:35:19 danielk1977 Exp $
           15  +** @(#) $Id: sqlite.h.in,v 1.78 2004/05/26 00:07:25 danielk1977 Exp $
    16     16   */
    17     17   #ifndef _SQLITE_H_
    18     18   #define _SQLITE_H_
    19     19   #include <stdarg.h>     /* Needed for the definition of va_list */
    20     20   
    21     21   /*
    22     22   ** Make sure we can call this stuff from C++.
................................................................................
   581    581     sqlite *db,                   /* The open database */
   582    582     const char *zSql,             /* SQL statement to be compiled */
   583    583     const char **pzTail,          /* OUT: uncompiled tail of zSql */
   584    584     sqlite_vm **ppVm,             /* OUT: the virtual machine to execute zSql */
   585    585     char **pzErrmsg               /* OUT: Error message. */
   586    586   );
   587    587   
   588         -/*
   589         -** After an SQL statement has been compiled, it is handed to this routine
   590         -** to be executed.  This routine executes the statement as far as it can
   591         -** go then returns.  The return value will be one of SQLITE_DONE,
   592         -** SQLITE_ERROR, SQLITE_BUSY, SQLITE_ROW, or SQLITE_MISUSE.
   593         -**
   594         -** SQLITE_DONE means that the execute of the SQL statement is complete
   595         -** an no errors have occurred.  sqlite3_step() should not be called again
   596         -** for the same virtual machine.  *pN is set to the number of columns in
   597         -** the result set and *pazColName is set to an array of strings that
   598         -** describe the column names and datatypes.  The name of the i-th column
   599         -** is (*pazColName)[i] and the datatype of the i-th column is
   600         -** (*pazColName)[i+*pN].  *pazValue is set to NULL.
   601         -**
   602         -** SQLITE_ERROR means that the virtual machine encountered a run-time
   603         -** error.  sqlite3_step() should not be called again for the same
   604         -** virtual machine.  *pN is set to 0 and *pazColName and *pazValue are set
   605         -** to NULL.  Use sqlite3_finalize() to obtain the specific error code
   606         -** and the error message text for the error.
   607         -**
   608         -** SQLITE_BUSY means that an attempt to open the database failed because
   609         -** another thread or process is holding a lock.  The calling routine
   610         -** can try again to open the database by calling sqlite3_step() again.
   611         -** The return code will only be SQLITE_BUSY if no busy handler is registered
   612         -** using the sqlite3_busy_handler() or sqlite3_busy_timeout() routines.  If
   613         -** a busy handler callback has been registered but returns 0, then this
   614         -** routine will return SQLITE_ERROR and sqltie_finalize() will return
   615         -** SQLITE_BUSY when it is called.
   616         -**
   617         -** SQLITE_ROW means that a single row of the result is now available.
   618         -** The data is contained in *pazValue.  The value of the i-th column is
   619         -** (*azValue)[i].  *pN and *pazColName are set as described in SQLITE_DONE.
   620         -** Invoke sqlite3_step() again to advance to the next row.
   621         -**
   622         -** SQLITE_MISUSE is returned if sqlite3_step() is called incorrectly.
   623         -** For example, if you call sqlite3_step() after the virtual machine
   624         -** has halted (after a prior call to sqlite3_step() has returned SQLITE_DONE)
   625         -** or if you call sqlite3_step() with an incorrectly initialized virtual
   626         -** machine or a virtual machine that has been deleted or that is associated
   627         -** with an sqlite structure that has been closed.
   628         -*/
   629         -int sqlite3_step(
   630         -  sqlite_vm *pVm,              /* The virtual machine to execute */
   631         -  int *pN,                     /* OUT: Number of columns in result */
   632         -  const char ***pazValue,      /* OUT: Column data */
   633         -  const char ***pazColName     /* OUT: Column names and datatypes */
   634         -);
   635         -
   636    588   /*
   637    589   ** This routine is called to delete a virtual machine after it has finished
   638    590   ** executing.  The return value is the result code.  SQLITE_OK is returned
   639    591   ** if the statement executed successfully and some other value is returned if
   640    592   ** there was any kind of error.  If an error occurred and pzErrMsg is not
   641    593   ** NULL, then an error message is written into memory obtained from malloc()
   642    594   ** and *pzErrMsg is made to point to that error message.  The calling routine
................................................................................
  1119   1071   **
  1120   1072   ** SQLITE_MISUSE means that the this routine was called inappropriately.
  1121   1073   ** Perhaps it was called on a virtual machine that had already been
  1122   1074   ** finalized or on one that had previously returned SQLITE_ERROR or
  1123   1075   ** SQLITE_DONE.  Or it could be the case the the same database connection
  1124   1076   ** is being used simulataneously by two or more threads.
  1125   1077   */
  1126         -int sqlite3_step_new(sqlite3_stmt*);
         1078  +int sqlite3_step(sqlite3_stmt*);
  1127   1079   
  1128   1080   
  1129   1081   /*
  1130   1082   ** The sqlite3_finalize() function is called to delete a compiled
  1131   1083   ** SQL statement obtained by a previous call to sqlite3_prepare()
  1132   1084   ** or sqlite3_prepare16(). If the statement was executed successfully, or
  1133   1085   ** not executed at all, then SQLITE_OK is returned. If execution of the

Changes to src/test1.c.

     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** Code for testing the printf() interface to SQLite.  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         -** $Id: test1.c,v 1.52 2004/05/25 23:35:19 danielk1977 Exp $
           16  +** $Id: test1.c,v 1.53 2004/05/26 00:07:26 danielk1977 Exp $
    17     17   */
    18     18   #include "sqliteInt.h"
    19     19   #include "tcl.h"
    20     20   #include "os.h"
    21     21   #include <stdlib.h>
    22     22   #include <string.h>
    23     23   
................................................................................
   754    754     if( rc!=0 && rc!=SQLITE_ABORT ){
   755    755       Tcl_AppendResult(interp, sqlite3_error_string(rc), 0);
   756    756       return TCL_ERROR;
   757    757     }
   758    758     return TCL_OK;
   759    759   }
   760    760   
   761         -/*
   762         -** Usage:  sqlite3_step  VM  ?NVAR?  ?VALUEVAR?  ?COLNAMEVAR?
   763         -**
   764         -** Step a virtual machine.  Return a the result code as a string.
   765         -** Column results are written into three variables.
   766         -*/
   767         -#if 0
   768         -static int test_step(
   769         -  void *NotUsed,
   770         -  Tcl_Interp *interp,    /* The TCL interpreter that invoked this command */
   771         -  int argc,              /* Number of arguments */
   772         -  char **argv            /* Text of each argument */
   773         -){
   774         -  sqlite_vm *vm;
   775         -  int rc, i;
   776         -  const char **azValue = 0;
   777         -  const char **azColName = 0;
   778         -  int N = 0;
   779         -  char *zRc;
   780         -  char zBuf[50];
   781         -  if( argc<2 || argc>5 ){
   782         -    Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], 
   783         -       " VM NVAR VALUEVAR COLNAMEVAR", 0);
   784         -    return TCL_ERROR;
   785         -  }
   786         -  if( getVmPointer(interp, argv[1], &vm) ) return TCL_ERROR;
   787         -  rc = sqlite3_step(vm, argc>=3?&N:0, argc>=4?&azValue:0, argc==5?&azColName:0);
   788         -  if( argc>=3 ){
   789         -    sprintf(zBuf, "%d", N);
   790         -    Tcl_SetVar(interp, argv[2], zBuf, 0);
   791         -  }
   792         -  if( argc>=4 ){
   793         -    Tcl_SetVar(interp, argv[3], "", 0);
   794         -    if( azValue ){
   795         -      for(i=0; i<N; i++){
   796         -        Tcl_SetVar(interp, argv[3], azValue[i] ? azValue[i] : "",
   797         -            TCL_APPEND_VALUE | TCL_LIST_ELEMENT);
   798         -      }
   799         -    }
   800         -  }
   801         -  if( argc==5 ){
   802         -    Tcl_SetVar(interp, argv[4], "", 0);
   803         -    if( azColName ){
   804         -      for(i=0; i<N*2; i++){
   805         -        Tcl_SetVar(interp, argv[4], azColName[i] ? azColName[i] : "",
   806         -            TCL_APPEND_VALUE | TCL_LIST_ELEMENT);
   807         -      }
   808         -    }
   809         -  }
   810         -  switch( rc ){
   811         -    case SQLITE_DONE:   zRc = "SQLITE_DONE";    break;
   812         -    case SQLITE_BUSY:   zRc = "SQLITE_BUSY";    break;
   813         -    case SQLITE_ROW:    zRc = "SQLITE_ROW";     break;
   814         -    case SQLITE_ERROR:  zRc = "SQLITE_ERROR";   break;
   815         -    case SQLITE_MISUSE: zRc = "SQLITE_MISUSE";  break;
   816         -    default:            zRc = "unknown";        break;
   817         -  }
   818         -  Tcl_AppendResult(interp, zRc, 0);
   819         -  return TCL_OK;
   820         -}
   821         -#endif
   822         -
   823    761   /*
   824    762   ** Usage:  sqlite3_finalize  STMT 
   825    763   **
   826    764   ** Finalize a statement handle.
   827    765   */
   828    766   static int test_finalize(
   829    767     void * clientData,
................................................................................
  1412   1350   }
  1413   1351   
  1414   1352   /*
  1415   1353   ** Usage: sqlite3_step STMT
  1416   1354   **
  1417   1355   ** Advance the statement to the next row.
  1418   1356   */
  1419         -static int test_step_new(
         1357  +static int test_step(
  1420   1358     void * clientData,
  1421   1359     Tcl_Interp *interp,
  1422   1360     int objc,
  1423   1361     Tcl_Obj *CONST objv[]
  1424   1362   ){
  1425   1363     sqlite3_stmt *pStmt;
  1426   1364     int rc;
................................................................................
  1428   1366     if( objc!=2 ){
  1429   1367       Tcl_AppendResult(interp, "wrong # args: should be \"", 
  1430   1368          Tcl_GetString(objv[0]), " STMT", 0);
  1431   1369       return TCL_ERROR;
  1432   1370     }
  1433   1371   
  1434   1372     if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR;
  1435         -  rc = sqlite3_step_new(pStmt);
         1373  +  rc = sqlite3_step(pStmt);
  1436   1374   
  1437   1375     if( rc!=SQLITE_DONE && rc!=SQLITE_ROW ) return TCL_ERROR;
         1376  +  Tcl_SetResult(interp, errorName(rc), 0);
  1438   1377     return TCL_OK;
  1439   1378   }
  1440   1379   
  1441   1380   /*
  1442   1381   ** Usage: sqlite3_column_data STMT column
  1443   1382   **
  1444   1383   ** Advance the statement to the next row.
................................................................................
  1500   1439   
  1501   1440     len = sqlite3_column_bytes16(pStmt, col);
  1502   1441     pRet = Tcl_NewByteArrayObj(sqlite3_column_data16(pStmt, col), len);
  1503   1442     Tcl_SetObjResult(interp, pRet);
  1504   1443   
  1505   1444     return TCL_OK;
  1506   1445   }
         1446  +
         1447  +/*
         1448  +** Usage: sqlite3_column_count STMT 
         1449  +**
         1450  +** Return the number of columns returned by the sql statement STMT.
         1451  +*/
         1452  +static int test_column_count(
         1453  +  void * clientData,
         1454  +  Tcl_Interp *interp,
         1455  +  int objc,
         1456  +  Tcl_Obj *CONST objv[]
         1457  +){
         1458  +  sqlite3_stmt *pStmt;
         1459  +
         1460  +  if( objc!=2 ){
         1461  +    Tcl_AppendResult(interp, "wrong # args: should be \"", 
         1462  +       Tcl_GetString(objv[0]), " STMT column", 0);
         1463  +    return TCL_ERROR;
         1464  +  }
         1465  +
         1466  +  if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR;
         1467  +
         1468  +  Tcl_SetObjResult(interp, Tcl_NewIntObj(sqlite3_column_count(pStmt)));
         1469  +  return TCL_OK;
         1470  +}
         1471  +
         1472  +/*
         1473  +** Usage: sqlite3_data_count STMT 
         1474  +**
         1475  +** Return the number of columns returned by the sql statement STMT.
         1476  +*/
         1477  +static int test_data_count(
         1478  +  void * clientData,
         1479  +  Tcl_Interp *interp,
         1480  +  int objc,
         1481  +  Tcl_Obj *CONST objv[]
         1482  +){
         1483  +  sqlite3_stmt *pStmt;
         1484  +
         1485  +  if( objc!=2 ){
         1486  +    Tcl_AppendResult(interp, "wrong # args: should be \"", 
         1487  +       Tcl_GetString(objv[0]), " STMT column", 0);
         1488  +    return TCL_ERROR;
         1489  +  }
         1490  +
         1491  +  if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR;
         1492  +
         1493  +  Tcl_SetObjResult(interp, Tcl_NewIntObj(sqlite3_data_count(pStmt)));
         1494  +  return TCL_OK;
         1495  +}
  1507   1496   
  1508   1497   /*
  1509   1498   ** This is a collating function named "REVERSE" which sorts text
  1510   1499   ** in reverse order.
  1511   1500   */
  1512   1501   static int reverseCollatingFunc(
  1513   1502     void *NotUsed,
................................................................................
  1573   1562        { "sqlite_register_test_function", (Tcl_CmdProc*)test_register_func    },
  1574   1563        { "sqlite_abort",                  (Tcl_CmdProc*)sqlite_abort          },
  1575   1564        { "sqlite_datatypes",              (Tcl_CmdProc*)sqlite_datatypes      },
  1576   1565   #ifdef MEMORY_DEBUG
  1577   1566        { "sqlite_malloc_fail",            (Tcl_CmdProc*)sqlite_malloc_fail    },
  1578   1567        { "sqlite_malloc_stat",            (Tcl_CmdProc*)sqlite_malloc_stat    },
  1579   1568   #endif
  1580         -/*{ "sqlite_step",                    (Tcl_CmdProc*)test_step * },*/
  1581   1569        { "sqlite_bind",                    (Tcl_CmdProc*)test_bind             },
  1582   1570        { "breakpoint",                     (Tcl_CmdProc*)test_breakpoint       },
  1583   1571     };
  1584   1572     static struct {
  1585   1573        char *zName;
  1586   1574        Tcl_ObjCmdProc *xProc;
  1587   1575     } aObjCmd[] = {
................................................................................
  1597   1585        { "sqlite3_errmsg16",              (Tcl_ObjCmdProc*)test_errmsg16      },
  1598   1586        { "sqlite3_prepare",               (Tcl_ObjCmdProc*)test_prepare       },
  1599   1587        { "sqlite3_prepare16",             (Tcl_ObjCmdProc*)test_prepare16     },
  1600   1588        { "sqlite3_open",                  (Tcl_ObjCmdProc*)test_open          },
  1601   1589        { "sqlite3_open16",                (Tcl_ObjCmdProc*)test_open16        },
  1602   1590        { "sqlite3_finalize",              (Tcl_ObjCmdProc*)test_finalize      },
  1603   1591        { "sqlite3_reset",                 (Tcl_ObjCmdProc*)test_reset         },
  1604         -     { "sqlite3_step",                  (Tcl_ObjCmdProc*)test_step_new      },
         1592  +     { "sqlite3_step",                  (Tcl_ObjCmdProc*)test_step},
  1605   1593        { "sqlite3_column_data",           (Tcl_ObjCmdProc*)test_column_data   },
  1606   1594        { "sqlite3_column_data16",         (Tcl_ObjCmdProc*)test_column_data16   },
         1595  +     { "sqlite3_column_count",          (Tcl_ObjCmdProc*)test_column_count   },
         1596  +     { "sqlite3_data_count",            (Tcl_ObjCmdProc*)test_data_count   },
  1607   1597        { "add_reverse_collating_func",    (Tcl_ObjCmdProc*)reverse_collfunc   },
  1608   1598     };
  1609   1599     int i;
  1610   1600   
  1611   1601     for(i=0; i<sizeof(aCmd)/sizeof(aCmd[0]); i++){
  1612   1602       Tcl_CreateCommand(interp, aCmd[i].zName, aCmd[i].xProc, 0, 0);
  1613   1603     }

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.329 2004/05/25 23:35:19 danielk1977 Exp $
           46  +** $Id: vdbe.c,v 1.330 2004/05/26 00:07:26 danielk1977 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   /*
................................................................................
   488    488     }else{
   489    489       pStack->r = 0.0;
   490    490     }
   491    491   /*  pStack->flags |= MEM_Real; */
   492    492     pStack->flags = MEM_Real;
   493    493   }
   494    494   
   495         -/*
   496         -** Advance the virtual machine to the next output row.
   497         -**
   498         -** The return vale will be either SQLITE_BUSY, SQLITE_DONE, 
   499         -** SQLITE_ROW, SQLITE_ERROR, or SQLITE_MISUSE.
   500         -**
   501         -** SQLITE_BUSY means that the virtual machine attempted to open
   502         -** a locked database and there is no busy callback registered.
   503         -** Call sqlite3_step() again to retry the open.  *pN is set to 0
   504         -** and *pazColName and *pazValue are both set to NULL.
   505         -**
   506         -** SQLITE_DONE means that the virtual machine has finished
   507         -** executing.  sqlite3_step() should not be called again on this
   508         -** virtual machine.  *pN and *pazColName are set appropriately
   509         -** but *pazValue is set to NULL.
   510         -**
   511         -** SQLITE_ROW means that the virtual machine has generated another
   512         -** row of the result set.  *pN is set to the number of columns in
   513         -** the row.  *pazColName is set to the names of the columns followed
   514         -** by the column datatypes.  *pazValue is set to the values of each
   515         -** column in the row.  The value of the i-th column is (*pazValue)[i].
   516         -** The name of the i-th column is (*pazColName)[i] and the datatype
   517         -** of the i-th column is (*pazColName)[i+*pN].
   518         -**
   519         -** SQLITE_ERROR means that a run-time error (such as a constraint
   520         -** violation) has occurred.  The details of the error will be returned
   521         -** by the next call to sqlite3_finalize().  sqlite3_step() should not
   522         -** be called again on the VM.
   523         -**
   524         -** SQLITE_MISUSE means that the this routine was called inappropriately.
   525         -** Perhaps it was called on a virtual machine that had already been
   526         -** finalized or on one that had previously returned SQLITE_ERROR or
   527         -** SQLITE_DONE.  Or it could be the case the the same database connection
   528         -** is being used simulataneously by two or more threads.
   529         -*/
   530         -#if 0
   531         -int sqlite3_step(
   532         -  sqlite_vm *pVm,              /* The virtual machine to execute */
   533         -  int *pN,                     /* OUT: Number of columns in result */
   534         -  const char ***pazValue,      /* OUT: Column data */
   535         -  const char ***pazColName     /* OUT: Column names and datatypes */
   536         -){
   537         -  sqlite3_stmt *pStmt = (sqlite3_stmt*)pVm;
   538         -  int rc;
   539         -
   540         -  rc = sqlite3_step_new(pStmt);
   541         -
   542         -  if( pazValue ) *pazValue = 0;
   543         -  if( pazColName ) *pazColName = 0;
   544         -  if( pN ) *pN = 0;
   545         -
   546         -  if( rc==SQLITE_DONE || rc==SQLITE_ROW ){
   547         -    int i;
   548         -    int cols = sqlite3_column_count(pStmt) * (pazColName?1:0);
   549         -    int vals = sqlite3_data_count(pStmt) * (pazValue?1:0);
   550         -
   551         -    /* Temporary memory leak */
   552         -    if( cols ) *pazColName = sqliteMalloc(sizeof(char *)*cols * 2); 
   553         -    if( pN ) *pN = cols;
   554         -
   555         -    for(i=0; i<cols; i++){
   556         -      (*pazColName)[i] = sqlite3_column_name(pStmt, i);
   557         -    }
   558         -    for(i=cols; i<(2*cols); i++){
   559         -      (*pazColName)[i] = sqlite3_column_decltype(pStmt, i-cols);
   560         -    }
   561         -
   562         -    if( rc==SQLITE_ROW ){
   563         -      if( vals ) *pazValue = sqliteMalloc(sizeof(char *)*vals); 
   564         -      for(i=0; i<vals; i++){
   565         -        (*pazValue)[i] = sqlite3_column_data(pStmt, i);
   566         -      }
   567         -    }
   568         -  }
   569         -
   570         -  return rc;
   571         -}
   572         -#endif 
   573         -
   574    495   /*
   575    496   ** Execute the statement pStmt, either until a row of data is ready, the
   576    497   ** statement is completely executed or an error occurs.
   577    498   */
   578         -int sqlite3_step_new(sqlite3_stmt *pStmt){
          499  +int sqlite3_step(sqlite3_stmt *pStmt){
   579    500     Vdbe *p = (Vdbe*)pStmt;
   580    501     sqlite *db;
   581    502     int rc;
   582    503   
   583    504     if( p->magic!=VDBE_MAGIC_RUN ){
   584    505       return SQLITE_MISUSE;
   585    506     }

Changes to test/bind.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 script testing the sqlite_bind API.
    13     13   #
    14         -# $Id: bind.test,v 1.7 2004/05/24 12:55:55 danielk1977 Exp $
           14  +# $Id: bind.test,v 1.8 2004/05/26 00:07:25 danielk1977 Exp $
    15     15   #
    16     16   
    17     17   set testdir [file dirname $argv0]
    18     18   source $testdir/tester.tcl
           19  +
           20  +proc sqlite_step {stmt N VALS COLS} {
           21  +  upvar VALS vals
           22  +  upvar COLS cols
           23  +  set vals [list]
           24  +  set cols [list]
           25  +
           26  +  set rc [sqlite3_step $stmt]
           27  +  for {set i 0} {$i < [sqlite3_column_count $stmt]} {incr i} {
           28  +    lappend cols [sqlite3_column_name $stmt $i]
           29  +  }
           30  +  for {set i 0} {$i < [sqlite3_data_count $stmt]} {incr i} {
           31  +    lappend vals [sqlite3_column_data $stmt $i]
           32  +  }
           33  +
           34  +  return $rc
           35  +}
    19     36   
    20     37   do_test bind-1.1 {
    21     38     db close
    22     39     set DB [sqlite db test.db]
    23     40     execsql {CREATE TABLE t1(a,b,c)}
    24     41     set VM [sqlite3_prepare $DB {INSERT INTO t1 VALUES(?,?,?)} -1 TAIL]
    25     42     set TAIL