OLD | NEW |
1 # 2010 July 09 | 1 # 2010 July 09 |
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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 i5 / 20 leaf 0 0 1016 0 \ | 159 i5 / 20 leaf 0 0 1016 0 \ |
160 t5 / 19 leaf 0 0 1016 0 \ | 160 t5 / 19 leaf 0 0 1016 0 \ |
161 ] | 161 ] |
162 | 162 |
163 db close | 163 db close |
164 forcedelete test.db | 164 forcedelete test.db |
165 sqlite3 db test.db | 165 sqlite3 db test.db |
166 register_dbstat_vtab db | 166 register_dbstat_vtab db |
167 do_execsql_test stat-5.1 { | 167 do_execsql_test stat-5.1 { |
168 PRAGMA auto_vacuum = OFF; | 168 PRAGMA auto_vacuum = OFF; |
169 CREATE VIRTUAL TABLE temp.stat USING dbstat; | 169 CREATE TABLE tx(y); |
170 CREATE TABLE t1(x); | 170 ATTACH ':memory:' AS aux1; |
| 171 CREATE VIRTUAL TABLE temp.stat USING dbstat(aux1); |
| 172 CREATE TABLE aux1.t1(x); |
171 INSERT INTO t1 VALUES(zeroblob(1513)); | 173 INSERT INTO t1 VALUES(zeroblob(1513)); |
172 INSERT INTO t1 VALUES(zeroblob(1514)); | 174 INSERT INTO t1 VALUES(zeroblob(1514)); |
173 SELECT name, path, pageno, pagetype, ncell, payload, unused, mx_payload | 175 SELECT name, path, pageno, pagetype, ncell, payload, unused, mx_payload |
174 FROM stat WHERE name = 't1'; | 176 FROM stat WHERE name = 't1'; |
175 } [list \ | 177 } [list \ |
176 t1 / 2 leaf 2 993 5 1517 \ | 178 t1 / 2 leaf 2 993 5 1517 \ |
177 t1 /000+000000 3 overflow 0 1020 0 0 \ | 179 t1 /000+000000 3 overflow 0 1020 0 0 \ |
178 t1 /001+000000 4 overflow 0 1020 0 0 \ | 180 t1 /001+000000 4 overflow 0 1020 0 0 \ |
179 ] | 181 ] |
180 | 182 |
| 183 do_catchsql_test stat-6.1 { |
| 184 CREATE VIRTUAL TABLE temp.s2 USING dbstat(mainx); |
| 185 } {1 {no such database: mainx}} |
| 186 |
181 finish_test | 187 finish_test |
OLD | NEW |