1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Minor bugfixes for incrblob mode. (CVS 3903)

FossilOrigin-Name: db54a9466e3bea9c03740ce0b755cfa02bafaccd
This commit is contained in:
danielk1977
2007-05-03 11:43:33 +00:00
parent b7af4452d9
commit 20713f34a5
5 changed files with 106 additions and 35 deletions

View File

@@ -10,7 +10,7 @@
**
*************************************************************************
**
** $Id: vdbeblob.c,v 1.2 2007/05/02 16:48:37 danielk1977 Exp $
** $Id: vdbeblob.c,v 1.3 2007/05/03 11:43:33 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -91,11 +91,17 @@ int sqlite3_blob_open(
memset(&sParse, 0, sizeof(Parse));
sParse.db = db;
rc = sqlite3SafetyOn(db);
if( rc!=SQLITE_OK ){
return rc;
}
pTab = sqlite3LocateTable(&sParse, zTable, zDb);
if( !pTab ){
sqlite3Error(db, sParse.rc, "%s", sParse.zErrMsg);
sqliteFree(sParse.zErrMsg);
rc = sParse.rc;
sqlite3SafetyOff(db);
goto blob_open_out;
}
@@ -109,6 +115,7 @@ int sqlite3_blob_open(
sqlite3Error(db, SQLITE_ERROR, "no such column: %s", zColumn);
sqliteFree(sParse.zErrMsg);
rc = SQLITE_ERROR;
sqlite3SafetyOff(db);
goto blob_open_out;
}
@@ -145,6 +152,11 @@ int sqlite3_blob_open(
sqlite3VdbeMakeReady(v, 1, 0, 1, 0);
}
rc = sqlite3SafetyOff(db);
if( rc!=SQLITE_OK ){
return rc;
}
sqlite3_bind_int64((sqlite3_stmt *)v, 1, iRow);
rc = sqlite3_step((sqlite3_stmt *)v);
if( rc!=SQLITE_ROW ){