PageRenderTime 23ms CodeModel.GetById 16ms app.highlight 3ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/src/sqlite/test/multiplex.test

#
Unknown | 571 lines | 499 code | 72 blank | 0 comment | 0 complexity | f63bfa5e777e24f80bf3ddba7dd5b206 MD5 | raw file
Possible License(s): BSD-3-Clause
  1# 2010 October 29
  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#
 12
 13set testdir [file dirname $argv0]
 14source $testdir/tester.tcl
 15source $testdir/malloc_common.tcl
 16
 17set g_chunk_size [ expr ($::SQLITE_MAX_PAGE_SIZE*16384) ]
 18set g_max_chunks 32
 19
 20# This handles appending the chunk number
 21# to the end of the filename.  if 
 22# SQLITE_MULTIPLEX_EXT_OVWR is defined, then
 23# it overwrites the last 2 bytes of the 
 24# file name with the chunk number.
 25proc multiplex_name {name chunk} {
 26  if {$chunk==0} { return $name }
 27  set num [format "%02d" $chunk]
 28  ifcapable {multiplex_ext_overwrite} {
 29    set name [string range $name 0 [expr [string length $name]-2-1]]
 30  }
 31  return $name$num
 32}
 33
 34# This saves off the parameters and calls the 
 35# underlying sqlite3_multiplex_control() API.
 36proc multiplex_set {db name chunk_size max_chunks} {
 37  global g_chunk_size
 38  global g_max_chunks
 39  set g_chunk_size [ expr (($chunk_size+($::SQLITE_MAX_PAGE_SIZE-1)) & ~($::SQLITE_MAX_PAGE_SIZE-1)) ]
 40  set g_max_chunks $max_chunks
 41  set rc [catch {sqlite3_multiplex_control $db $name chunk_size $chunk_size} msg]
 42  if { $rc==0 } { 
 43    set rc [catch {sqlite3_multiplex_control $db $name max_chunks $max_chunks} msg]
 44  }
 45  list $msg
 46}
 47
 48# This attempts to delete the base file and 
 49# and files with the chunk extension.
 50proc multiplex_delete {name} {
 51  global g_max_chunks
 52  for {set i 0} {$i<$g_max_chunks} {incr i} {
 53    forcedelete [multiplex_name $name $i]
 54    forcedelete [multiplex_name $name-journal $i]
 55    forcedelete [multiplex_name $name-wal $i]
 56  }
 57}
 58
 59db close
 60
 61multiplex_delete test.db
 62multiplex_delete test2.db
 63
 64#-------------------------------------------------------------------------
 65#   multiplex-1.1.*: Test initialize and shutdown.
 66
 67do_test multiplex-1.1 { sqlite3_multiplex_initialize nosuchvfs 1 } {SQLITE_ERROR}
 68do_test multiplex-1.2 { sqlite3_multiplex_initialize "" 1 }        {SQLITE_OK}
 69do_test multiplex-1.3 { sqlite3_multiplex_initialize "" 1 }        {SQLITE_MISUSE}
 70do_test multiplex-1.4 { sqlite3_multiplex_shutdown }               {SQLITE_OK}
 71
 72do_test multiplex-1.5 { sqlite3_multiplex_initialize "" 0 }        {SQLITE_OK}
 73do_test multiplex-1.6 { sqlite3_multiplex_shutdown }               {SQLITE_OK}
 74do_test multiplex-1.7 { sqlite3_multiplex_initialize "" 1 }        {SQLITE_OK}
 75do_test multiplex-1.8 { sqlite3_multiplex_shutdown }               {SQLITE_OK}
 76
 77
 78do_test multiplex-1.9.1  { sqlite3_multiplex_initialize "" 1 }     {SQLITE_OK}
 79do_test multiplex-1.9.2  { sqlite3 db test.db }                    {}
 80do_test multiplex-1.9.3  { multiplex_set db main 32768 16 }        {SQLITE_OK}
 81do_test multiplex-1.9.4  { multiplex_set db main 32768 -1 }        {SQLITE_MISUSE}
 82do_test multiplex-1.9.5  { multiplex_set db main -1 16 }           {SQLITE_MISUSE}
 83do_test multiplex-1.9.6  { multiplex_set db main 31 16 }           {SQLITE_OK}
 84do_test multiplex-1.9.7  { multiplex_set db main 32768 100 }       {SQLITE_MISUSE}
 85do_test multiplex-1.9.8  { multiplex_set db main 1073741824 1 }    {SQLITE_OK}
 86do_test multiplex-1.9.9  { db close }                              {}
 87do_test multiplex-1.9.10 { sqlite3_multiplex_shutdown }            {SQLITE_OK}
 88
 89do_test multiplex-1.10.1  { sqlite3_multiplex_initialize "" 1 }                                  {SQLITE_OK}
 90do_test multiplex-1.10.2  { sqlite3 db test.db }                                                 {}
 91do_test multiplex-1.10.3  { lindex [ catchsql { SELECT multiplex_control(2, 32768); } ] 0 }      {0}
 92do_test multiplex-1.10.4  { lindex [ catchsql { SELECT multiplex_control(3, -1); } ] 0 }         {1}
 93do_test multiplex-1.10.5  { lindex [ catchsql { SELECT multiplex_control(2, -1); } ] 0 }         {1}
 94do_test multiplex-1.10.6  { lindex [ catchsql { SELECT multiplex_control(2, 31); } ] 0 }         {0}
 95do_test multiplex-1.10.7  { lindex [ catchsql { SELECT multiplex_control(3, 100); } ] 0 }        {1}
 96do_test multiplex-1.10.8  { lindex [ catchsql { SELECT multiplex_control(2, 1073741824); } ] 0 } {0}
 97do_test multiplex-1.10.9  { db close }                                                           {}
 98do_test multiplex-1.10.10 { sqlite3_multiplex_shutdown }                                         {SQLITE_OK}
 99
