Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch codecless-inmemory-subjournal Excluding Merge-Ins
This is equivalent to a diff from 04e7e565 to d2bb0066
2017-05-10
| ||
12:58 | Avoid unnecessary codec operations on in-memory subjournals. (check-in: 199b2a84 user: drh tags: trunk) | |
12:49 | Do not invoke codec macros for in-memory subjournals. (Closed-Leaf check-in: d2bb0066 user: drh tags: codecless-inmemory-subjournal) | |
2017-05-08
| ||
18:29 | Do not invoke codec macros when reading or writing an in-memory sub-journal. (check-in: 2c145ee6 user: dan tags: codecless-inmemory-subjournal) | |
2017-05-06
| ||
18:09 | Fix an obscure assertion fault that can follow an OOM. The problem was introduced by check-in [a1cf44763277b6c7]. (check-in: 04e7e565 user: drh tags: trunk) | |
17:12 | Fix requirements marks and harmless compiler warnings. (check-in: 198ff4c0 user: drh tags: trunk) | |
Changes to src/pager.c.
︙ | |||
2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 | 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 | + + + + + | int rc; PgHdr *pPg; /* An existing page in the cache */ Pgno pgno; /* The page number of a page in journal */ u32 cksum; /* Checksum used for sanity checking */ char *aData; /* Temporary storage for the page */ sqlite3_file *jfd; /* The file descriptor for the journal file */ int isSynced; /* True if journal page is synced */ #ifdef SQLITE_HAS_CODEC /* The jrnlEnc flag is true if Journal pages should be passed through ** the codec. It is false for pure in-memory journals. */ const int jrnlEnc = (isMainJrnl || pPager->subjInMemory==0); #endif assert( (isMainJrnl&~1)==0 ); /* isMainJrnl is 0 or 1 */ assert( (isSavepnt&~1)==0 ); /* isSavepnt is 0 or 1 */ assert( isMainJrnl || pDone ); /* pDone always used on sub-journals */ assert( isSavepnt || pDone==0 ); /* pDone never used on non-savepoint */ aData = pPager->pTmpSpace; |
︙ | |||
2377 2378 2379 2380 2381 2382 2383 | 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 | + + + + + + + + + + - + + + + + + + + - - - + + + + + + | if( isOpen(pPager->fd) && (pPager->eState>=PAGER_WRITER_DBMOD || pPager->eState==PAGER_OPEN) && isSynced ){ i64 ofst = (pgno-1)*(i64)pPager->pageSize; testcase( !isSavepnt && pPg!=0 && (pPg->flags&PGHDR_NEED_SYNC)!=0 ); assert( !pagerUseWal(pPager) ); /* Write the data read from the journal back into the database file. ** This is usually safe even for an encrypted database - as the data ** was encrypted before it was written to the journal file. The exception ** is if the data was just read from an in-memory sub-journal. In that ** case it must be encrypted here before it is copied into the database ** file. */ #ifdef SQLITE_HAS_CODEC if( !jrnlEnc ){ CODEC2(pPager, aData, pgno, 7, rc=SQLITE_NOMEM_BKPT, aData); |
︙ | |||
2436 2437 2438 2439 2440 2441 2442 | 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 | + - + + | /* If this was page 1, then restore the value of Pager.dbFileVers. ** Do this before any decoding. */ if( pgno==1 ){ memcpy(&pPager->dbFileVers, &((u8*)pData)[24],sizeof(pPager->dbFileVers)); } /* Decode the page just read from disk */ #if SQLITE_HAS_CODEC |
︙ | |||
4448 4449 4450 4451 4452 4453 4454 | 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 | - - + + + + + + + | /* If the sub-journal was opened successfully (or was already open), ** write the journal record into the file. */ if( rc==SQLITE_OK ){ void *pData = pPg->pData; i64 offset = (i64)pPager->nSubRec*(4+pPager->pageSize); char *pData2; |
︙ |
Added test/subjournal.test.
|