MFB: Upgraded libsqlite in pdo_sqlite to 3.3.7

This commit is contained in:
Ilia Alshanetsky 2006-08-14 16:35:23 +00:00
parent 3717342c9f
commit 5c01690d9b
83 changed files with 17303 additions and 7927 deletions

View file

@ -54,8 +54,8 @@ int sqlite3_exec(
pStmt = 0;
rc = sqlite3_prepare(db, zSql, -1, &pStmt, &zLeftover);
assert( rc==SQLITE_OK || pStmt==0 );
if( rc!=SQLITE_OK ){
if( pStmt ) sqlite3_finalize(pStmt);
continue;
}
if( !pStmt ){
@ -68,9 +68,8 @@ int sqlite3_exec(
nCallback = 0;
nCol = sqlite3_column_count(pStmt);
azCols = sqliteMalloc(2*nCol*sizeof(const char *));
if( nCol && !azCols ){
rc = SQLITE_NOMEM;
azCols = sqliteMalloc(2*nCol*sizeof(const char *) + 1);
if( azCols==0 ){
goto exec_out;
}
@ -122,11 +121,9 @@ exec_out:
if( pStmt ) sqlite3_finalize(pStmt);
if( azCols ) sqliteFree(azCols);
if( sqlite3_malloc_failed ){
rc = SQLITE_NOMEM;
}
rc = sqlite3ApiExit(0, rc);
if( rc!=SQLITE_OK && rc==sqlite3_errcode(db) && pzErrMsg ){
*pzErrMsg = malloc(1+strlen(sqlite3_errmsg(db)));
*pzErrMsg = sqlite3_malloc(1+strlen(sqlite3_errmsg(db)));
if( *pzErrMsg ){
strcpy(*pzErrMsg, sqlite3_errmsg(db));
}