blob: 8df95575c1723956287cb4ef69bd78a990f3bbd4 [file] [log] [blame]
danielk1977a713f2c2007-03-29 12:19:11 +00001# 2006 September 4
2#
3# The author disclaims copyright to this source code. In place of
4# a legal notice, here is a blessing:
5#
6# May you do good and not evil.
7# May you find forgiveness for yourself and forgive others.
8# May you share freely, never taking more than you give.
9#
10#***********************************************************************
11# This file implements regression tests for SQLite library.
12#
drhe64ca7b2009-07-16 18:21:17 +000013# $Id: misc7.test,v 1.29 2009/07/16 18:21:18 drh Exp $
danielk1977a713f2c2007-03-29 12:19:11 +000014
15set testdir [file dirname $argv0]
16source $testdir/tester.tcl
dana688ca52018-01-10 11:56:03 +000017set testprefix misc7
danielk1977a713f2c2007-03-29 12:19:11 +000018
danafcf9bd2014-01-23 14:44:08 +000019if {[clang_sanitize_address]==0} {
20 do_test misc7-1-misuse {
21 c_misuse_test
22 } {}
23}
danielk1977a713f2c2007-03-29 12:19:11 +000024
25do_test misc7-2 {
26 c_realloc_test
27} {}
28
29do_test misc7-3 {
30 c_collation_test
31} {}
32
danielk197769b637b2007-03-29 17:07:52 +000033# Try to open a directory:
34#
35do_test misc7-4 {
mistachkinfda06be2011-08-02 00:57:34 +000036 delete_file mydir
danielk197769b637b2007-03-29 17:07:52 +000037 file mkdir mydir
38 set rc [catch {
39 sqlite3 db2 ./mydir
40 } msg]
41 list $rc $msg
42} {1 {unable to open database file}}
43
drh85b623f2007-12-13 21:54:09 +000044# Try to open a file with a directory where its journal file should be.
danielk197769b637b2007-03-29 17:07:52 +000045#
danb8fff292018-01-23 14:01:51 +000046if {[atomic_batch_write test.db]==0} {
47 do_test misc7-5 {
48 delete_file mydir
49 file mkdir mydir-journal
50 sqlite3 db2 ./mydir
51 catchsql {
52 CREATE TABLE abc(a, b, c);
53 } db2
54 } {1 {unable to open database file}}
55 db2 close
56}
danielk197769b637b2007-03-29 17:07:52 +000057
58#--------------------------------------------------------------------
59# The following tests, misc7-6.* test the libraries behaviour when
60# it cannot open a file. To force this condition, we use up all the
61# file-descriptors before running sqlite. This probably only works
62# on unix.
63#
64
65proc use_up_files {} {
66 set ret [list]
67 catch {
68 while 1 { lappend ret [open test.db] }
69 }
70 return $ret
71}
72
danielk197795b289b2007-03-30 17:11:12 +000073proc do_fileopen_test {prefix sql} {
74 set fd_list [use_up_files]
75 set ::go 1
76 set ::n 1
77 set ::sql $sql
78 while {$::go} {
79 catch {db close}
80 do_test ${prefix}.${::n} {
81 set rc [catch {
82 sqlite db test.db
83 db eval $::sql
84 } msg]
85 if {$rc == 0} {set ::go 0}
86
87 expr {$rc == 0 || ($rc == 1 && [string first unable $msg]==0)}
88 } 1
89
90 close [lindex $fd_list 0]
91 set fd_list [lrange $fd_list 1 end]
92 incr ::n
93 }
94 foreach fd $fd_list {
95 close $fd
96 }
97 db close
98}
99
danielk197769b637b2007-03-29 17:07:52 +0000100execsql { CREATE TABLE abc(a PRIMARY KEY, b, c); }
101db close
danielk197769b637b2007-03-29 17:07:52 +0000102
drh0b3d55d2007-04-25 15:42:25 +0000103if {$tcl_platform(platform)!="windows"} {
104 do_fileopen_test misc7-6.1 {
105 BEGIN;
106 INSERT INTO abc VALUES(1, 2, 3);
107 INSERT INTO abc VALUES(2, 3, 4);
108 INSERT INTO abc SELECT a+2, b, c FROM abc;
109 COMMIT;
110 }
111
112 do_fileopen_test misc7-6.2 {
113 PRAGMA temp.cache_size = 1000;
114 }
danielk197769b637b2007-03-29 17:07:52 +0000115}
danielk197795b289b2007-03-30 17:11:12 +0000116
danielk1977b5584c02007-03-30 07:10:50 +0000117#
118# End of tests for out-of-file-descriptors condition.
119#--------------------------------------------------------------------
120
drh073d3ef2007-03-30 13:01:32 +0000121sqlite3 db test.db
drh0b3d55d2007-04-25 15:42:25 +0000122execsql {
123 DELETE FROM abc;
124 INSERT INTO abc VALUES(1, 2, 3);
125 INSERT INTO abc VALUES(2, 3, 4);
126 INSERT INTO abc SELECT a+2, b, c FROM abc;
127}
128
129
danielk1977b5584c02007-03-30 07:10:50 +0000130#--------------------------------------------------------------------
131# Test that the sqlite3_busy_timeout call seems to delay approximately
132# the right amount of time.
133#
danielk197795b289b2007-03-30 17:11:12 +0000134do_test misc7-7.0 {
danielk1977b5584c02007-03-30 07:10:50 +0000135 sqlite3 db2 test.db
danielk1977b5584c02007-03-30 07:10:50 +0000136 sqlite3_busy_timeout [sqlite3_connection_pointer db] 2000
137 execsql {
138 BEGIN EXCLUSIVE;
139 } db2
140
141 # Now db2 has an exclusive lock on the database file, and db has
142 # a busy-timeout of 2000 milliseconds. So check that trying to
143 # access the database using connection db delays for at least 1500 ms.
144 #
drh073d3ef2007-03-30 13:01:32 +0000145 set tm [time {
146 set result [catchsql {
147 SELECT * FROM sqlite_master;
148 } db]
149 }]
150 set delay [lindex $tm 0] ;# In microseconds
drh0b3d55d2007-04-25 15:42:25 +0000151 lappend result [expr {$delay>1500000 && $delay<4000000}]
drh073d3ef2007-03-30 13:01:32 +0000152} {1 {database is locked} 1}
danielk1977b5584c02007-03-30 07:10:50 +0000153db2 close
154
155#--------------------------------------------------------------------
156# Test that nothing goes horribly wrong when attaching a database
157# after the omit_readlock pragma has been exercised.
158#
drh33f111d2012-01-17 15:29:14 +0000159# Note: The PRAGMA omit_readlock was an early hack to disable the
160# fcntl() calls for read-only databases so that read-only databases could
161# be read on broken NFS systems. That pragma has now been removed.
162# (Use the unix-none VFS as a replacement, if needed.) But these tests
163# do not really depend on omit_readlock, so we left them in place.
164#
danielk1977935ed5e2007-03-30 09:13:13 +0000165do_test misc7-7.1 {
mistachkinfda06be2011-08-02 00:57:34 +0000166 forcedelete test2.db
167 forcedelete test2.db-journal
danielk1977b5584c02007-03-30 07:10:50 +0000168 execsql {
169 PRAGMA omit_readlock = 1;
170 ATTACH 'test2.db' AS aux;
171 CREATE TABLE aux.hello(world);
172 SELECT name FROM aux.sqlite_master;
173 }
174} {hello}
danielk1977935ed5e2007-03-30 09:13:13 +0000175do_test misc7-7.2 {
176 execsql {
177 DETACH aux;
178 }
179} {}
danielk19770371f1b2009-01-09 17:11:04 +0000180do_test misc7-7.3 {
181 db close
182 sqlite3 db test.db -readonly 1
183 execsql {
184 PRAGMA omit_readlock = 1;
185 ATTACH 'test2.db' AS aux;
186 SELECT name FROM aux.sqlite_master;
187 SELECT name FROM aux.sqlite_master;
188 }
189} {hello hello}
190do_test misc7-7.3 {
191 db close
192 sqlite3 db test.db
193 set ::DB [sqlite3_connection_pointer db]
194 list
195} {}
danielk1977b5584c02007-03-30 07:10:50 +0000196
danielk197724168722007-04-02 05:07:47 +0000197# Test the UTF-16 version of the "out of memory" message (used when
198# malloc fails during sqlite3_open() ).
danielk1977b5584c02007-03-30 07:10:50 +0000199#
200ifcapable utf16 {
201 do_test misc7-8 {
202 encoding convertfrom unicode [sqlite3_errmsg16 0x00000000]
203 } {out of memory}
204}
205
danielk1977935ed5e2007-03-30 09:13:13 +0000206do_test misc7-9 {
207 execsql {
208 SELECT *
209 FROM (SELECT name+1 AS one FROM sqlite_master LIMIT 1 OFFSET 1)
210 WHERE one LIKE 'hello%';
211 }
212} {}
danielk1977b5584c02007-03-30 07:10:50 +0000213
danielk1977935ed5e2007-03-30 09:13:13 +0000214#--------------------------------------------------------------------
danielk1977780b1d92007-03-30 14:56:34 +0000215# Improve coverage for vtab code.
danielk1977935ed5e2007-03-30 09:13:13 +0000216#
217ifcapable vtab {
danielk1977780b1d92007-03-30 14:56:34 +0000218 # Run some debug code to improve reported coverage
219 #
220
221 # set sqlite_where_trace 1
danielk1977935ed5e2007-03-30 09:13:13 +0000222 do_test misc7-10 {
223 register_echo_module [sqlite3_connection_pointer db]
danielk1977935ed5e2007-03-30 09:13:13 +0000224 execsql {
225 CREATE VIRTUAL TABLE t1 USING echo(abc);
226 SELECT a FROM t1 WHERE a = 1 ORDER BY b;
227 }
228 } {1}
danielk1977780b1d92007-03-30 14:56:34 +0000229 set sqlite_where_trace 0
230
231 # Specify an ORDER BY clause that cannot be indexed.
232 do_test misc7-11 {
233 execsql {
234 SELECT t1.a, t2.a FROM t1, t1 AS t2 ORDER BY 2 LIMIT 1;
235 }
236 } {1 1}
237
238 # The whole point of this is to test an error code other than
239 # SQLITE_NOMEM from the vtab xBestIndex callback.
240 #
241 do_ioerr_test misc7-12 -tclprep {
242 sqlite3 db2 test.db
243 register_echo_module [sqlite3_connection_pointer db2]
244 db2 eval {
245 CREATE TABLE abc(a PRIMARY KEY, b, c);
246 INSERT INTO abc VALUES(1, 2, 3);
247 CREATE VIRTUAL TABLE t1 USING echo(abc);
248 }
249 db2 close
250 } -tclbody {
251 register_echo_module [sqlite3_connection_pointer db]
252 execsql {SELECT * FROM t1 WHERE a = 1;}
253 }
254
255 # The case where the virtual table module returns a very large number
256 # as the cost of a scan (greater than SQLITE_BIG_DOUBLE in the code).
257 #
258 do_test misc7-13 {
259 sqlite3 db test.db
260 register_echo_module [sqlite3_connection_pointer db]
261 set ::echo_module_cost 2.0e+99
262 execsql {SELECT * FROM t1 WHERE a = 1;}
263 } {1 2 3}
264 unset ::echo_module_cost
danielk1977935ed5e2007-03-30 09:13:13 +0000265}
danielk197769b637b2007-03-29 17:07:52 +0000266
danielk197795b289b2007-03-30 17:11:12 +0000267db close
mistachkinfda06be2011-08-02 00:57:34 +0000268forcedelete test.db
269forcedelete test.db-journal
danielk197795b289b2007-03-30 17:11:12 +0000270sqlite3 db test.db
271
272ifcapable explain {
dan659816e2010-12-02 06:08:53 +0000273 do_execsql_test misc7-14.1 {
274 CREATE TABLE abc(a PRIMARY KEY, b, c);
275 EXPLAIN QUERY PLAN SELECT * FROM abc AS t2 WHERE rowid = 1;
276 } {
drh5822d6f2013-06-10 23:30:09 +0000277 0 0 0 {SEARCH TABLE abc AS t2 USING INTEGER PRIMARY KEY (rowid=?)}
dan659816e2010-12-02 06:08:53 +0000278 }
279 do_execsql_test misc7-14.2 {
280 EXPLAIN QUERY PLAN SELECT * FROM abc AS t2 WHERE a = 1;
281 } {0 0 0
drh5822d6f2013-06-10 23:30:09 +0000282 {SEARCH TABLE abc AS t2 USING INDEX sqlite_autoindex_abc_1 (a=?)}
dan659816e2010-12-02 06:08:53 +0000283 }
284 do_execsql_test misc7-14.3 {
285 EXPLAIN QUERY PLAN SELECT * FROM abc AS t2 ORDER BY a;
286 } {0 0 0
drh5822d6f2013-06-10 23:30:09 +0000287 {SCAN TABLE abc AS t2 USING INDEX sqlite_autoindex_abc_1}
dan659816e2010-12-02 06:08:53 +0000288 }
danielk197795b289b2007-03-30 17:11:12 +0000289}
danielk1977780b1d92007-03-30 14:56:34 +0000290
danielk197735469472007-03-30 18:21:52 +0000291db close
mistachkinfda06be2011-08-02 00:57:34 +0000292forcedelete test.db
293forcedelete test.db-journal
danielk197735469472007-03-30 18:21:52 +0000294sqlite3 db test.db
295
296#--------------------------------------------------------------------
297# This is all to force the pager_remove_from_stmt_list() function
298# (inside pager.c) to remove a pager from the middle of the
299# statement-list.
300#
301do_test misc7-15.1 {
302 execsql {
303 PRAGMA cache_size = 10;
304 BEGIN;
305 CREATE TABLE abc(a PRIMARY KEY, b, c);
306 INSERT INTO abc
307 VALUES(randstr(100,100), randstr(100,100), randstr(100,100));
308 INSERT INTO abc SELECT
309 randstr(100,100), randstr(100,100), randstr(100,100) FROM abc;
310 INSERT INTO abc SELECT
311 randstr(100,100), randstr(100,100), randstr(100,100) FROM abc;
312 INSERT INTO abc SELECT
313 randstr(100,100), randstr(100,100), randstr(100,100) FROM abc;
314 INSERT INTO abc SELECT
315 randstr(100,100), randstr(100,100), randstr(100,100) FROM abc;
316 INSERT INTO abc SELECT
317 randstr(100,100), randstr(100,100), randstr(100,100) FROM abc;
318 INSERT INTO abc SELECT
319 randstr(100,100), randstr(100,100), randstr(100,100) FROM abc;
320 INSERT INTO abc SELECT
321 randstr(100,100), randstr(100,100), randstr(100,100) FROM abc;
322 INSERT INTO abc SELECT
323 randstr(100,100), randstr(100,100), randstr(100,100) FROM abc;
324 COMMIT;
325 }
326 expr {[file size test.db]>10240}
327} {1}
328do_test misc7-15.2 {
329 execsql {
330 DELETE FROM abc WHERE rowid > 12;
331 INSERT INTO abc SELECT
332 randstr(100,100), randstr(100,100), randstr(100,100) FROM abc;
333 }
334} {}
335
danielk1977393f0682007-03-31 10:00:48 +0000336db close
mistachkinfda06be2011-08-02 00:57:34 +0000337forcedelete test.db
338forcedelete test.db-journal
danielk1977393f0682007-03-31 10:00:48 +0000339sqlite3 db test.db
340
341do_ioerr_test misc7-16 -sqlprep {
342 PRAGMA cache_size = 10;
343 PRAGMA default_cache_size = 10;
344 CREATE TABLE t3(a, b, UNIQUE(a, b));
345 INSERT INTO t3 VALUES( randstr(100, 100), randstr(100, 100) );
346 INSERT INTO t3 SELECT randstr(100, 100), randstr(100, 100) FROM t3;
347 INSERT INTO t3 SELECT randstr(100, 100), randstr(100, 100) FROM t3;
348 INSERT INTO t3 SELECT randstr(100, 100), randstr(100, 100) FROM t3;
349 INSERT INTO t3 SELECT randstr(100, 100), randstr(100, 100) FROM t3;
350 INSERT INTO t3 SELECT randstr(100, 100), randstr(100, 100) FROM t3;
351 UPDATE t3
352 SET b = 'hello world'
353 WHERE rowid >= (SELECT max(rowid)-1 FROM t3);
354} -tclbody {
355 set rc [catch {db eval {
356 BEGIN;
357 PRAGMA cache_size = 10;
358 INSERT INTO t3 VALUES( randstr(100, 100), randstr(100, 100) );
359 UPDATE t3 SET a = b;
360 COMMIT;
361 }} msg]
362
drh14386752013-11-16 12:56:46 +0000363 if {!$rc || ($rc && [string first "UNIQUE" $msg]==0)} {
danielk1977393f0682007-03-31 10:00:48 +0000364 set msg
365 } else {
366 error $msg
367 }
368}
369
danielk197724168722007-04-02 05:07:47 +0000370sqlite3 db test.db
danielk197708d31a22007-04-02 11:08:58 +0000371
372do_test misc7-16.X {
373 execsql {
374 SELECT count(*) FROM t3;
375 }
376} {32}
377
danielk197708d31a22007-04-02 11:08:58 +0000378#----------------------------------------------------------------------
379# Test the situation where a hot-journal is discovered but write-access
380# to it is denied. This should return SQLITE_BUSY.
381#
drh0b3d55d2007-04-25 15:42:25 +0000382# These tests do not work on windows due to restrictions in the
383# windows file system.
384#
mistachkinf1c6bc52012-06-21 15:09:20 +0000385if {$tcl_platform(platform)!="windows"} {
danielk197708d31a22007-04-02 11:08:58 +0000386
drh17fe6c12008-03-15 14:53:04 +0000387 # Some network filesystems (ex: AFP) do not support setting read-only
388 # permissions. Only run these tests if full unix permission setting
389 # capabilities are supported.
390 #
391 file attributes test.db -permissions rw-r--r--
392 if {[file attributes test.db -permissions]==0644} {
danielk197708d31a22007-04-02 11:08:58 +0000393
drh17fe6c12008-03-15 14:53:04 +0000394 do_test misc7-17.1 {
395 execsql {
396 BEGIN;
397 DELETE FROM t3 WHERE (oid%3)==0;
398 }
mistachkinfda06be2011-08-02 00:57:34 +0000399 forcecopy test.db bak.db
400 forcecopy test.db-journal bak.db-journal
drh17fe6c12008-03-15 14:53:04 +0000401 execsql {
402 COMMIT;
403 }
404
405 db close
mistachkinfda06be2011-08-02 00:57:34 +0000406 forcecopy bak.db test.db
407 forcecopy bak.db-journal test.db-journal
drh17fe6c12008-03-15 14:53:04 +0000408 sqlite3 db test.db
409
410 catch {file attributes test.db-journal -permissions r--------}
411 catch {file attributes test.db-journal -readonly 1}
412 catchsql {
413 SELECT count(*) FROM t3;
414 }
drh99dfe5e2008-10-30 15:03:15 +0000415 } {1 {unable to open database file}}
drh17fe6c12008-03-15 14:53:04 +0000416 do_test misc7-17.2 {
417 # Note that the -readonly flag must be cleared before the -permissions
418 # are set. Otherwise, when using tcl 8.5 on mac, the fact that the
419 # -readonly flag is set causes the attempt to set the permissions
420 # to fail.
421 catch {file attributes test.db-journal -readonly 0}
422 catch {file attributes test.db-journal -permissions rw-------}
423 catchsql {
424 SELECT count(*) FROM t3;
425 }
426 } {0 32}
427
danielk19778e3e8812009-02-10 05:45:41 +0000428 # sqlite3_test_control_pending_page [expr ($::sqlite_pending_byte / 1024) + 1]
429 set ::pending_byte_page [expr ($::sqlite_pending_byte / 1024) + 1]
430 sqlite3_test_control_pending_byte $::sqlite_pending_byte
drh17fe6c12008-03-15 14:53:04 +0000431 do_test misc7-17.3 {
432 db eval {
433 pragma writable_schema = true;
434 UPDATE sqlite_master
435 SET rootpage = $pending_byte_page
436 WHERE type = 'table' AND name = 't3';
437 }
438 execsql {
439 SELECT rootpage FROM sqlite_master WHERE type = 'table' AND name = 't3';
440 }
441 } $::pending_byte_page
442
443 do_test misc7-17.4 {
444 db close
445 sqlite3 db test.db
446 catchsql {
447 SELECT count(*) FROM t3;
448 }
449 } {1 {database disk image is malformed}}
danielk197708d31a22007-04-02 11:08:58 +0000450 }
drh0b3d55d2007-04-25 15:42:25 +0000451}
danielk1977ead8e3f2007-04-02 12:28:27 +0000452
drh6bd00bf2007-06-27 23:52:18 +0000453# Ticket #2470
454#
455do_test misc7-18.1 {
456 execsql {
457 CREATE TABLE table_1 (col_10);
458 CREATE TABLE table_2 (
459 col_1, col_2, col_3, col_4, col_5,
460 col_6, col_7, col_8, col_9, col_10
461 );
drh8278ce72008-07-11 13:53:54 +0000462 SELECT a.col_10
drh6bd00bf2007-06-27 23:52:18 +0000463 FROM
drh8278ce72008-07-11 13:53:54 +0000464 (SELECT table_1.col_10 AS col_10 FROM table_1) a,
drh6bd00bf2007-06-27 23:52:18 +0000465 (SELECT table_1.col_10, table_2.col_9 AS qcol_9
466 FROM table_1, table_2
467 GROUP BY table_1.col_10, qcol_9);
468 }
469} {}
470
drhaf005fb2008-07-09 16:51:51 +0000471# Testing boundary conditions on sqlite3_status()
472#
473do_test misc7-19.1 {
474 sqlite3_status -1 0
475} {21 0 0}
476do_test misc7-19.2 {
477 sqlite3_status 1000 0
478} {21 0 0}
479
480
drhe2a7c6e2008-08-01 15:06:30 +0000481# sqlite3_global_recover() is a no-op. But we might as well test it
482# if only to get the test coverage.
483#
484do_test misc7-20.1 {
485 sqlite3_global_recover
486} {SQLITE_OK}
487
danielk19770371f1b2009-01-09 17:11:04 +0000488# Try to open a really long file name.
489#
490do_test misc7-21.1 {
mistachkinf8a78462012-03-08 20:00:36 +0000491 set zFile [file join [get_pwd] "[string repeat abcde 104].db"]
danielk19770371f1b2009-01-09 17:11:04 +0000492 set rc [catch {sqlite3 db2 $zFile} msg]
493 list $rc $msg
494} {1 {unable to open database file}}
495
dane3664fb2013-03-05 15:09:25 +0000496# Try to do hot-journal rollback with a read-only connection. The
497# error code should be SQLITE_READONLY_ROLLBACK.
498#
499do_test misc7-22.1 {
500 db close
501 forcedelete test.db copy.db-journal
502 sqlite3 db test.db
503 execsql {
504 CREATE TABLE t1(a, b);
505 INSERT INTO t1 VALUES(1, 2);
506 INSERT INTO t1 VALUES(3, 4);
507 }
508 db close
509 sqlite3 db test.db -readonly 1
510 catchsql {
511 INSERT INTO t1 VALUES(5, 6);
512 }
513} {1 {attempt to write a readonly database}}
514do_test misc7-22.2 { execsql { SELECT * FROM t1 } } {1 2 3 4}
515do_test misc7-22.3 {
516 set fd [open test.db-journal w]
517 puts $fd [string repeat abc 1000]
518 close $fd
519 catchsql { SELECT * FROM t1 }
520} {1 {attempt to write a readonly database}}
521do_test misc7-22.4 {
522 sqlite3_extended_errcode db
523} SQLITE_READONLY_ROLLBACK
dana688ca52018-01-10 11:56:03 +0000524catch { db close }
mistachkinfda06be2011-08-02 00:57:34 +0000525forcedelete test.db
danielk197708d31a22007-04-02 11:08:58 +0000526
danb8fff292018-01-23 14:01:51 +0000527if {$::tcl_platform(platform)=="unix"
528 && [atomic_batch_write test.db]==0
529} {
dana688ca52018-01-10 11:56:03 +0000530 reset_db
531 do_execsql_test 23.0 {
532 CREATE TABLE t1(x, y);
533 INSERT INTO t1 VALUES(1, 2);
534 }
535
536 do_test 23.1 {
537 db close
538 forcedelete tst
539 file mkdir tst
540 forcecopy test.db tst/test.db
541 file attributes tst -permissions r-xr-xr-x
542 } {}
543
544 sqlite3 db tst/test.db
545 do_execsql_test 23.2 {
546 SELECT * FROM t1;
547 } {1 2}
548
549 do_catchsql_test 23.3 {
550 INSERT INTO t1 VALUES(3, 4);
551 } {1 {attempt to write a readonly database}}
552
553 do_test 23.4 {
554 sqlite3_extended_errcode db
555 } {SQLITE_READONLY_DIRECTORY}
556
557 do_test 23.5 {
558 db close
559 forcedelete tst
560 } {}
561}
562
danielk1977a713f2c2007-03-29 12:19:11 +0000563finish_test