Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: third_party/sqlite/src/test/capi2.test

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/test/cache.test ('k') | third_party/sqlite/src/test/capi3.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/capi2.test
diff --git a/third_party/sqlite/src/test/capi2.test b/third_party/sqlite/src/test/capi2.test
index 8bcb25a834851f3d415c830fc593528300e0ec42..8b36ac6925e1c8cb63cbef25ae15a65ad8de5121 100644
--- a/third_party/sqlite/src/test/capi2.test
+++ b/third_party/sqlite/src/test/capi2.test
@@ -71,15 +71,25 @@ do_test capi2-1.6 {
do_test capi2-1.7 {
list [sqlite3_column_count $VM] [get_row_values $VM] [get_column_names $VM]
} {2 {} {name rowid text INTEGER}}
-do_test capi2-1.8-misuse {
- sqlite3_step $VM
-} {SQLITE_MISUSE}
+
+# This used to be SQLITE_MISUSE. But now we automatically reset prepared
+# statements.
+ifcapable autoreset {
+ do_test capi2-1.8 {
+ sqlite3_step $VM
+ } {SQLITE_ROW}
+} else {
+ do_test capi2-1.8 {
+ sqlite3_step $VM
+ } {SQLITE_MISUSE}
+}
# Update: In v2, once SQLITE_MISUSE is returned the statement handle cannot
# be interrogated for more information. However in v3, since the column
# count, names and types are determined at compile time, these are still
# accessible after an SQLITE_MISUSE error.
do_test capi2-1.9 {
+ sqlite3_reset $VM
list [sqlite3_column_count $VM] [get_row_values $VM] [get_column_names $VM]
} {2 {} {name rowid text INTEGER}}
do_test capi2-1.10 {
« no previous file with comments | « third_party/sqlite/src/test/cache.test ('k') | third_party/sqlite/src/test/capi3.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698