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

Unified Diff: third_party/sqlite/src/test/savepoint.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
« no previous file with comments | « third_party/sqlite/src/test/run-wordcount.sh ('k') | third_party/sqlite/src/test/savepoint6.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/savepoint.test
diff --git a/third_party/sqlite/src/test/savepoint.test b/third_party/sqlite/src/test/savepoint.test
index 042c5558947da07f5691bad94bd39cbc0928b5ae..8055e61d9e3ee7c249c382e26d7ebbf51d2d6066 100644
--- a/third_party/sqlite/src/test/savepoint.test
+++ b/third_party/sqlite/src/test/savepoint.test
@@ -303,11 +303,19 @@ ifcapable incrblob {
execsql {SAVEPOINT abc}
catchsql {ROLLBACK TO def}
} {1 {no such savepoint: def}}
- do_test savepoint-5.3.2 {
+ do_test savepoint-5.3.2.1 {
execsql {SAVEPOINT def}
set fd [db incrblob -readonly blobs x 1]
+ set rc [catch {seek $fd 0;read $fd} res]
+ lappend rc $res
+ } {0 {hellontyeight character blob}}
+ do_test savepoint-5.3.2.2 {
catchsql {ROLLBACK TO def}
- } {1 {cannot rollback savepoint - SQL statements in progress}}
+ } {0 {}}
+ do_test savepoint-5.3.2.3 {
+ set rc [catch {seek $fd 0; read $fd} res]
+ set rc
+ } {0}
do_test savepoint-5.3.3 {
catchsql {RELEASE def}
} {0 {}}
@@ -371,7 +379,7 @@ wal_check_journal_mode savepoint-5.5
#
ifcapable {autovacuum && pragma} {
db close
- file delete -force test.db
+ forcedelete test.db
sqlite3 db test.db
do_test savepoint-6.1 {
@@ -419,7 +427,7 @@ ifcapable {autovacuum && pragma} {
# surrounding savepoints by growing and shrinking the database file.
#
db close
-file delete -force test.db
+forcedelete test.db
sqlite3 db test.db
do_test savepoint-7.1 {
@@ -490,7 +498,7 @@ wal_check_journal_mode savepoint-7.3.3
do_test savepoint-7.4.1 {
db close
- file delete -force test.db
+ forcedelete test.db
sqlite3 db test.db
execsql { PRAGMA auto_vacuum = incremental }
wal_set_journal_mode
@@ -553,7 +561,7 @@ do_test savepoint-8-2 {
#
ifcapable auth {
proc auth {args} {
- eval lappend ::authdata $args
+ eval lappend ::authdata [lrange $args 0 4]
return SQLITE_OK
}
db auth auth
@@ -575,7 +583,7 @@ ifcapable auth {
} {SQLITE_SAVEPOINT RELEASE sp1 {} {}}
proc auth {args} {
- eval lappend ::authdata $args
+ eval lappend ::authdata [lrange $args 0 4]
return SQLITE_DENY
}
db auth auth
@@ -640,8 +648,8 @@ set templockstate [lindex [db eval {PRAGMA lock_status}] 3]
if {[wal_is_wal_mode]==0} {
do_test savepoint-10.2.1 {
- file delete -force test3.db
- file delete -force test2.db
+ forcedelete test3.db
+ forcedelete test2.db
execsql {
ATTACH 'test2.db' AS aux1;
ATTACH 'test3.db' AS aux2;
@@ -649,10 +657,8 @@ if {[wal_is_wal_mode]==0} {
CREATE TABLE main.t1(x, y);
CREATE TABLE aux1.t2(x, y);
CREATE TABLE aux2.t3(x, y);
- SELECT name FROM sqlite_master
- UNION ALL
- SELECT name FROM aux1.sqlite_master
- UNION ALL
+ SELECT name FROM sqlite_master;
+ SELECT name FROM aux1.sqlite_master;
SELECT name FROM aux2.sqlite_master;
}
} {t1 t2 t3}
@@ -691,7 +697,7 @@ if {[wal_is_wal_mode]==0} {
execsql { PRAGMA lock_status }
} [list main reserved temp $templockstate aux1 reserved aux2 reserved]
do_test savepoint-10.2.9 {
- execsql { SELECT 'a', * FROM t1 UNION ALL SELECT 'b', * FROM t3 }
+ execsql { SELECT 'a', * FROM t1 ; SELECT 'b', * FROM t3 }
} {a 1 2 b 3 4}
do_test savepoint-10.2.9 {
execsql {
@@ -762,7 +768,7 @@ if {[wal_is_wal_mode]==0} {
#
do_test savepoint-11.1 {
db close
- file delete -force test.db
+ forcedelete test.db
sqlite3 db test.db
execsql { PRAGMA auto_vacuum = full; }
wal_set_journal_mode
@@ -852,7 +858,7 @@ do_test savepoint-12.2 {
SAVEPOINT sp2;
INSERT OR ROLLBACK INTO t4 VALUES(1, 'one');
}
-} {1 {column a is not unique}}
+} {1 {UNIQUE constraint failed: t4.a}}
do_test savepoint-12.3 {
sqlite3_get_autocommit db
} {1}
@@ -868,7 +874,7 @@ wal_check_journal_mode savepoint-12.5
if {[wal_is_wal_mode]==0} {
do_test savepoint-13.1 {
db close
- catch {file delete -force test.db}
+ catch {forcedelete test.db}
sqlite3 db test.db
execsql {
BEGIN;
@@ -909,7 +915,7 @@ if {[wal_is_wal_mode]==0} {
}
db close
-file delete test.db
+delete_file test.db
do_multiclient_test tn {
do_test savepoint-14.$tn.1 {
sql1 {
« no previous file with comments | « third_party/sqlite/src/test/run-wordcount.sh ('k') | third_party/sqlite/src/test/savepoint6.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698