aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c4
-rw-r--r--src/pager.c8
-rw-r--r--src/sqlite.h.in4
-rw-r--r--src/sqliteInt.h6
-rw-r--r--src/tclsqlite.c9
-rw-r--r--src/vdbe.c29
6 files changed, 25 insertions, 35 deletions
diff --git a/src/main.c b/src/main.c
index 17fdb93f5..f031de50e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
-** $Id: main.c,v 1.216 2004/06/12 00:42:35 danielk1977 Exp $
+** $Id: main.c,v 1.217 2004/06/12 01:43:26 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -608,7 +608,7 @@ static int sqliteDefaultBusyCallback(
*/
void sqlite3_busy_handler(
sqlite *db,
- int (*xBusy)(void*,const char*,int),
+ int (*xBusy)(void*,int),
void *pArg
){
db->busyHandler.xFunc = xBusy;
diff --git a/src/pager.c b/src/pager.c
index 0c28b8f48..add2e80b4 100644
--- a/src/pager.c
+++ b/src/pager.c
@@ -18,7 +18,7 @@
** file simultaneously, or one process from reading the database while
** another is writing.
**
-** @(#) $Id: pager.c,v 1.123 2004/06/10 23:35:50 drh Exp $
+** @(#) $Id: pager.c,v 1.124 2004/06/12 01:43:26 danielk1977 Exp $
*/
#include "os.h" /* Must be first to enable large file support */
#include "sqliteInt.h"
@@ -1555,7 +1555,7 @@ static int pager_write_pagelist(PgHdr *pList){
}while( rc==SQLITE_BUSY &&
pPager->pBusyHandler &&
pPager->pBusyHandler->xFunc &&
- pPager->pBusyHandler->xFunc(pPager->pBusyHandler->pArg, "", busy++)
+ pPager->pBusyHandler->xFunc(pPager->pBusyHandler->pArg, busy++)
);
if( rc!=SQLITE_OK ){
return rc;
@@ -1639,7 +1639,7 @@ int sqlite3pager_get(Pager *pPager, Pgno pgno, void **ppPage){
}while( rc==SQLITE_BUSY &&
pPager->pBusyHandler &&
pPager->pBusyHandler->xFunc &&
- pPager->pBusyHandler->xFunc(pPager->pBusyHandler->pArg, "", busy++)
+ pPager->pBusyHandler->xFunc(pPager->pBusyHandler->pArg, busy++)
);
if( rc!=SQLITE_OK ){
return rc;
@@ -2030,7 +2030,7 @@ int sqlite3pager_begin(void *pData, int nMaster){
}while( rc==SQLITE_BUSY &&
pPager->pBusyHandler &&
pPager->pBusyHandler->xFunc &&
- pPager->pBusyHandler->xFunc(pPager->pBusyHandler->pArg, "", busy++)
+ pPager->pBusyHandler->xFunc(pPager->pBusyHandler->pArg, busy++)
);
if( rc!=SQLITE_OK ){
return rc;
diff --git a/src/sqlite.h.in b/src/sqlite.h.in
index c95d9387d..9c0eec4a3 100644
--- a/src/sqlite.h.in
+++ b/src/sqlite.h.in
@@ -12,7 +12,7 @@
** This header file defines the interface that the SQLite library
** presents to client programs.
**
-** @(#) $Id: sqlite.h.in,v 1.99 2004/06/12 00:42:35 danielk1977 Exp $
+** @(#) $Id: sqlite.h.in,v 1.100 2004/06/12 01:43:27 danielk1977 Exp $
*/
#ifndef _SQLITE_H_
#define _SQLITE_H_
@@ -242,7 +242,7 @@ int sqlite3_complete16(const void *sql);
** data structures out from under the executing query and will
** probably result in a coredump.
*/
-void sqlite3_busy_handler(sqlite*, int(*)(void*,const char*,int), void*);
+void sqlite3_busy_handler(sqlite*, int(*)(void*,int), void*);
/*
** This routine sets a busy handler that sleeps for a while when a
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 7cf1a4b28..e69fe5651 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -11,7 +11,7 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
-** @(#) $Id: sqliteInt.h,v 1.283 2004/06/12 00:42:35 danielk1977 Exp $
+** @(#) $Id: sqliteInt.h,v 1.284 2004/06/12 01:43:27 danielk1977 Exp $
*/
#include "config.h"
#include "sqlite3.h"
@@ -342,8 +342,8 @@ struct Db {
** callback is currently invoked only from within pager.c.
*/
struct BusyHandler {
- int (*xFunc)(void *,const char*,int); /* The busy callback */
- void *pArg; /* First arg to busy callback */
+ int (*xFunc)(void *,int); /* The busy callback */
+ void *pArg; /* First arg to busy callback */
};
/*
diff --git a/src/tclsqlite.c b/src/tclsqlite.c
index af4131a71..c0b751a60 100644
--- a/src/tclsqlite.c
+++ b/src/tclsqlite.c
@@ -11,7 +11,7 @@
*************************************************************************
** A TCL Interface to SQLite
**
-** $Id: tclsqlite.c,v 1.83 2004/06/10 10:50:38 danielk1977 Exp $
+** $Id: tclsqlite.c,v 1.84 2004/06/12 01:43:27 danielk1977 Exp $
*/
#ifndef NO_TCL /* Omit this whole file if TCL is unavailable */
@@ -149,7 +149,7 @@ static void DbDeleteCmd(void *db){
** This routine is called when a database file is locked while trying
** to execute SQL.
*/
-static int DbBusyHandler(void *cd, const char *zTable, int nTries){
+static int DbBusyHandler(void *cd, int nTries){
SqliteDb *pDb = (SqliteDb*)cd;
int rc;
char zVal[30];
@@ -158,9 +158,8 @@ static int DbBusyHandler(void *cd, const char *zTable, int nTries){
Tcl_DStringInit(&cmd);
Tcl_DStringAppend(&cmd, pDb->zBusy, -1);
- Tcl_DStringAppendElement(&cmd, zTable);
- sprintf(zVal, " %d", nTries);
- Tcl_DStringAppend(&cmd, zVal, -1);
+ sprintf(zVal, "%d", nTries);
+ Tcl_DStringAppendElement(&cmd, zVal);
zCmd = Tcl_DStringValue(&cmd);
rc = Tcl_Eval(pDb->interp, zCmd);
Tcl_DStringFree(&cmd);
diff --git a/src/vdbe.c b/src/vdbe.c
index 57ea4929e..3736ebbf9 100644
--- a/src/vdbe.c
+++ b/src/vdbe.c
@@ -43,7 +43,7 @@
** in this file for details. If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
-** $Id: vdbe.c,v 1.366 2004/06/12 00:42:35 danielk1977 Exp $
+** $Id: vdbe.c,v 1.367 2004/06/12 01:43:27 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -2378,16 +2378,12 @@ case OP_Transaction: {
}
rc = sqlite3BtreeBeginTrans(pBt, pOp->p2, db->nMaster);
if( rc==SQLITE_BUSY ){
- if( db->busyHandler.xFunc==0 ){
- p->pc = pc;
- p->rc = SQLITE_BUSY;
- p->pTos = pTos;
- return SQLITE_BUSY;
- }else{
- sqlite3SetString(&p->zErrMsg, sqlite3ErrStr(rc), (char*)0);
- }
+ p->pc = pc;
+ p->rc = SQLITE_BUSY;
+ p->pTos = pTos;
+ return SQLITE_BUSY;
}
- if( rc!=SQLITE_OK && rc!=SQLITE_READONLY && rc!=SQLITE_BUSY ){
+ if( rc!=SQLITE_OK && rc!=SQLITE_READONLY /* && rc!=SQLITE_BUSY */ ){
goto abort_due_to_error;
}
}
@@ -2565,15 +2561,10 @@ case OP_OpenWrite: {
}
switch( rc ){
case SQLITE_BUSY: {
- if( db->busyHandler.xFunc ){
- p->pc = pc;
- p->rc = SQLITE_BUSY;
- p->pTos = &pTos[1 + (pOp->p2<=0)]; /* Operands must remain on stack */
- return SQLITE_BUSY;
- }else{
- sqlite3SetString(&p->zErrMsg, sqlite3ErrStr(rc), (char*)0);
- }
- break;
+ p->pc = pc;
+ p->rc = SQLITE_BUSY;
+ p->pTos = &pTos[1 + (pOp->p2<=0)]; /* Operands must remain on stack */
+ return SQLITE_BUSY;
}
case SQLITE_OK: {
int flags = sqlite3BtreeFlags(pCur->pCursor);