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

Unified Diff: third_party/sqlite/src/test/tkt-cbd054fa6b.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/tkt-c48d99d690.test ('k') | third_party/sqlite/src/test/tkt-d11f09d36e.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/tkt-cbd054fa6b.test
diff --git a/third_party/sqlite/src/test/tkt-cbd054fa6b.test b/third_party/sqlite/src/test/tkt-cbd054fa6b.test
index 6e7455b3a3b6ded9e4a9ee62d738ec4ef45bdcd5..2951233a5bb974c5213b7df5bd3950f585848386 100644
--- a/third_party/sqlite/src/test/tkt-cbd054fa6b.test
+++ b/third_party/sqlite/src/test/tkt-cbd054fa6b.test
@@ -16,11 +16,26 @@
set testdir [file dirname $argv0]
source $testdir/tester.tcl
-ifcapable !stat2 {
+ifcapable !stat4&&!stat3 {
finish_test
return
}
+proc s {blob} {
+ set ret ""
+ binary scan $blob c* bytes
+ foreach b $bytes {
+ set t [binary format c $b]
+ if {[string is print $t]} {
+ append ret $t
+ } else {
+ append ret .
+ }
+ }
+ return $ret
+}
+db function s s
+
do_test tkt-cbd05-1.1 {
db eval {
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT UNIQUE NOT NULL);
@@ -39,14 +54,26 @@ do_test tkt-cbd05-1.1 {
}
} {10}
do_test tkt-cbd05-1.2 {
- db eval {
- ANALYZE;
+ db eval { ANALYZE; }
+ ifcapable stat4 {
+ db eval {
+ PRAGMA writable_schema = 1;
+ CREATE VIEW vvv AS
+ SELECT tbl,idx,neq,nlt,ndlt,test_extract(sample,0) AS sample
+ FROM sqlite_stat4;
+ PRAGMA writable_schema = 0;
+ }
+ } else {
+ db eval {
+ CREATE VIEW vvv AS
+ SELECT tbl,idx,neq,nlt,ndlt,sample FROM sqlite_stat3;
+ }
}
} {}
do_test tkt-cbd05-1.3 {
execsql {
- SELECT tbl,idx,group_concat(sample,' ')
- FROM sqlite_stat2
+ SELECT tbl,idx,group_concat(s(sample),' ')
+ FROM vvv
WHERE idx = 't1_x'
GROUP BY tbl,idx
}
@@ -77,8 +104,8 @@ do_test tkt-cbd05-2.2 {
} {}
do_test tkt-cbd05-2.3 {
execsql {
- SELECT tbl,idx,group_concat(sample,' ')
- FROM sqlite_stat2
+ SELECT tbl,idx,group_concat(s(sample),' ')
+ FROM vvv
WHERE idx = 't1_x'
GROUP BY tbl,idx
}
« no previous file with comments | « third_party/sqlite/src/test/tkt-c48d99d690.test ('k') | third_party/sqlite/src/test/tkt-d11f09d36e.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698