Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: |
Downloads: |
Tarball
| ZIP archive
|
---|
Timelines: |
family
| ancestors
| descendants
| both
| trunk
|
Files: |
files
| file ages
| folders
|
SHA1: |
b8684df395b5585a9428417c2bfd076515560f19 |
User & Date: |
dan
2015-03-12 19:12:30.098 |
Context
2015-03-12
| | |
21:22 |
|
(check-in: 0f250957cd user: drh tags: trunk)
|
19:12 |
|
(check-in: b8684df395 user: dan tags: trunk)
|
05:08 |
|
(check-in: 08958f5797 user: drh tags: trunk)
|
| | |
Changes
Changes to src/test_multiplex.c.
︙ | | |
569
570
571
572
573
574
575
576
577
578
579
580
581
582
|
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
|
+
+
+
|
}
if( rc==SQLITE_OK ){
sqlite3_int64 sz;
rc = pSubOpen->pMethods->xFileSize(pSubOpen, &sz);
if( rc==SQLITE_OK && zName ){
int bExists;
if( flags & SQLITE_OPEN_MASTER_JOURNAL ){
pGroup->bEnabled = 0;
}else
if( sz==0 ){
if( flags & SQLITE_OPEN_MAIN_JOURNAL ){
/* If opening a main journal file and the first chunk is zero
** bytes in size, delete any subsequent chunks from the
** file-system. */
int iChunk = 1;
do {
|
︙ | | |
Added test/crashM.test.
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
# 2015 Mar 13
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
#
#***********************************************************************
#
# Crash tests for the multiplex module with 8.3 filenames enabled.
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set testprefix crashM
ifcapable !crashtest||!8_3_names {
finish_test
return
}
db close
sqlite3_shutdown
sqlite3_config_uri 1
foreach f [glob -nocomplain test1.* test2.*] { forcedelete $f }
sqlite3_multiplex_initialize "" 1
sqlite3 db file:test1.db?8_3_names=1
sqlite3_multiplex_control db main chunk_size [expr 64*1024]
do_execsql_test 1.0 {
ATTACH 'file:test2.db?8_3_names=1' AS aux;
CREATE TABLE t1(x, y);
CREATE INDEX t1x ON t1(x);
CREATE INDEX t1y ON t1(y);
CREATE TABLE aux.t2(x, y);
CREATE INDEX aux.t2x ON t2(x);
CREATE INDEX aux.t2y ON t2(y);
WITH s(a) AS (
SELECT 1 UNION ALL SELECT a+1 FROM s WHERE a<1000
)
INSERT INTO t1 SELECT a, randomblob(500) FROM s;
WITH s(a) AS (
SELECT 1 UNION ALL SELECT a+1 FROM s WHERE a<1000
)
INSERT INTO t2 SELECT a, randomblob(500) FROM s;
} {}
for {set i 0} {$i < 20} {incr i} {
do_test 2.$i.1 {
crashsql -delay 1 -file test1.db -opendb {
sqlite3_shutdown
sqlite3_config_uri 1
sqlite3_multiplex_initialize crash 1
sqlite3 db file:test1.db?8_3_names=1
sqlite3_multiplex_control db main chunk_size [expr 64*1024]
} {
ATTACH 'file:test2.db?8_3_names=1' AS aux;
BEGIN;
UPDATE t1 SET y = randomblob(500) WHERE (x%10)==0;
UPDATE t2 SET y = randomblob(500) WHERE (x%10)==0;
COMMIT;
}
} {1 {child process exited abnormally}}
do_execsql_test 2.$i.2 {
PRAGMA main.integrity_check;
PRAGMA aux.integrity_check;
} {ok ok}
}
catch { db close }
sqlite3_multiplex_shutdown
finish_test
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |