Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Do not delete the journal file in "PRAGMA journal_mode" commands. This fixes [fc62af4523]. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
1ec74591a93e8b27ad3ac739914a48a9 |
User & Date: | dan 2010-06-17 10:42:07.000 |
References
2010-06-17
| ||
13:22 | • Ticket [fc62af4523] Executing "PRAGMA journal_mode" may delete journal file while it is in use. status still Open with 1 other change (artifact: 068d606ebb user: drh) | |
Context
2010-06-17
| ||
16:08 | Fix the tkt-fc62af4523.test to work around non-randomness of the randomblob() function when in testing mode. (check-in: 7c3a86b9c7 user: drh tags: trunk) | |
10:52 | Merge trunk updates with experimental branch. Also add tests to journal2.test. (check-in: 9f6ea1de5a user: dan tags: experimental) | |
10:42 | Do not delete the journal file in "PRAGMA journal_mode" commands. This fixes [fc62af4523]. (check-in: 1ec74591a9 user: dan tags: trunk) | |
10:24 | Add test case for [fc62af4523]. (check-in: cccd32c692 user: dan tags: trunk) | |
Changes
Changes to src/pager.c.
︙ | ︙ | |||
5873 5874 5875 5876 5877 5878 5879 | */ if( isOpen(pPager->jfd) && eMode!=PAGER_JOURNALMODE_WAL ){ sqlite3OsClose(pPager->jfd); } /* Change the journal mode. */ pPager->journalMode = (u8)eMode; | < < < < < < < < < < < < < < | 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 | */ if( isOpen(pPager->jfd) && eMode!=PAGER_JOURNALMODE_WAL ){ sqlite3OsClose(pPager->jfd); } /* Change the journal mode. */ pPager->journalMode = (u8)eMode; } /* Return the new journal mode */ return (int)pPager->journalMode; } /* |
︙ | ︙ |
Changes to test/jrnlmode.test.
︙ | ︙ | |||
480 481 482 483 484 485 486 | do_test jrnlmode-6.5 { execsql { PRAGMA journal_mode = MEMORY; BEGIN; INSERT INTO t4 VALUES(3, 4); } file exists test.db-journal | | | | 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 | do_test jrnlmode-6.5 { execsql { PRAGMA journal_mode = MEMORY; BEGIN; INSERT INTO t4 VALUES(3, 4); } file exists test.db-journal } {1} do_test jrnlmode-6.7 { execsql { COMMIT; SELECT * FROM t4; } } {1 2 3 4} do_test jrnlmode-6.8 { file exists test.db-journal } {1} do_test jrnlmode-6.9 { execsql { PRAGMA journal_mode = DELETE; BEGIN IMMEDIATE; INSERT INTO t4 VALUES(1,2); COMMIT; } file exists test.db-journal } {0} |
︙ | ︙ |