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

Unified Diff: third_party/sqlite/sqlite-src-3070603/test/async5.test

Issue 949043002: Add //third_party/sqlite to dirs_to_snapshot, remove net_sql.patch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
Index: third_party/sqlite/sqlite-src-3070603/test/async5.test
diff --git a/third_party/sqlite/sqlite-src-3070603/test/async5.test b/third_party/sqlite/sqlite-src-3070603/test/async5.test
new file mode 100644
index 0000000000000000000000000000000000000000..5ea4c70ec9e73c47e4f9b041330aaa6c81adf8bf
--- /dev/null
+++ b/third_party/sqlite/sqlite-src-3070603/test/async5.test
@@ -0,0 +1,69 @@
+# 2009 July 19
+#
+# May you do good and not evil.
+# May you find forgiveness for yourself and forgive others.
+# May you share freely, never taking more than you give.
+#
+#***********************************************************************
+# This file tests that asynchronous IO is compatible with multi-file
+# transactions.
+#
+# $Id: async5.test,v 1.1 2009/07/18 11:52:04 danielk1977 Exp $
+
+set testdir [file dirname $argv0]
+source $testdir/tester.tcl
+
+if {[info commands sqlite3async_initialize] eq ""} {
+ # The async logic is not built into this system
+ finish_test
+ return
+}
+
+db close
+file delete -force test2.db
+sqlite3async_initialize "" 1
+sqlite3async_control halt never
+sqlite3 db test.db
+
+do_test async5-1.1 {
+ execsql {
+ ATTACH 'test2.db' AS next;
+ CREATE TABLE main.t1(a, b);
+ CREATE TABLE next.t2(a, b);
+ BEGIN;
+ INSERT INTO t1 VALUES(1, 2);
+ INSERT INTO t2 VALUES(3, 4);
+ COMMIT;
+ }
+} {}
+do_test async5-1.2 {
+ execsql { SELECT * FROM t1 }
+} {1 2}
+do_test async5-1.3 {
+ execsql { SELECT * FROM t2 }
+} {3 4}
+do_test async5-1.4 {
+ execsql {
+ BEGIN;
+ INSERT INTO t1 VALUES('a', 'b');
+ INSERT INTO t2 VALUES('c', 'd');
+ COMMIT;
+ }
+} {}
+do_test async5-1.5 {
+ execsql { SELECT * FROM t1 }
+} {1 2 a b}
+do_test async5-1.6 {
+ execsql { SELECT * FROM t2 }
+} {3 4 c d}
+
+db close
+
+sqlite3async_control halt idle
+sqlite3async_start
+sqlite3async_wait
+sqlite3async_control halt never
+sqlite3async_shutdown
+set sqlite3async_trace 0
+finish_test
+
« no previous file with comments | « third_party/sqlite/sqlite-src-3070603/test/async4.test ('k') | third_party/sqlite/sqlite-src-3070603/test/attach.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698