1 function runTransaction(db)
3 db.transaction(function(tx) {
4 // Execute a read-only statement
5 tx.executeSql("SELECT COUNT(*) FROM Test;");
7 // Execute a write statement to make sure SQLite tries to acquire an exclusive lock on the DB file
8 tx.executeSql("INSERT INTO Test VALUES (?);", [1]);
12 var db1 = openDatabaseSync("MultipleTransactionsOnDifferentHandlesTest", "1.0",
13 "Test transactions on different handles to the same DB.", 1);
14 db1.transaction(function(tx) {
15 tx.executeSql("CREATE TABLE IF NOT EXISTS Test (Foo int);");
18 var db2 = openDatabaseSync("MultipleTransactionsOnDifferentHandlesTest", "1.0",
19 "Test transactions on different handles to the same DB.", 1);
21 postMessage("FAIL: db1 == db2");
28 postMessage("FAIL: " + err);