1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

:-) (CVS 50)

FossilOrigin-Name: 1cf2873d55b471bb3e397f90dc0868dd88c440a0
This commit is contained in:
drh
2000-06-05 02:07:04 +00:00
parent c61053b771
commit d1dedb86bf
7 changed files with 35 additions and 24 deletions

View File

@ -26,7 +26,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.7 2000/06/02 14:27:23 drh Exp $
** $Id: main.c,v 1.8 2000/06/05 02:07:04 drh Exp $
*/
#include "sqliteInt.h"
@ -46,7 +46,7 @@ static int sqliteOpenCb(void *pDb, int argc, char **argv, char **azColName){
memset(&sParse, 0, sizeof(sParse));
sParse.db = db;
sParse.initFlag = 1;
nErr = sqliteRunParser(&sParse, argv[0], &zErrMsg);
nErr = sqliteRunParser(&sParse, argv[0], 0);
return nErr;
}

View File

@ -24,7 +24,7 @@
** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases.
**
** $Id: shell.c,v 1.7 2000/06/04 12:58:38 drh Exp $
** $Id: shell.c,v 1.8 2000/06/05 02:07:04 drh Exp $
*/
#include <stdlib.h>
#include <string.h>
@ -456,7 +456,11 @@ int main(int argc, char **argv){
}
db = sqlite_open(argv[1], 0666, &zErrMsg);
if( db==0 ){
fprintf(stderr,"Unable to open database \"%s\": %s\n", argv[1], zErrMsg);
if( zErrMsg ){
fprintf(stderr,"Unable to open database \"%s\": %s\n", argv[1], zErrMsg);
}else{
fprintf(stderr,"Unable to open database %s\n", argv[1]);
}
exit(1);
}
data.out = stdout;

View File

@ -23,7 +23,7 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
** @(#) $Id: sqliteInt.h,v 1.12 2000/06/04 12:58:38 drh Exp $
** @(#) $Id: sqliteInt.h,v 1.13 2000/06/05 02:07:04 drh Exp $
*/
#include "sqlite.h"
#include "dbbe.h"
@ -35,7 +35,7 @@
#include <string.h>
#include <assert.h>
#define MEMORY_DEBUG 1
/* #define MEMORY_DEBUG 1 */
#ifdef MEMORY_DEBUG
# define sqliteMalloc(X) sqliteMalloc_(X,__FILE__,__LINE__)
# define sqliteFree(X) sqliteFree_(X,__FILE__,__LINE__)

View File

@ -41,7 +41,7 @@
** But other routines are also provided to help in building up
** a program instruction by instruction.
**
** $Id: vdbe.c,v 1.13 2000/06/04 12:58:38 drh Exp $
** $Id: vdbe.c,v 1.14 2000/06/05 02:07:04 drh Exp $
*/
#include "sqliteInt.h"
@ -671,6 +671,11 @@ int sqliteVdbeExec(
p->tos = -1;
rc = SQLITE_OK;
#ifdef MEMORY_DEBUG
if( access("vdbe_trace",0)==0 ){
p->trace = stderr;
}
#endif
if( pzErrMsg ){ *pzErrMsg = 0; }
for(pc=0; rc==SQLITE_OK && pc<p->nOp && pc>=0; pc++){
pOp = &p->aOp[pc];
@ -1644,13 +1649,13 @@ int sqliteVdbeExec(
if( i>=0 && i<p->nTable && p->aTab[i].pTable!=0 ){
char *zKey;
int nKey;
if( (p->aStack[tos].flags & STK_Int)==0 ){
if( p->aStack[tos].flags & STK_Int ){
nKey = sizeof(int);
zKey = (char*)&p->aStack[tos].i;
}else{
if( Stringify(p, tos) ) goto no_mem;
nKey = p->aStack[tos].n;
zKey = p->zStack[tos];
}else{
nKey = sizeof(int);
zKey = (char*)&p->aStack[tos].n;
}
sqliteDbbeDelete(p->aTab[i].pTable, nKey, zKey);
}
@ -1971,8 +1976,9 @@ int sqliteVdbeExec(
if( amt==1 ){
p->tos++;
if( NeedStack(p, p->tos) ) goto no_mem;
p->aStack[p->tos].n = val;
p->aStack[p->tos].i = val;
p->aStack[p->tos].flags = STK_Int;
p->zStack[p->tos] = 0;
}else{
pc = pOp->p2 - 1;
}