Description[sql] Consider fresh databases suitable for memory-mapped I/O.
GetAppropriateMmapSize() is called to validate the database as
error-free before enabling memory-mapped mode. The validation status is
stored in the [meta] table, since new databases have no [meta] table it
previously defaulted to not turning on memory-mapping. Then on second
open the file would be validated.
This change uses the lack of [meta] table as a signal that the file is
new and should be safe to memory-map. Additionally the code creating
[meta] pre-populates that setting.
Additionally disable memory-mapped mode for databases which do not make
use of the [meta] table. This makes the existing settings explicit.
BUG=537742, 555578
TBR=rdevlin.cronin@chromium.org, michaeln@chromium.org, zea@chromium.org, sky@chromium.org
Committed: https://crrev.com/9bf2c6745727731429baa207db994de5278505a0
Cr-Commit-Position: refs/heads/master@{#365959}
Patch Set 1 #
Total comments: 3
Patch Set 2 : Derp, don't need to disable again. #Patch Set 3 : Fixes for iOS and mojo #Patch Set 4 : eyeroll and 0UL #
Messages
Total messages: 30 (14 generated)
|