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

Side by Side Diff: third_party/sqlite/src/test/trace.test

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. 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 unified diff | Download patch
OLDNEW
1 # 2004 Jun 29 1 # 2004 Jun 29
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
(...skipping 30 matching lines...) Expand all
41 SELECT * FROM t1; 41 SELECT * FROM t1;
42 } 42 }
43 } {1 2} 43 } {1 2}
44 do_test trace-1.4 { 44 do_test trace-1.4 {
45 set ::stmtlist 45 set ::stmtlist
46 } {{CREATE TABLE t1(a,b);} {INSERT INTO t1 VALUES(1,2);} {SELECT * FROM t1;}} 46 } {{CREATE TABLE t1(a,b);} {INSERT INTO t1 VALUES(1,2);} {SELECT * FROM t1;}}
47 do_test trace-1.5 { 47 do_test trace-1.5 {
48 db trace {} 48 db trace {}
49 db trace 49 db trace
50 } {} 50 } {}
51 do_test trace-1.6 {
52 db eval {
53 CREATE TABLE t1b(x TEXT PRIMARY KEY, y);
54 INSERT INTO t1b VALUES('abc','def'),('ghi','jkl'),('mno','pqr');
55 }
56 set ::stmtlist {}
57 set xyzzy a*
58 db trace trace_proc
59 db eval {
60 SELECT y FROM t1b WHERE x GLOB $xyzzy
61 }
62 } {def}
63 do_test trace-1.7 {
64 set ::stmtlist
65 } {{SELECT y FROM t1b WHERE x GLOB 'a*'}}
66 db trace {}
51 67
52 # If we prepare a statement and execute it multiple times, the trace 68 # If we prepare a statement and execute it multiple times, the trace
53 # happens on each execution. 69 # happens on each execution.
54 # 70 #
55 db close 71 db close
56 sqlite3 db test.db; set DB [sqlite3_connection_pointer db] 72 sqlite3 db test.db; set DB [sqlite3_connection_pointer db]
57 do_test trace-2.1 { 73 do_test trace-2.1 {
58 set STMT [sqlite3_prepare $DB {INSERT INTO t1 VALUES(2,3)} -1 TAIL] 74 set STMT [sqlite3_prepare $DB {INSERT INTO t1 VALUES(2,3)} -1 TAIL]
59 db trace trace_proc 75 db trace trace_proc
60 proc trace_proc sql { 76 proc trace_proc sql {
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 db trace trace_proc 252 db trace trace_proc
237 set TRACE_OUT {} 253 set TRACE_OUT {}
238 execsql {SELECT '$::t6str', [$::t6str], $::t6str, ?1, "?1", $::t6str FROM t6} 254 execsql {SELECT '$::t6str', [$::t6str], $::t6str, ?1, "?1", $::t6str FROM t6}
239 } {{$::t6str} 1 {test-six y'all} {test-six y'all} 2 {test-six y'all}} 255 } {{$::t6str} 1 {test-six y'all} {test-six y'all} 2 {test-six y'all}}
240 do_test trace-6.201 { 256 do_test trace-6.201 {
241 set TRACE_OUT 257 set TRACE_OUT
242 } {{SELECT '$::t6str', [$::t6str], 'test-six y''all', 'test-six y''all', "?1", ' test-six y''all' FROM t6}} 258 } {{SELECT '$::t6str', [$::t6str], 'test-six y''all', 'test-six y''all', "?1", ' test-six y''all' FROM t6}}
243 259
244 260
245 finish_test 261 finish_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698