/ Check-in [93626396]
Login

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

Overview
Comment:Fix a bug in the copy method of the TCL interface. Ticket #2201. (CVS 3623)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:936263966ea70792e8abb712730f78cafa1fdbad
User & Date: drh 2007-02-01 01:53:44
Context
2007-02-01
23:02
First cut at adding the COLLATE operator. Regression tests pass (or at least the quick set does) and a few new tests have been added. But many more tests are needed. Rules for combining collations need to be worked out. (CVS 3624) check-in: 85cca7cd user: drh tags: trunk
01:53
Fix a bug in the copy method of the TCL interface. Ticket #2201. (CVS 3623) check-in: 93626396 user: drh tags: trunk
01:40
Allow up to 64 tables in a join (the number of bits in a long long int). The old limit was 32 tables. (CVS 3622) check-in: 505dce8f user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

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.175 2006/12/19 18:57:11 drh Exp $
           14  +** $Id: tclsqlite.c,v 1.176 2007/02/01 01:53:44 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>
................................................................................
  1051   1051       }
  1052   1052       zSql = sqlite3_mprintf("SELECT * FROM '%q'", zTable);
  1053   1053       if( zSql==0 ){
  1054   1054         Tcl_AppendResult(interp, "Error: no such table: ", zTable, 0);
  1055   1055         return TCL_ERROR;
  1056   1056       }
  1057   1057       nByte = strlen(zSql);
  1058         -    rc = sqlite3_prepare(pDb->db, zSql, 0, &pStmt, 0);
         1058  +    rc = sqlite3_prepare(pDb->db, zSql, -1, &pStmt, 0);
  1059   1059       sqlite3_free(zSql);
  1060   1060       if( rc ){
  1061   1061         Tcl_AppendResult(interp, "Error: ", sqlite3_errmsg(pDb->db), 0);
  1062   1062         nCol = 0;
  1063   1063       }else{
  1064   1064         nCol = sqlite3_column_count(pStmt);
  1065   1065       }
................................................................................
  1077   1077       j = strlen(zSql);
  1078   1078       for(i=1; i<nCol; i++){
  1079   1079         zSql[j++] = ',';
  1080   1080         zSql[j++] = '?';
  1081   1081       }
  1082   1082       zSql[j++] = ')';
  1083   1083       zSql[j] = 0;
  1084         -    rc = sqlite3_prepare(pDb->db, zSql, 0, &pStmt, 0);
         1084  +    rc = sqlite3_prepare(pDb->db, zSql, -1, &pStmt, 0);
  1085   1085       free(zSql);
  1086   1086       if( rc ){
  1087   1087         Tcl_AppendResult(interp, "Error: ", sqlite3_errmsg(pDb->db), 0);
  1088   1088         sqlite3_finalize(pStmt);
  1089   1089         return TCL_ERROR;
  1090   1090       }
  1091   1091       in = fopen(zFile, "rb");