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

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

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « third_party/sqlite/src/test/vtab2.test ('k') | third_party/sqlite/src/test/vtab6.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2006 June 10 1 # 2006 June 10
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 INSERT INTO techo VALUES(1, 2, 3); 50 INSERT INTO techo VALUES(1, 2, 3);
51 } 51 }
52 set echo_module 52 set echo_module
53 } {xBegin echo(treal) xSync echo(treal) xCommit echo(treal)} 53 } {xBegin echo(treal) xSync echo(treal) xCommit echo(treal)}
54 do_test vtab4-1.3 { 54 do_test vtab4-1.3 {
55 set echo_module [list] 55 set echo_module [list]
56 execsql { 56 execsql {
57 UPDATE techo SET a = 2; 57 UPDATE techo SET a = 2;
58 } 58 }
59 set echo_module 59 set echo_module
60 } [list xBestIndex {SELECT rowid, * FROM 'treal'} \ 60 } [list xBestIndex {SELECT rowid, a, b, c FROM 'treal'} \
61 xBegin echo(treal) \ 61 xBegin echo(treal) \
62 xFilter {SELECT rowid, * FROM 'treal'} \ 62 xFilter {SELECT rowid, a, b, c FROM 'treal'} \
63 xSync echo(treal) \ 63 xSync echo(treal) \
64 xCommit echo(treal) \ 64 xCommit echo(treal) \
65 ] 65 ]
66 do_test vtab4-1.4 { 66 do_test vtab4-1.4 {
67 set echo_module [list] 67 set echo_module [list]
68 execsql { 68 execsql {
69 DELETE FROM techo; 69 DELETE FROM techo;
70 } 70 }
71 set echo_module 71 set echo_module
72 } [list xBestIndex {SELECT rowid, * FROM 'treal'} \ 72 } [list xBestIndex {SELECT rowid, NULL, NULL, NULL FROM 'treal'} \
73 xBegin echo(treal) \ 73 xBegin echo(treal) \
74 xFilter {SELECT rowid, * FROM 'treal'} \ 74 xFilter {SELECT rowid, NULL, NULL, NULL FROM 'treal'} \
75 xSync echo(treal) \ 75 xSync echo(treal) \
76 xCommit echo(treal) \ 76 xCommit echo(treal) \
77 ] 77 ]
78 78
79 # Ensure xBegin is not called more than once in a single transaction. 79 # Ensure xBegin is not called more than once in a single transaction.
80 # 80 #
81 do_test vtab4-2.1 { 81 do_test vtab4-2.1 {
82 set echo_module [list] 82 set echo_module [list]
83 execsql { 83 execsql {
84 BEGIN; 84 BEGIN;
(...skipping 13 matching lines...) Expand all
98 CREATE VIRTUAL TABLE secho USING echo(sreal); 98 CREATE VIRTUAL TABLE secho USING echo(sreal);
99 } 99 }
100 set echo_module [list] 100 set echo_module [list]
101 execsql { 101 execsql {
102 BEGIN; 102 BEGIN;
103 INSERT INTO secho SELECT * FROM techo; 103 INSERT INTO secho SELECT * FROM techo;
104 DELETE FROM techo; 104 DELETE FROM techo;
105 COMMIT; 105 COMMIT;
106 } 106 }
107 set echo_module 107 set echo_module
108 } [list xBestIndex {SELECT rowid, * FROM 'treal'} \ 108 } [list xBestIndex {SELECT rowid, a, b, c FROM 'treal'} \
109 xBegin echo(sreal) \ 109 xBegin echo(sreal) \
110 xFilter {SELECT rowid, * FROM 'treal'} \ 110 xFilter {SELECT rowid, a, b, c FROM 'treal'} \
111 xBestIndex {SELECT rowid, * FROM 'treal'} \ 111 xBestIndex {SELECT rowid, NULL, NULL, NULL FROM 'treal'} \
112 xBegin echo(treal) \ 112 xBegin echo(treal) \
113 xFilter {SELECT rowid, * FROM 'treal'} \ 113 xFilter {SELECT rowid, NULL, NULL, NULL FROM 'treal'} \
114 xSync echo(sreal) \ 114 xSync echo(sreal) \
115 xSync echo(treal) \ 115 xSync echo(treal) \
116 xCommit echo(sreal) \ 116 xCommit echo(sreal) \
117 xCommit echo(treal) \ 117 xCommit echo(treal) \
118 ] 118 ]
119 do_test vtab4-2.3 { 119 do_test vtab4-2.3 {
120 execsql { 120 execsql {
121 SELECT * FROM secho; 121 SELECT * FROM secho;
122 } 122 }
123 } {1 2 3 4 5 6 7 8 9} 123 } {1 2 3 4 5 6 7 8 9}
124 do_test vtab4-2.4 { 124 do_test vtab4-2.4 {
125 execsql { 125 execsql {
126 SELECT * FROM techo; 126 SELECT * FROM techo;
127 } 127 }
128 } {} 128 } {}
129 129
130 # Try an explicit ROLLBACK on a transaction with two open virtual tables. 130 # Try an explicit ROLLBACK on a transaction with two open virtual tables.
131 do_test vtab4-2.5 { 131 do_test vtab4-2.5 {
132 set echo_module [list] 132 set echo_module [list]
133 execsql { 133 execsql {
134 BEGIN; 134 BEGIN;
135 INSERT INTO techo SELECT * FROM secho; 135 INSERT INTO techo SELECT * FROM secho;
136 DELETE FROM secho; 136 DELETE FROM secho;
137 ROLLBACK; 137 ROLLBACK;
138 } 138 }
139 set echo_module 139 set echo_module
140 } [list xBestIndex {SELECT rowid, * FROM 'sreal'} \ 140 } [list xBestIndex {SELECT rowid, a, b, c FROM 'sreal'} \
141 xBegin echo(treal) \ 141 xBegin echo(treal) \
142 xFilter {SELECT rowid, * FROM 'sreal'} \ 142 xFilter {SELECT rowid, a, b, c FROM 'sreal'} \
143 xBestIndex {SELECT rowid, * FROM 'sreal'} \ 143 xBestIndex {SELECT rowid, NULL, NULL, NULL FROM 'sreal'} \
144 xBegin echo(sreal) \ 144 xBegin echo(sreal) \
145 xFilter {SELECT rowid, * FROM 'sreal'} \ 145 xFilter {SELECT rowid, NULL, NULL, NULL FROM 'sreal'} \
146 xRollback echo(treal) \ 146 xRollback echo(treal) \
147 xRollback echo(sreal) \ 147 xRollback echo(sreal) \
148 ] 148 ]
149 do_test vtab4-2.6 { 149 do_test vtab4-2.6 {
150 execsql { 150 execsql {
151 SELECT * FROM secho; 151 SELECT * FROM secho;
152 } 152 }
153 } {1 2 3 4 5 6 7 8 9} 153 } {1 2 3 4 5 6 7 8 9}
154 do_test vtab4-2.7 { 154 do_test vtab4-2.7 {
155 execsql { 155 execsql {
(...skipping 15 matching lines...) Expand all
171 do_test vtab4-3.3 { 171 do_test vtab4-3.3 {
172 set echo_module [list] 172 set echo_module [list]
173 set echo_module_sync_fail sreal 173 set echo_module_sync_fail sreal
174 catchsql { 174 catchsql {
175 BEGIN; 175 BEGIN;
176 INSERT INTO techo SELECT * FROM secho; 176 INSERT INTO techo SELECT * FROM secho;
177 DELETE FROM secho; 177 DELETE FROM secho;
178 COMMIT; 178 COMMIT;
179 } 179 }
180 set echo_module 180 set echo_module
181 } [list xBestIndex {SELECT rowid, * FROM 'sreal'} \ 181 } [list xBestIndex {SELECT rowid, a, b, c FROM 'sreal'} \
182 xBegin echo(treal) \ 182 xBegin echo(treal) \
183 xFilter {SELECT rowid, * FROM 'sreal'} \ 183 xFilter {SELECT rowid, a, b, c FROM 'sreal'} \
184 xBestIndex {SELECT rowid, * FROM 'sreal'} \ 184 xBestIndex {SELECT rowid, NULL, NULL, NULL FROM 'sreal'} \
185 xBegin echo(sreal) \ 185 xBegin echo(sreal) \
186 xFilter {SELECT rowid, * FROM 'sreal'} \ 186 xFilter {SELECT rowid, NULL, NULL, NULL FROM 'sreal'} \
187 xSync echo(treal) \ 187 xSync echo(treal) \
188 xSync echo(sreal) \ 188 xSync echo(sreal) \
189 xRollback echo(treal) \ 189 xRollback echo(treal) \
190 xRollback echo(sreal) \ 190 xRollback echo(sreal) \
191 ] 191 ]
192 192
193 finish_test 193 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/vtab2.test ('k') | third_party/sqlite/src/test/vtab6.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698