Index: third_party/sqlite/src/test/capi3c.test |
diff --git a/third_party/sqlite/src/test/capi3c.test b/third_party/sqlite/src/test/capi3c.test |
index af9794380f251d72023b8a5ae1dc703fc8731709..6ab3bc24f6bdc5476a71f0aa2d8493cd5898cc8d 100644 |
--- a/third_party/sqlite/src/test/capi3c.test |
+++ b/third_party/sqlite/src/test/capi3c.test |
@@ -169,16 +169,18 @@ do_test capi3c-3.4 { |
do_test capi3c-3.5 { |
sqlite3_close $db2 |
} {SQLITE_OK} |
-do_test capi3c-3.6.1-misuse { |
- sqlite3_close $db2 |
-} {SQLITE_MISUSE} |
-do_test capi3c-3.6.2-misuse { |
- sqlite3_errmsg $db2 |
-} {library routine called out of sequence} |
-ifcapable {utf16} { |
- do_test capi3c-3.6.3-misuse { |
- utf8 [sqlite3_errmsg16 $db2] |
+if {[clang_sanitize_address]==0} { |
+ do_test capi3c-3.6.1-misuse { |
+ sqlite3_close $db2 |
+ } {SQLITE_MISUSE} |
+ do_test capi3c-3.6.2-misuse { |
+ sqlite3_errmsg $db2 |
} {library routine called out of sequence} |
+ ifcapable {utf16} { |
+ do_test capi3c-3.6.3-misuse { |
+ utf8 [sqlite3_errmsg16 $db2] |
+ } {library routine called out of sequence} |
+ } |
} |
# rename sqlite3_open "" |
@@ -627,13 +629,17 @@ check_data $STMT capi3c-6.3 {INTEGER} {1} {1.0} {1} |
do_test capi3c-6.3 { |
sqlite3_finalize $STMT |
} {SQLITE_OK} |
-do_test capi3c-6.4 { |
- db cache flush |
- sqlite3_close $DB |
-} {SQLITE_OK} |
-do_test capi3c-6.99-misuse { |
+if {[clang_sanitize_address]==0} { |
+ do_test capi3c-6.4 { |
+ db cache flush |
+ sqlite3_close $DB |
+ } {SQLITE_OK} |
+ do_test capi3c-6.99-misuse { |
+ db close |
+ } {} |
+} else { |
db close |
-} {} |
+} |
# This procedure sets the value of the file-format in file 'test.db' |
# to $newval. Also, the schema cookie is incremented. |
@@ -670,7 +676,7 @@ if {![sqlite3 -has-codec]} { |
# Now test that the library correctly handles bogus entries in the |
# sqlite_master table (schema corruption). |
do_test capi3c-8.1 { |
- file delete -force test.db test.db-journal |
+ forcedelete test.db test.db-journal |
sqlite3 db test.db |
execsql { |
CREATE TABLE t1(a); |
@@ -695,7 +701,7 @@ if {![sqlite3 -has-codec]} { |
# Build a 5-field row record. The first field is a string 'table', and |
# subsequent fields are all NULL. |
db close |
- file delete -force test.db test.db-journal |
+ forcedelete test.db test.db-journal |
sqlite3 db test.db |
execsql { |
CREATE TABLE t1(a); |
@@ -712,8 +718,8 @@ if {![sqlite3 -has-codec]} { |
} {1 {malformed database schema (?)}} |
db close |
} |
-file delete -force test.db |
-file delete -force test.db-journal |
+forcedelete test.db |
+forcedelete test.db-journal |
# Test the english language string equivalents for sqlite error codes |
@@ -751,6 +757,7 @@ foreach {code english} $code2english { |
} |
# Test the error message when a "real" out of memory occurs. |
+if { [permutation] != "nofaultsim" } { |
ifcapable memdebug { |
do_test capi3c-10-1 { |
sqlite3 db test.db |
@@ -771,6 +778,7 @@ ifcapable memdebug { |
db close |
sqlite3_memdebug_fail -1 |
} |
+} |
# The following tests - capi3c-11.* - test that a COMMIT or ROLLBACK |
# statement issued while there are still outstanding VMs that are part of |
@@ -849,19 +857,26 @@ do_test capi3c-11.9.2 { |
catchsql { |
ROLLBACK; |
} |
-} {1 {cannot rollback transaction - SQL statements in progress}} |
+} {0 {}} |
do_test capi3c-11.9.3 { |
sqlite3_get_autocommit $DB |
-} 0 |
+} 1 |
do_test capi3c-11.10 { |
sqlite3_step $STMT |
} {SQLITE_ROW} |
+ifcapable !autoreset { |
+ # If SQLITE_OMIT_AUTORESET is defined, then the statement must be |
+ # reset() before it can be passed to step() again. |
+ do_test capi3-11.11a { sqlite3_step $STMT } {SQLITE_MISUSE} |
+ do_test capi3-11.11b { sqlite3_reset $STMT } {SQLITE_ABORT} |
+} |
do_test capi3c-11.11 { |
sqlite3_step $STMT |
-} {SQLITE_ROW} |
+} {SQLITE_DONE} |
do_test capi3c-11.12 { |
sqlite3_step $STMT |
-} {SQLITE_DONE} |
+ sqlite3_step $STMT |
+} {SQLITE_ROW} |
do_test capi3c-11.13 { |
sqlite3_finalize $STMT |
} {SQLITE_OK} |
@@ -869,15 +884,15 @@ do_test capi3c-11.14 { |
execsql { |
SELECT a FROM t2; |
} |
-} {1 2 3} |
+} {1 2} |
do_test capi3c-11.14.1 { |
sqlite3_get_autocommit $DB |
-} 0 |
+} 1 |
do_test capi3c-11.15 { |
catchsql { |
ROLLBACK; |
} |
-} {0 {}} |
+} {1 {cannot rollback - no transaction is active}} |
do_test capi3c-11.15.1 { |
sqlite3_get_autocommit $DB |
} 1 |