100do_test multiplex-1.11.1  { sqlite3_multiplex_initialize "" 1 }               {SQLITE_OK}
101do_test multiplex-1.11.2  { sqlite3 db test.db }                              {}
102do_test multiplex-1.11.3  { sqlite3_multiplex_control db main enable 0  }     {SQLITE_OK}
103do_test multiplex-1.11.4  { sqlite3_multiplex_control db main enable 1  }     {SQLITE_OK}
104do_test multiplex-1.11.5  { sqlite3_multiplex_control db main enable -1 }     {SQLITE_OK}
105do_test multiplex-1.11.6  { db close }                                        {}
106do_test multiplex-1.11.7  { sqlite3_multiplex_shutdown }                      {SQLITE_OK}
107
108do_test multiplex-1.12.1  { sqlite3_multiplex_initialize "" 1 }                           {SQLITE_OK}
109do_test multiplex-1.12.2  { sqlite3 db test.db }                                          {}
110do_test multiplex-1.12.3  { lindex [ catchsql { SELECT multiplex_control(1, 0); } ] 0 }   {0}
111do_test multiplex-1.12.4  { lindex [ catchsql { SELECT multiplex_control(1, 1); } ] 0 }   {0}
112do_test multiplex-1.12.5  { lindex [ catchsql { SELECT multiplex_control(1, -1); } ] 0 }  {0}
113do_test multiplex-1.12.6  { db close }                                                    {}
114do_test multiplex-1.12.7  { sqlite3_multiplex_shutdown }                                  {SQLITE_OK}
115
116do_test multiplex-1.13.1  { sqlite3_multiplex_initialize "" 1 }                           {SQLITE_OK}
117do_test multiplex-1.13.2  { sqlite3 db test.db }                                          {}
118do_test multiplex-1.13.3  { lindex [ catchsql { SELECT multiplex_control(-1, 0); } ] 0 }  {1}
119do_test multiplex-1.13.4  { lindex [ catchsql { SELECT multiplex_control(4, 1); } ] 0 }   {1}
120do_test multiplex-1.13.6  { db close }                                                    {}
121do_test multiplex-1.13.7  { sqlite3_multiplex_shutdown }                                  {SQLITE_OK}
122
123#-------------------------------------------------------------------------
124# Some simple warm-body tests with a single database file in rollback 
125# mode:
126#
127#   multiplex-2.1.*: Test simple writing to a multiplex file.
128#
129#   multiplex-2.2.*: More writing.
130#
131#   multiplex-2.3.*: Open and close a second db.
132#
133#   multiplex-2.4.*: Try to shutdown the multiplex system before closing the db
134#                file. Check that this fails and the multiplex system still works
135#                afterwards. Then close the database and successfully shut
136#                down the multiplex system.
137#
138#   multiplex-2.5.*: More reading/writing.
139#
140#   multiplex-2.6.*: More reading/writing with varying small chunk sizes, as
141#                well as varying journal mode.
142#
143#   multiplex-2.7.*: Disable/enable tests.
144#
145
146sqlite3_multiplex_initialize "" 1
147multiplex_set db main 32768 16
148
149do_test multiplex-2.1.2 {
150  sqlite3 db test.db
151  execsql {
152    PRAGMA page_size=1024;
153    PRAGMA auto_vacuum=OFF;
154    PRAGMA journal_mode=DELETE;
155  }
156  execsql {
157    CREATE TABLE t1(a, b);
158    INSERT INTO t1 VALUES(1, randomblob(1100));
159    INSERT INTO t1 VALUES(2, randomblob(1100));
160  }
161} {}
162do_test multiplex-2.1.3 { file size [multiplex_name test.db 0] } {4096}
163do_test multiplex-2.1.4 {
164  execsql { INSERT INTO t1 VALUES(3, randomblob(1100)) }
165} {}
166
167do_test multiplex-2.2.1 {
168  execsql { INSERT INTO t1 VALUES(3, randomblob(1100)) }
169} {}
170do_test multiplex-2.2.3 { file size [multiplex_name test.db 0] } {6144}
171
172do_test multiplex-2.3.1 {
173  sqlite3 db2 test2.db
174  db2 close
175} {}
176
177
178do_test multiplex-2.4.1 {
179  sqlite3_multiplex_shutdown
180} {SQLITE_MISUSE}
181do_test multiplex-2.4.2 {
182  execsql { INSERT INTO t1 VALUES(3, randomblob(1100)) }
183} {}
184do_test multiplex-2.4.4 { file size [multiplex_name test.db 0] } {7168}
185do_test multiplex-2.4.99 {
186  db close
187  sqlite3_multiplex_shutdown
188} {SQLITE_OK}
189
190
191do_test multiplex-2.5.1 {
192  multiplex_delete test.db
193  sqlite3_multiplex_initialize "" 1
194  sqlite3 db test.db
195  multiplex_set db main 4096 16
196} {SQLITE_OK}
197
198do_test multiplex-2.5.2 {
199  execsql {
200    PRAGMA page_size = 1024;
201    PRAGMA journal_mode = delete;
202    PRAGMA auto_vacuum = off;
203    CREATE TABLE t1(a PRIMARY KEY, b);
204  }
205} {delete}
206
207do_test multiplex-2.5.3 { 
208  execsql { 
209    INSERT INTO t1 VALUES(1, 'one');
210    INSERT INTO t1 VALUES(2, randomblob(4000));
211    INSERT INTO t1 VALUES(3, 'three');
212    INSERT INTO t1 VALUES(4, randomblob(4000));
213    INSERT INTO t1 VALUES(5, 'five');
214    INSERT INTO t1 VALUES(6, randomblob($g_chunk_size));
215    INSERT INTO t1 VALUES(7, randomblob($g_chunk_size));
216  }
217} {}
218
219do_test multiplex-2.5.4 {
220  db eval {SELECT * FROM t1 WHERE a=1}
221} {1 one}
222
223do_test multiplex-2.5.5 {
224  db eval {SELECT * FROM t1 WHERE a=3}
225} {3 three}
226
227do_test multiplex-2.5.6 {
228  db eval {SELECT * FROM t1 WHERE a=5}
229} {5 five}
230
231do_test multiplex-2.5.7 {
232  db eval {SELECT a,length(b) FROM t1 WHERE a=2}
233} {2 4000}
234
235do_test multiplex-2.5.8 {
236  db eval {SELECT a,length(b) FROM t1 WHERE a=4}
237} {4 4000}
238
239do_test multiplex-2.5.9 { file size [multiplex_name test.db 0] } [list $g_chunk_size]
240do_test multiplex-2.5.10 { file size [multiplex_name test.db 1] } [list $g_chunk_size]
241
242do_test multiplex-2.5.99 {
243  db close
244  sqlite3_multiplex_shutdown
245} {SQLITE_OK}
246
247
248set all_journal_modes {delete persist truncate memory off}
249foreach jmode $all_journal_modes {
250  for {set sz 151} {$sz<8000} {set sz [expr $sz+419]} {
251
252    do_test multiplex-2.6.1.$sz.$jmode {
253      multiplex_delete test.db
254      sqlite3_multiplex_initialize "" 1
255      sqlite3 db test.db
256      multiplex_set db main $sz 32
257    } {SQLITE_OK}
258
259    do_test multiplex-2.6.2.$sz.$jmode {
260      db eval {
261        PRAGMA page_size = 1024;
262        PRAGMA auto_vacuum = off;
263      }
264      db eval "PRAGMA journal_mode = $jmode;"
265    } $jmode
266
267    do_test multiplex-2.6.3.$sz.$jmode { 
268      execsql { 
269        CREATE TABLE t1(a PRIMARY KEY, b);
270        INSERT INTO t1 VALUES(1, 'one');
271        INSERT INTO t1 VALUES(2, randomblob($g_chunk_size));
272      }
273    } {}
274
275    do_test multiplex-2.6.4.$sz.$jmode {
276      db eval {SELECT b FROM t1 WHERE a=1}
277    } {one}
278
279    do_test multiplex-2.6.5.$sz.$jmode {
280      db eval {SELECT length(b) FROM t1 WHERE a=2}
281    } [list $g_chunk_size]
282
283    do_test multiplex-2.6.6.$sz.$jmode { file size [multiplex_name test.db 0] } [list $g_chunk_size]
284
285    do_test multiplex-2.6.99.$sz.$jmode {
286      db close
287      sqlite3_multiplex_shutdown
288    } {SQLITE_OK}
289
290  }
291}
292
293do_test multiplex-2.7.1  { multiplex_delete test.db }                                       {}
294do_test multiplex-2.7.2  { sqlite3_multiplex_initialize "" 1 }                              {SQLITE_OK}
295do_test multiplex-2.7.3  { sqlite3 db test.db }                                             {}
296do_test multiplex-2.7.4  { lindex [ catchsql { SELECT multiplex_control(2, 65536); } ] 0 }  {0}
297do_test multiplex-2.7.5  { lindex [ catchsql { SELECT multiplex_control(1, 0); } ] 0 }      {0}
298do_test multiplex-2.7.6 { 
299  execsql { 
300    CREATE TABLE t1(a PRIMARY KEY, b);
301    INSERT INTO t1 VALUES(1, randomblob(1000));
302  }
303} {}
304# verify only one file, and file size is less than chunks size
305do_test multiplex-2.7.7  { expr ([file size [multiplex_name test.db 0]] < 65536) } {1}
306do_test multiplex-2.7.8  { file exists [multiplex_name test.db 1] }                {0}
307do_test multiplex-2.7.9 { 
308  execsql { 
309    INSERT INTO t1 VALUES(2, randomblob(65536));
310  }
311} {}
312# verify only one file, and file size exceeds chunks size
313do_test multiplex-2.7.10 { expr ([file size [multiplex_name test.db 0]] > 65536) } {1}
314do_test multiplex-2.7.11 { file exists [multiplex_name test.db 1] }                {0}
315do_test multiplex-2.7.12 { db close }                                              {}
316do_test multiplex-2.7.13 { sqlite3_multiplex_shutdown }                            {SQLITE_OK}
317
318#-------------------------------------------------------------------------
319# Try some tests with more than one connection to a database file. Still
320# in rollback mode.
321#
322#   multiplex-3.1.*: Two connections to a single database file.
323#
324#   multiplex-3.2.*: Two connections to each of several database files (that
325#                are in the same multiplex group).
326#
327do_test multiplex-3.1.1 {
328  multiplex_delete test.db
329  sqlite3_multiplex_initialize "" 1
330  sqlite3 db test.db
331  multiplex_set db main 32768 16
332} {SQLITE_OK}
333do_test multiplex-3.1.2 {
334  execsql {
335    PRAGMA page_size = 1024;
336    PRAGMA journal_mode = delete;
337    PRAGMA auto_vacuum = off;
338    CREATE TABLE t1(a PRIMARY KEY, b);
339    INSERT INTO t1 VALUES(1, 'one');
340  }
341  file size [multiplex_name test.db 0]
342} {3072}
343do_test multiplex-3.1.3 {
344  sqlite3 db2 test.db
345  execsql { CREATE TABLE t2(a, b) } db2
346} {}
347do_test multiplex-3.1.4 {
348  execsql { CREATE TABLE t3(a, b) }
349} {}
350do_test multiplex-3.1.5 {
351  catchsql { CREATE TABLE t3(a, b) }
352} {1 {table t3 already exists}}
353do_test multiplex-3.1.6 {
354  db close
355  db2 close
356} {}
357
358do_test multiplex-3.2.1a {
359
360  multiplex_delete test.db
361  multiplex_delete test2.db
362
363  sqlite3 db1a test.db
364  sqlite3 db2a test2.db
365
366  foreach db {db1a db2a} {
367    execsql {
368      PRAGMA page_size = 1024;
369      PRAGMA journal_mode = delete;
370      PRAGMA auto_vacuum = off;
371      CREATE TABLE t1(a, b);
372    } $db
373  }
374
375  list [file size [multiplex_name test.db 0]] [file size [multiplex_name test2.db 0]]
376} {2048 2048}
377
378do_test multiplex-3.2.1b {
379  sqlite3 db1b test.db
380  sqlite3 db2b test2.db
381} {}
382
383do_test multiplex-3.2.2 { execsql { INSERT INTO t1 VALUES('x', 'y') } db1a } {}
384do_test multiplex-3.2.3 { execsql { INSERT INTO t1 VALUES('v', 'w') } db1b } {}
385do_test multiplex-3.2.4 { execsql { INSERT INTO t1 VALUES('t', 'u') } db2a } {}
386do_test multiplex-3.2.5 { execsql { INSERT INTO t1 VALUES('r', 's') } db2b } {}
387
388do_test multiplex-3.2.6 { 
389  execsql { INSERT INTO t1 VALUES(randomblob(500), randomblob(500)) } db1a
390} {}
391do_test multiplex-3.2.7 { 
392  execsql { INSERT INTO t1 VALUES(randomblob(500), randomblob(500)) } db1b
393} {}
394do_test multiplex-3.2.8 { 
395  execsql { INSERT INTO t1 VALUES(randomblob(500), randomblob(500)) } db2a
396} {}
397do_test multiplex-3.2.9 { 
398  execsql { INSERT INTO t1 VALUES(randomblob(500), randomblob(500)) } db2b
399} {}
400
401do_test multiplex-3.3.1 { 
402  execsql { INSERT INTO t1 VALUES(randomblob(500), randomblob(500)) } db1a
403  execsql { INSERT INTO t1 VALUES(randomblob(500), randomblob(500)) } db1b
404  execsql { INSERT INTO t1 VALUES(randomblob(500), randomblob(500)) } db2a
405  execsql { INSERT INTO t1 VALUES(randomblob(500), randomblob(500)) } db2b
406} {}
407
408do_test multiplex-3.2.X {
409  foreach db {db1a db2a db2b db1b} { catch { $db close } }
410} {}
411
412#-------------------------------------------------------------------------
413#
414
415sqlite3_multiplex_initialize "" 1
416multiplex_set db main 32768 16
417
418# Return a list of all currently defined multiplexs.
419proc multiplex_list {} {
420  set allq {}
421  foreach q [sqlite3_multiplex_dump] {
422    lappend allq [lindex $q 0]
423  }
424  return [lsort $allq]
425}
426
427do_test multiplex-4.1.6 {
428  multiplex_delete test2.db
429  sqlite3 db test2.db
430  db eval {CREATE TABLE t2(x); INSERT INTO t2 VALUES('tab-t2');}
431  set res [multiplex_list]
432  list [regexp {test2.db} $res]
433} {1}
434do_test multiplex-4.1.6a {
435  sqlite3 db2 test2.db
436  db2 eval {SELECT * FROM t2}
437} {tab-t2}
438do_test multiplex-4.1.7 {
439  execsql {INSERT INTO t2 VALUES(zeroblob(200000))}
440} {}
441do_test multiplex-4.1.8 {
442  sqlite3 db2 test2.db
443  db2 eval {SELECT count(*) FROM t2}
444} {2}
445do_test multiplex-4.1.8a {
446   db2 eval { DELETE FROM t2 WHERE x = 'tab-t2' }
447} {}
448do_test multiplex-4.1.8b {
449  sqlite3 db2 test2.db
450  db2 eval {SELECT count(*) FROM t2}
451} {1}
452
453
454do_test multiplex-4.1.9 {
455  execsql {INSERT INTO t2 VALUES(zeroblob(200000))}
456} {}
457do_test multiplex-4.1.10 {
458  set res [multiplex_list]
459  list [regexp {test2.db} $res]
460} {1}
461do_test multiplex-4.1.11 {
462  db2 close
463  set res [multiplex_list]
464  list [regexp {test2.db} $res]
465} {1}
466do_test multiplex-4.1.12 {
467  db close
468  multiplex_list
469} {}
470
471
472#-------------------------------------------------------------------------
473# The following tests test that the multiplex VFS handles malloc and IO 
474# errors.
475#
476
477sqlite3_multiplex_initialize "" 1
478multiplex_set db main 32768 16
479
480do_faultsim_test multiplex-5.1 -prep {
481  catch {db close}
482} -body {
483  sqlite3 db test2.db
484}
485do_faultsim_test multiplex-5.2 -prep {
486  catch {db close}
487} -body {
488  sqlite3 db test.db
489}
490
491catch { db close }
492multiplex_delete test.db
493multiplex_delete test2.db
494
495do_test multiplex-5.3.prep {
496  sqlite3 db test.db
497  execsql {
498    PRAGMA auto_vacuum = 1;
499    PRAGMA page_size = 1024;
500    CREATE TABLE t1(a, b);
501    INSERT INTO t1 VALUES(10, zeroblob(1200));
502  }
503  faultsim_save_and_close
504} {}
505do_faultsim_test multiplex-5.3 -prep {
506  faultsim_restore_and_reopen
507} -body {
508  execsql { DELETE FROM t1 }
509}
510
511do_test multiplex-5.4.1 {
512  catch { db close }
513  multiplex_delete test.db
514  file mkdir test.db
515  list [catch { sqlite3 db test.db } msg] $msg
516} {1 {unable to open database file}}
517catch { file delete test.db }
518
519do_faultsim_test multiplex-5.5 -prep {
520  catch { sqlite3_multiplex_shutdown }
521} -body {
522  sqlite3_multiplex_initialize "" 1
523  multiplex_set db main 32768 16
524}
525
526# test that mismatch filesize is detected
527#
528# Do not run this test if $::G(perm:presql) is set. If it is set, then the
529# expected IO error will occur within the Tcl [sqlite3] wrapper, not within
530# the first SQL statement executed below. This breaks the test case.
531#
532if {0==[info exists ::G(perm:presql)] || $::G(perm:presql) == ""} {
533  set all_journal_modes {delete persist truncate memory off}
534  foreach jmode $all_journal_modes {
535    do_test multiplex-5.6.1.$jmode {
536      sqlite3_multiplex_shutdown
537      multiplex_delete test.db
538      sqlite3 db test.db
539      db eval {
540        PRAGMA page_size = 1024;
541        PRAGMA auto_vacuum = off;
542      }
543      db eval "PRAGMA journal_mode = $jmode;"
544    } $jmode
545    do_test multiplex-5.6.2.$jmode {
546      execsql {
547        CREATE TABLE t1(a, b);
548        INSERT INTO t1 VALUES(1, randomblob(15000));
549        INSERT INTO t1 VALUES(2, randomblob(15000));
550        INSERT INTO t1 VALUES(3, randomblob(15000));
551        INSERT INTO t1 VALUES(4, randomblob(15000));
552        INSERT INTO t1 VALUES(5, randomblob(15000));
553      }
554      db close
555      sqlite3_multiplex_initialize "" 1
556      sqlite3 db test.db
557      multiplex_set db main 4096 16
558    } {SQLITE_OK}
559    do_test multiplex-5.6.3.$jmode {
560      catchsql {
561        INSERT INTO t1 VALUES(6, randomblob(15000));
562      }
563    } {1 {disk I/O error}}
564    do_test multiplex-5.6.4.$jmode {
565      db close
566    } {}
567  }
568}
569
570catch { sqlite3_multiplex_shutdown }
571finish_test