Change the ROLLBACK command so that pending statements to not block it. The

pending statements instead return SQLITE_ABORT upon next access.  Note: This
causes separate shared-cache connections in read_uncommitted mode to abort as
well.

FossilOrigin-Name: 9b66c79e054c8a109d1ee8d35fed1c42814c330d
This commit is contained in:
drh
2012-02-13 16:43:16 +00:00
parent 2f56da3f26
commit 0f198a7409
14 changed files with 86 additions and 148 deletions
+7 -6
View File
@@ -894,18 +894,19 @@ do_test capi3-11.9.2 {
catchsql {
ROLLBACK;
}
} {1 {cannot rollback transaction - SQL statements in progress}}
} {0 {}}
do_test capi3-11.9.3 {
sqlite3_get_autocommit $DB
} 0
} 1
do_test capi3-11.10 {
sqlite3_step $STMT
} {SQLITE_ROW}
} {SQLITE_ERROR}
do_test capi3-11.11 {
sqlite3_step $STMT
} {SQLITE_ROW}
do_test capi3-11.12 {
sqlite3_step $STMT
sqlite3_step $STMT
} {SQLITE_DONE}
do_test capi3-11.13 {
sqlite3_finalize $STMT
@@ -914,15 +915,15 @@ do_test capi3-11.14 {
execsql {
SELECT a FROM t2;
}
} {1 2 3}
} {1 2}
do_test capi3-11.14.1 {
sqlite3_get_autocommit $DB
} 0
} 1
do_test capi3-11.15 {
catchsql {
ROLLBACK;
}
} {0 {}}
} {1 {cannot rollback - no transaction is active}}
do_test capi3-11.15.1 {
sqlite3_get_autocommit $DB
} 1