Commit 87a698ee authored by Victor Costan's avatar Victor Costan Committed by Commit Bot

sqlite: Remove unused build flag SQLITE_MMAP_READ_ONLY.

The string "SQLITE_MMAP_READ_ONLY" only shows up the BUILD.gn file [1],
so this macro does not impact the SQLite build at all.

The comment above it suggests that the macro is intended to set up
SQLite so it uses read-only mmap regions, to avoid having memory
stompers corrupt databases. However, the SQLite documentation [2]
indicates that the read-only mmap behavior is the default and only
option available.

In conclusion, this flag is misleading, and removing it will not result
in any behavior change.

[1] https://cs.chromium.org/search/?q=SQLITE_MMAP_READ_ONLY&ssfr=1&type=cs
[2] https://www.sqlite.org/mmap.html

Change-Id: I5fc3ae62f399fcfc6fbdd868258fef48cdc7fa61
Reviewed-on: https://chromium-review.googlesource.com/c/1343194Reviewed-by: default avatarJoshua Bell <jsbell@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609747}
parent 82264b46
......@@ -62,11 +62,6 @@ config("chromium_sqlite3_compile_options") {
# TODO(pwnall): Figure out if exceeding this is costly.
"SQLITE_MAX_MMAP_SIZE=268435456",
# Use a read-only memory map when mmap'ed I/O is enabled to prevent memory
# stompers from directly corrupting the database.
# TODO(pwnall): Upstream the ability to use this define.
"SQLITE_MMAP_READ_ONLY=1",
# The default POSIX permissions for a newly created SQLite database.
#
# If unspecified, this defaults to 0644. All the data stored by Chrome is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment