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

Merge the latest trunk changes into the sessions branch.

FossilOrigin-Name: 832886b1e6edb916d9824924c7d88202f4eb1969
This commit is contained in:
drh
2011-05-30 13:39:20 +00:00
21 changed files with 343 additions and 84 deletions

View File

@@ -2203,17 +2203,11 @@ int sqlite3VdbeHalt(Vdbe *p){
** do so. If this operation returns an error, and the current statement
** error code is SQLITE_OK or SQLITE_CONSTRAINT, then promote the
** current statement error code.
**
** Note that sqlite3VdbeCloseStatement() can only fail if eStatementOp
** is SAVEPOINT_ROLLBACK. But if p->rc==SQLITE_OK then eStatementOp
** must be SAVEPOINT_RELEASE. Hence the NEVER(p->rc==SQLITE_OK) in
** the following code.
*/
if( eStatementOp ){
rc = sqlite3VdbeCloseStatement(p, eStatementOp);
if( rc ){
assert( eStatementOp==SAVEPOINT_ROLLBACK );
if( NEVER(p->rc==SQLITE_OK) || p->rc==SQLITE_CONSTRAINT ){
if( p->rc==SQLITE_OK || p->rc==SQLITE_CONSTRAINT ){
p->rc = rc;
sqlite3DbFree(db, p->zErrMsg);
p->zErrMsg = 0;