Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix the shells so that they always enable the codec if it is available, even if no key is supplied. (CVS 1226) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
95989717e17d52b2306374f5cf7613c3 |
User & Date: | drh 2004-02-11 10:37:23.000 |
Context
2004-02-11
| ||
16:38 | Only define _FILE_OFFSET_BITS if it is not already defined. Ticket #605. (CVS 1227) (check-in: 300c5543dc user: drh tags: trunk) | |
10:37 | Fix the shells so that they always enable the codec if it is available, even if no key is supplied. (CVS 1226) (check-in: 95989717e1 user: drh tags: trunk) | |
10:35 | Fix an uninitialized variable in expr.c. Ticket #604. (CVS 1225) (check-in: 1673bf7c7b user: drh tags: trunk) | |
Changes
Changes to src/shell.c.
︙ | ︙ | |||
8 9 10 11 12 13 14 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains code to implement the "sqlite" command line ** utility for accessing SQLite databases. ** | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains code to implement the "sqlite" command line ** utility for accessing SQLite databases. ** ** $Id: shell.c,v 1.87 2004/02/11 10:37:23 drh Exp $ */ #include <stdlib.h> #include <string.h> #include <stdio.h> #include "sqlite.h" #include <ctype.h> |
︙ | ︙ | |||
508 509 510 511 512 513 514 | ** Make sure the database is open. If it is not, then open it. If ** the database fails to open, print an error message and exit. */ static void open_db(struct callback_data *p){ if( p->db==0 ){ char *zErrMsg = 0; #ifdef SQLITE_HAS_CODEC | < | | | < > | 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 | ** Make sure the database is open. If it is not, then open it. If ** the database fails to open, print an error message and exit. */ static void open_db(struct callback_data *p){ if( p->db==0 ){ char *zErrMsg = 0; #ifdef SQLITE_HAS_CODEC int n = p->zKey ? strlen(p->zKey) : 0; p->db = sqlite_open_encrypted(p->zDbFilename, p->zKey, n, &zErrMsg); #else p->db = sqlite_open(p->zDbFilename, 0, &zErrMsg); #endif if( p->db==0 ){ if( zErrMsg ){ fprintf(stderr,"Unable to open database \"%s\": %s\n", p->zDbFilename, zErrMsg); }else{ fprintf(stderr,"Unable to open database %s\n", p->zDbFilename); } |
︙ | ︙ |
Changes to src/tclsqlite.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 | /* ** 2001 September 15 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** A TCL Interface to SQLite ** | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | /* ** 2001 September 15 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** A TCL Interface to SQLite ** ** $Id: tclsqlite.c,v 1.57 2004/02/11 10:37:23 drh Exp $ */ #ifndef NO_TCL /* Omit this whole file if TCL is unavailable */ #include "sqliteInt.h" #include "tcl.h" #include <stdlib.h> #include <string.h> |
︙ | ︙ | |||
1060 1061 1062 1063 1064 1065 1066 | if( p==0 ){ Tcl_SetResult(interp, "malloc failed", TCL_STATIC); return TCL_ERROR; } memset(p, 0, sizeof(*p)); zFile = Tcl_GetStringFromObj(objv[2], 0); #ifdef SQLITE_HAS_CODEC | < | | < > | 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 | if( p==0 ){ Tcl_SetResult(interp, "malloc failed", TCL_STATIC); return TCL_ERROR; } memset(p, 0, sizeof(*p)); zFile = Tcl_GetStringFromObj(objv[2], 0); #ifdef SQLITE_HAS_CODEC p->db = sqlite_open_encrypted(zFile, pKey, nKey, &zErrMsg); #else p->db = sqlite_open(zFile, mode, &zErrMsg); #endif if( p->db==0 ){ Tcl_SetResult(interp, zErrMsg, TCL_VOLATILE); Tcl_Free((char*)p); free(zErrMsg); return TCL_ERROR; } zArg = Tcl_GetStringFromObj(objv[1], 0); |
︙ | ︙ |