0
Commit Graph

57 Commits

Author SHA1 Message Date
Avi Drissman
2e85357a8b Update header includes for /base/functional in /s*
bind.h, callback.h, callback_forward.h, and callback_helpers.h
moved into /base/functional/. Update the include paths to
directly include them in their new location.

Bug: 1364441
Change-Id: I9576f9ae63e93053a6ce2c8cc64ebf6c85c40b1a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4159511
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1092060}
2023-01-12 21:57:32 +00:00
Avi Drissman
69b874fee0 Update copyright headers in sql/, storage/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c95.

No-Try: true
Bug: 1098010
Change-Id: I68bb81a4dcae37f944f4d8cd39d82ed540364615
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3899461
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047607}
2022-09-15 19:11:14 +00:00
Tommy C. Li
400c0f150b [sql] Add Error message to DatabaseDiagnostics
Adds the result of `Database::GetErrorMessage()` to the diagnostics
struct uploaded to Chrometto.

This is necessary because the existing data didn't allow us to
diagnose the error which occurs inside a transaction.

Google3 side CL that adds this field:
cl/473102826

Bug: 1321483
Change-Id: I67a2e5aa012cb95f001a50402248ab7f5f7c6936
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3885062
Reviewed-by: Stephen Nusko <nuskos@chromium.org>
Commit-Queue: Tommy Li <tommycli@chromium.org>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1046610}
2022-09-13 22:39:28 +00:00
Tommy C. Li
7803636c89 [history] Collect a trace of the diagnostics on history SQLITE_ERROR
Uses TRACE_EVENT_INSTANT1 to copy db_diagnostics_ into a Perfetto
trace once we hit an SQLITE_ERROR for History.

Follows strategy laid out here:
https://groups.google.com/a/chromium.org/g/chromium-dev/c/9zcB3WHD9R8

I intend to add an entry to the Variations config to collect the trace
of the previous 30 seconds when we log
History.DatabaseSqliteError == kError.

I'm defining a new category "history" too within tracing that I
specifically plan to capture.

Bug: 1321483
Change-Id: I01d87bba7fbd11858f76c8ab1c27e8de1fc797c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3739048
Reviewed-by: Christopher Lam <calamity@chromium.org>
Reviewed-by: Sophie Chang <sophiechang@chromium.org>
Commit-Queue: Tommy Li <tommycli@chromium.org>
Reviewed-by: Stephen Nusko <nuskos@chromium.org>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1028936}
2022-07-27 21:47:22 +00:00
a20.singh
b0ca112f83 sqlite: Add test case for bad db file path
This CL adds the test case for bad db file path in reference to previous
patch - https://chromium-review.googlesource.com/c/chromium/src/+/3308486

Bug: 1275513
Change-Id: I32a009e913c179d40db615877c48652c0daae522
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3655610
Reviewed-by: Chris Mumford <cmumford@google.com>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Commit-Queue: Aditi Singh <a20.singh@samsung.com>
Cr-Commit-Position: refs/heads/main@{#1007709}
2022-05-26 03:32:45 +00:00
ssid
583f55e474 Add readonly statement support in sql::Database
Adds support for verifying whether an SQL atatement is readonly, by
using sqlite3_stmt_readonly().

BUG=1310450

Change-Id: I0cb90157f106e199cb429960fd0a29c7ca65d8e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3597753
Reviewed-by: Austin Sullivan <asully@chromium.org>
Commit-Queue: Siddhartha S <ssid@chromium.org>
Cr-Commit-Position: refs/heads/main@{#994862}
2022-04-21 19:59:00 +00:00
Victor Costan
e7944b4ea6 sql: Clean up sql::Database unit tests.
This CL performs the following cleanups.

* SQLDatabaseTest.Rollback is deleted, because it's redundant with
  SQLTransactionTest.ExplicitRollback and
  SQLTransactionTest.NestedRollback.

* SQLDatabaseTest.RazeLock is broken into
  SQLDatabaseTest.Raze_OtherConnectionHas{Read,Write}lock.

* SQLDatabaseTest.RazeEmptyDB is renamed to EmptyDatabaseFile

* SQLDatabaseTest.RazeAndClose and RazeAndClose_Diagostics are broken
  into RazeAndClose, RazeAndClose_{DeletesData, IsOpen,
  Reopen_NoChanges, OpenTransaction, Preload_NoCrash, DoesTableExist,
  IsSQLValid, Execute, GetUniqueStatement, GetCachedStatement,
  TransactionBegin} and Close_IsSQLValid.

* RazeAndClose_Invalidates{Unique,Cached}Statement are added, based on
  the tests involving `valid_statement` in SQLDatabaseTest.Poison.

* SQLDatabaseTest.Poison is broken into sub-tests that parallel the
  RazeAndClose_* tests.

* SQLDatabaseTest.AttachDatabase{WithOpenTransaction} are cleaned up and
  ported away from sql::Database's direct transaction APIs.

* The modified tests have their SQL statements updated to follow the SQL
  style guide.

This CL is intended to give us better coverage around
Database::RazeAndClose() and Database::Poison(), and start migrating
away from Database::{Begin,Rollback,Commit}Transaction() APIs.

Bug: 1310577, 1311718
Change-Id: I1c970988851dd098c0deddb297242e37f4654340
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3558074
Reviewed-by: Austin Sullivan <asully@chromium.org>
Auto-Submit: Victor Costan <pwnall@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/main@{#987134}
2022-03-30 20:06:22 +00:00
Victor Costan
cdef384420 sql: Handle sqlite3_backup_init() failures.
https://crrev.com/c/3520185 removed error checks in the code calling
sqlite3_backup_init(), based on a DCHECK that suggested the function
should not error out given our usage.

Crash data from the field proved this assumption was incorrect. This
CL adds a test demonstrating one failure case, and adds error handling
back in the code calling sqlite3_backup_init().

Bug: 1308325
Change-Id: I6c54a521faeb7812d01f7c9645646aba4ccb693f
Tested: New test hit the deleted DCHECK (before it was deleted).
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3554638
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Commit-Queue: Austin Sullivan <asully@chromium.org>
Cr-Commit-Position: refs/heads/main@{#986071}
2022-03-28 18:51:08 +00:00
Victor Costan
54d7138a6d sql: Disable foreign key enforcement by default for sql::Database users.
The use of SQLite foreign keys is discouraged in Chrome feature code.

After this CL lands, setting
DatabaseOptions::enable_foreign_keys_discouraged will enable foreign
key enforcement during Database::Open*(). This creates a supported path
for enablign foreign key enforcement, in a world where sql::Database
will no longer allow executing arbitrary PRAGMA statements.

On databases where foreign key enforcement is disabled, creating foreign
key constraints still works, but the constraints are not enforced.

This change applies to all Chrome feature code, but not to WebSQL, which
uses its own SQLite abstraction.

Disabling foreign key constraint enforcement in Chrome features is the
best we can do for now, because WebSQL still needs SQLite support for
foreign keys. After we remove WebSQL, we can remove all foreign key
support from SQLite.

Bug: 910955
Change-Id: I1472fb8fe19041a8ac3381c1dd85199c069812ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3032142
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Commit-Queue: Austin Sullivan <asully@chromium.org>
Cr-Commit-Position: refs/heads/main@{#983508}
2022-03-21 21:47:18 +00:00
Victor Costan
5f5104901a sql: Add dedicated tests for DatabaseOptions.
The tests ensure that our sql::Database::Open*() implementations
configure SQLite with the values in sql::DatabaseOptions. Some tests in
this CL are new, while some tests are moved over from sql::Database's
unit tests.

Change-Id: I709c5380726e1a3f6cd9022cce0734b6d2cbe713
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3526264
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/main@{#981393}
2022-03-15 23:50:23 +00:00
Victor Costan
dc72e8d1ce sql: Refactor some sql::Database helpers.
This CL performs the following changes.

1. The BackupDatabase() helper is renamed to BackupDatabaseForRaze() to
   reflect the only supported use case, and receives better
   documentation, via comments and DCHECKs.

2. The GetSqlite3File() helper is moved to Database::GetSqliteVfsFile()
   and receives better documentation, via comments and DCHECKs. Thanks
   to the documentation fixes, we can now close issue 329982.

3. The GetSqlite3FileAndSize() helper is removed, and inlined in the two
   callers. The reasoning behind handling GetSqlite3File() failures is now
   documented at each call site.

4. Database::GetAppropriateMmapSize() is renamed to
   Database::ComputeMmapSizeForOpen() and receives more thorough
   documentation.

Bug: 329982
Change-Id: Ia98bad4489a78c607f60e3da787f809f45298782
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3520185
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Auto-Submit: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/main@{#980674}
2022-03-14 18:14:51 +00:00
Victor Costan
8715683622 sql:: Remove test::ScopedErrorCallback.
This functionality is only used by a couple of //sql tests. Using

tested, without adding a significant readability burden.

Database: :set_error_callback() reduces the complexity of the code being
Change-Id: Id00407c57cf5249f178e85bdae6bda5aa98b8b84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3515427
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Commit-Queue: Austin Sullivan <asully@chromium.org>
Cr-Commit-Position: refs/heads/main@{#979969}
2022-03-10 22:08:35 +00:00
Victor Costan
d09770c8e2 Reland "sql: Add guards around the database error callback."
This is a reland of commit a8d0a5b284

The original CL failed to compile in some configuration because of
incorrect use of the GUARDED_BY() macro with a SequenceChecker. This CL
corrects the use to GUARDED_BY_CONTEXT(). Sample compilation error for
the original CL: https://ci.chromium.org/b/8820233398401035361

Original change's description:
> sql: Add guards around the database error callback.
>
> This CL makes the following code changes.
>
> 1. Adds a DCHECK() verifying that sql::Database::set_error_callback() is
>    only called with a non-null callback when the current error callback
>    is null. This is intended to prevent confusion during development.
> 2. Turns sql::Database::has_error_callback() into a HasErrorCallback()
>    that is only accessible to sql::Recovery.
>
> This CL makes following changes to the tests covering database error
> callbacks.
>
> 1. A monolithic test is broken up into multiple test cases.
> 2. The object used to track callback storage lifetime is conceptually
>    simplified (RefCount -> LifeTracker) and beefed up with sequence
>    checks.
> 3. The test covering set_error_callback() inside the error callback
>    is erased, as the newly introduced DCHECK disallows that usage.
> 4. The SQL statements are brought in line with the style guide.
>
> Change-Id: I6a00ff875d976ce17017b6655a49e2b111f91d78
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3170894
> Commit-Queue: Victor Costan <pwnall@chromium.org>
> Auto-Submit: Victor Costan <pwnall@chromium.org>
> Reviewed-by: Austin Sullivan <asully@chromium.org>
> Commit-Queue: Austin Sullivan <asully@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#978796}

Change-Id: I4a1ea0eb922ef518f0ca46a3543ff9cb68ef6e3c
Cq-Include-Trybots: luci.chromium.try:fuchsia-arm64-cast,linux-trusty-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3510951
Reviewed-by: Austin Sullivan <asully@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/main@{#978940}
2022-03-08 23:14:46 +00:00
Dominique Fauteux-Chapleau
289636514e Revert "sql: Add guards around the database error callback."
This reverts commit a8d0a5b284.

Reason for revert: Breaks compilation, see https://ci.chromium.org/ui/p/chromium/builders/ci/linux-trusty-rel/34403/overview

Original change's description:
> sql: Add guards around the database error callback.
>
> This CL makes the following code changes.
>
> 1. Adds a DCHECK() verifying that sql::Database::set_error_callback() is
>    only called with a non-null callback when the current error callback
>    is null. This is intended to prevent confusion during development.
> 2. Turns sql::Database::has_error_callback() into a HasErrorCallback()
>    that is only accessible to sql::Recovery.
>
> This CL makes following changes to the tests covering database error
> callbacks.
>
> 1. A monolithic test is broken up into multiple test cases.
> 2. The object used to track callback storage lifetime is conceptually
>    simplified (RefCount -> LifeTracker) and beefed up with sequence
>    checks.
> 3. The test covering set_error_callback() inside the error callback
>    is erased, as the newly introduced DCHECK disallows that usage.
> 4. The SQL statements are brought in line with the style guide.
>
> Change-Id: I6a00ff875d976ce17017b6655a49e2b111f91d78
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3170894
> Commit-Queue: Victor Costan <pwnall@chromium.org>
> Auto-Submit: Victor Costan <pwnall@chromium.org>
> Reviewed-by: Austin Sullivan <asully@chromium.org>
> Commit-Queue: Austin Sullivan <asully@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#978796}

Change-Id: I2b643cfdca266bb79bbaf1eabe52a04761bd7320
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3510371
Auto-Submit: Dominique Fauteux-Chapleau <domfc@chromium.org>
Owners-Override: Dominique Fauteux-Chapleau <domfc@google.com>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Commit-Queue: Austin Sullivan <asully@chromium.org>
Cr-Commit-Position: refs/heads/main@{#978800}
2022-03-08 19:27:30 +00:00
Victor Costan
a8d0a5b284 sql: Add guards around the database error callback.
This CL makes the following code changes.

1. Adds a DCHECK() verifying that sql::Database::set_error_callback() is
   only called with a non-null callback when the current error callback
   is null. This is intended to prevent confusion during development.
2. Turns sql::Database::has_error_callback() into a HasErrorCallback()
   that is only accessible to sql::Recovery.

This CL makes following changes to the tests covering database error
callbacks.

1. A monolithic test is broken up into multiple test cases.
2. The object used to track callback storage lifetime is conceptually
   simplified (RefCount -> LifeTracker) and beefed up with sequence
   checks.
3. The test covering set_error_callback() inside the error callback
   is erased, as the newly introduced DCHECK disallows that usage.
4. The SQL statements are brought in line with the style guide.

Change-Id: I6a00ff875d976ce17017b6655a49e2b111f91d78
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3170894
Commit-Queue: Victor Costan <pwnall@chromium.org>
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Commit-Queue: Austin Sullivan <asully@chromium.org>
Cr-Commit-Position: refs/heads/main@{#978796}
2022-03-08 19:15:01 +00:00
Victor Costan
8c3a9920d3 sql: Replace corruption in SQLDatabaseTest.FullIntegrityCheck.
In SQLite 3.38.0, "PRAGMA integrity_check" recovers from an incorrect
page count in the database header, without recording an error. This is
consistent with
https://www.sqlite.org/fileformat2.html#in_header_database_size which
says that SQLite may fall back to the file size, instead of relying on
the database size in the header.

This CL switches the SQLDatabaseTest.FullIntegrityCheck test from
sql::test::CorruptSizeInHeader() to sql::test::CorruptIndexRootPage().
This allows the test to pass in both our current SQLite version
(3.37.1) and in the upcoming SQLite 3.38.0.

This CL also updates the FullIntegrityCheck() documentation, adding API
guarantees in case the database is corrupted.

Bug: 1300442
Change-Id: I70d373a4156fd710f96a50125affe439e7cb5780
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3489937
Reviewed-by: Austin Sullivan <asully@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/main@{#975408}
2022-02-26 03:50:52 +00:00
Victor Costan
4b67f54ec0 sql: Rework Database::FullIntegrityCheck() implementation and tests.
The current implementation only reports the errors from the last row
returned by "PRAGMA integrity_check". This CL fixes the bug. The test is
updated to show more useful error information on failures.

Bug: 1300442
Change-Id: I4e91134df942f8ba2e7ade4e92a3ad84a2046929
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3486112
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Commit-Queue: Austin Sullivan <asully@chromium.org>
Cr-Commit-Position: refs/heads/main@{#974711}
2022-02-24 17:40:55 +00:00
Victor Costan
3c80271ae4 sql: Rework test::CorruptSizeInHeader() implementation and tests.
The implementation is migrated to base::File and
base::{Read,Write}BigEndian().

The unit test is broken into three separate tests that cover individual
aspects (database open, SQL statement exection, schema checks) of the
expected behavior.

Bug: 1300442
Change-Id: I58833185e005cedb098e0f9e42e28273a0191e8d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3487146
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Commit-Queue: Austin Sullivan <asully@chromium.org>
Cr-Commit-Position: refs/heads/main@{#974708}
2022-02-24 17:33:06 +00:00
Victor Costan
86989d4d14 sql: Remove Database::QuickIntegrityCheck().
This method is not used anywhere. Removing it leaves exactly one way to
do an integrity check.

Furthermore, removing this method may facilitate upgrading to SQLite
3.38.0, as its unit tests are currently failing when ran against the
3.38.0 code.

Bug: 1300262
Change-Id: I6f8fc45d31044d8d0a9c1cb619701c87da720cf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3485179
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Commit-Queue: Austin Sullivan <asully@chromium.org>
Cr-Commit-Position: refs/heads/main@{#974351}
2022-02-23 21:55:03 +00:00
Xiaohan Wang
7d09c5e14d sql: Use BUILDFLAG for OS checking
Use BUILDFLAG(IS_XXX) instead of defined(OS_XXX).

Generated by `os_buildflag_migration.py` (https://crrev.com/c/3311983).

R=thakis@chromium.org

Bug: 1234043
Test: No functionality change
Change-Id: Iacb4e82812731465a603dc347221a54f14173cff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3373990
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#956782}
2022-01-08 02:37:36 +00:00
Keishi Hattori
0e45c020c4 Rewrite most Foo* field_ pointer fields to raw_ptr<Foo> field_.
DO NOT REVERT (unless absolutely necessary)! Report build breaks to keishi@(APAC)/glazunov@(EMEA)/sebmarchand@(NA) as soon as you see them. Fixes are expected to be trivial.

This commit was generated automatically, by running the following script: tools/clang/rewrite_raw_ptr_fields/rewrite-multiple-platforms.sh on commit fe74bc434e

For more information, see MiraclePtr One Pager [1], the PSA at chromium-dev@ [2], and the raw_ptr documentation in //base/memory/raw_ptr.md.

FYI This CL does not enable MiraclePtr protection and we expect no behavior change from this.

[1] https://docs.google.com/document/d/1pnnOAIz_DMWDI4oIOFoMAqLnf_MZ2GsrJNb_dbQ3ZBg/edit?usp=sharing
[2] https://groups.google.com/a/chromium.org/g/chromium-dev/c/vAEeVifyf78/m/SkBUc6PhBAAJ

Binary-Size: Increase of around 500kb was approved for MiraclePtr
Include-Ci-Only-Tests: true
No-Tree-Checks: true
No-Presubmit: true
Bug: 1272324, 1073933
Change-Id: I05c86a83bbb4b3f4b017f361dd7f4e7437697f69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3305132
Commit-Queue: Keishi Hattori <keishi@chromium.org>
Reviewed-by: Bartek Nowierski <bartekn@chromium.org>
Owners-Override: Bartek Nowierski <bartekn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#945735}
2021-11-27 09:25:52 +00:00
John Delaney
86dbec651d [CodeInclusion] Replace sqlite_master usage with sqlite_schema
Replace alias for for sqlite_schema with more inclusive terminology.

https://www.sqlite.org/schematab.html#alternative_names

Change-Id: Ia31404bb806492aea7577f9141c1b1c82af8e940
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3103965
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Commit-Queue: John Delaney <johnidel@chromium.org>
Cr-Commit-Position: refs/heads/main@{#914737}
2021-08-24 15:05:21 +00:00
Victor Costan
18f9e7a53b sql: Explicit DCHECKs for empty SQL statements.
This CL adds DCHECKs with clear messages covering the cases when
Database::Get{Cached,Unique}Statement() and Database::IsSQLValid() are
passed SQL strings that don't contain any SQL statements.

Currently, Get{Cached,Unique}Statement() DCHECK with an obscure message
in the Database::StatementRef constructor, and Database::IsSQLValid()
does not DCHECK.

Bug: 1230443
Change-Id: I129769c849a441adeb6fcd45ed128e41a1673ef0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3042773
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#904204}
2021-07-22 06:34:17 +00:00
Victor Costan
289f2c8b0d sql: Introduce Database::ExecuteScript().
Bug: 1230443
Change-Id: I307878c6db31b155a033222e54628e4b8241c18e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3043443
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#904203}
2021-07-22 06:33:47 +00:00
Victor Costan
205b96dc46 sql: Make Database::ExecuteAndReturnErrorCode() private.
The Database::Execute() guidance currently points to
ExecuteAndReturnErrorCode() for situations where errors would be
ignored. However, the guidance is ignored [1, 2], and
ExecuteAndReturnErrorCode() is not used outside of //sql.

This CL makes ExecuteAndReturnErrorCode() private to Database, and
updates testing code that relied on it. This is an architectural
improvement, as code outside //sql should not have to know about SQLite
error codes.

[1] https://source.chromium.org/search?q=ignore_result%5C(.*%5C.Execute%5C(
[2] https://source.chromium.org/search?q=ignore_result%5C(.*-%3EExecute%5C(

Change-Id: I8d58180a40094c50e1da12b1445fb94c88531a35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3043151
Auto-Submit: Victor Costan <pwnall@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#904027}
2021-07-21 20:27:46 +00:00
Victor Costan
4e442d06ca sql: Disable double-quoted string literals for sql::Database users.
Double-quoted string literals are non-standard SQL. Allowing
double-quoted string literals is now considered a misfeature by SQLite
authors. See https://www.sqlite.org/quirks.html#dblquote

Disabling double-quoted string literals for sql::Database users is the
best we can do for now, because WebSQL still needs SQLite support for
this misfeature. After we remove  WebSQL, we can remove double-quoted
string literal support from SQLite.

Bug: 1230199
Change-Id: Id285fd442e512491206434864f3488e7b1ef6e6b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3035813
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#903562}
2021-07-20 17:43:13 +00:00
Victor Costan
fe078f92b0 sql: Disable access to views by default for sql::Database users.
The use of SQLite views is discouraged in Chrome feature code.

After this CL lands, accessing views in SQL statements requires setting
DatabaseOptions::enable_views_discouraged to true. This applies to all
Chrome feature code, but not to WebSQL, which uses its own SQLite
abstraction. CREATE VIEW and DROP VIEW will still work, but the views
will not be accessible to SQL statements such as SELECT.

The change will make Chrome feature developers aware when using this
discouraged feature, which is expected to curb usage.

Disabling access to views in Chrome features is the best we can do for
now, because WebSQL still needs SQLite support for views. After we
remove WebSQL, we can remove all view support from SQLite.

Bug: 910955
Change-Id: I9f6c6c40b3a60e9eef4d0e1f07769664d5a9bf4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3015310
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Alex Ilin <alexilin@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#903148}
2021-07-19 20:02:59 +00:00
Victor Costan
5530932e8c sql: DCHECK on extra SQL text in Database::Get*Statement().
The extra text gets ignored by SQLite's prepared statements API. At
best, the ignored text wastes bytes in the binary. At worst, the extra
text may confuse readers, or cause a bug.

Bug: 1230443
Change-Id: Ia3bce0288d036ac7ff7cdfc8a52bd9f45241d139
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3034486
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#903092}
2021-07-19 17:58:42 +00:00
Victor Costan
04fc909e90 sql: Disable virtual table access by default for sql::Database users.
The use of SQLite virtual tables is discouraged in Chrome feature code.

After this CL lands, accessing virtual tables in SQL statements requires
setting DatabaseOptions::enable_virtual_tables_discouraged to true. This
applies to all Chrome feature code, but not to WebSQL, which uses its
own SQLite abstraction. CREATE VIRTUAL TABLE and DROP VIRTUAL TABLE will
still work, but the virtual tables will not be accessible to SQL
statements such as SELECT and INSERT.

The change will make Chrome feature developers aware when using this
discouraged feature, which is expected to curb usage.

Disabling access to virtual tables in Chrome features is the best we can
do for now, because WebSQL still needs SQLite support for the fts3
virtual table. After we remove WebSQL, we can consider removing all
virtual table support from SQLite.

Bug: 910955
Change-Id: Ib89837d0f874c0f2a0c1a0ca2ebef6b14ada1335
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3034241
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#902751}
2021-07-17 00:09:34 +00:00
Victor Costan
106e500704 sql: Remove Database::GetUntrackedStatement().
Database::GetUntrackedStatement()'s stated purpose is to facilitate
const methods that execute SQL statements. This is a broken premise --
executing SQL statements modifies internal SQLite state, and in some
cases (shared locking), even read-only queries perform file system
calls.

This CL removes GetUntrackedStatement(), removes the const qualifiers on
methods that used it, and simplifies a few internal checks.

Change-Id: I8a2da85121c4cdf40b643e32081beaca7d57fb1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3033576
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#902747}
2021-07-17 00:04:49 +00:00
Victor Costan
8ec18ee4d4 sql: Replace Database::set_mmap_alt_status() with DatabaseOptions member
This database operation parameter should be immutable during database
operation. Moving to DatabaseOptions makes this explicit.

This CL also makes it clear that the mmap alternative status feature is
discouraged, so new feature designers will use the supported alternative
(meta tables).

The alternative status storage method is discouraged because the status
is stashed in the database schema, and changing it invalidates all
precompiled statements.

Bug: 1126968
Change-Id: I3530721f13e0e2192369d79b03df86ac7a67cf90
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3019891
Reviewed-by: Alex Ilin <alexilin@chromium.org>
Reviewed-by: David Van Cleve <davidvc@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#901145}
2021-07-13 19:45:32 +00:00
Victor Costan
7c234825d7 sql: Disable trigger execution for sql::Database users.
The use of SQLite triggers is discouraged in Chrome feature code.

This CL disables trigger execution from databases that use sql::Database
infrastructure -- this applies to all Chrome feature code, but not to
WebSQL, which uses its own SQLite abstraction. CREATE TRIGGER and DROP
TRIGGER will still work, but the triggers will not be executed.

Disabling trigger execution in Chrome features is the best we can do for
now, because WebSQL still needs SQLite support for triggers. After we
remove WebSQL, we can remove all trigger support from SQLite.

Bug: 910955
Change-Id: I1f994c67341e44253f1f78188a1eaa7c4d966f88
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3020167
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#900805}
2021-07-13 03:03:02 +00:00
Victor Costan
c02b7afe3a sql: Remove DCHECKs on SQL compilation errors.
SQL compilation errors can be caused by database schema corruption,
which can occur in normal operation -- data written to disk is always
subject to corruption.

Bug: 839186
Change-Id: I639214dee6db6d6df9c4611b5dae3e4f70cca207
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3015299
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#899985}
2021-07-09 13:26:45 +00:00
Victor Costan
00c764394e sql: Eliminate DISALLOW_COPY_AND_ASSIGN().
This results in more legible compilation errors when attempting to use

sql: :Statement in containers such as std::vector and std::array.
Change-Id: I33a39d84885635523a0ad375dd939282b136ad46
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3010739
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Commit-Queue: Austin Sullivan <asully@chromium.org>
Cr-Commit-Position: refs/heads/master@{#899169}
2021-07-07 16:55:58 +00:00
Victor Costan
49a903ab69 Reland "sql: Remove SQLTestBase."
This is a reland of 525b30ab9b

This reland removes the call to GetDBOptions() from the DatabaseTest
constructor, which was flagged as undefined behavior by the ubsan-vptr
bot. sql::Database construction is deferred to the SetUp() method by
turning the test's sql::Database member into a
std::unique_ptr<sql::Database>.

Original change's description:
> sql: Remove SQLTestBase.
>
> Change-Id: I87bf9499ef590b006660d3b8ab305b0192ec405c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2866306
> Auto-Submit: Victor Costan <pwnall@chromium.org>
> Commit-Queue: Ayu Ishii <ayui@chromium.org>
> Reviewed-by: Ayu Ishii <ayui@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#879443}

Change-Id: Ie83bf28eaebb88883b9eb37a7d8407e8bfc619ad
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2878638
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#880595}
2021-05-07 22:21:00 +00:00
John Abd-El-Malek
b6424076ec Revert "sql: Remove SQLTestBase."
This reverts commit 525b30ab9b.

Reason for revert: broke https://ci.chromium.org/p/chromium/builders/ci/linux-ubsan-vptr/4041

Original change's description:
> sql: Remove SQLTestBase.
>
> Change-Id: I87bf9499ef590b006660d3b8ab305b0192ec405c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2866306
> Auto-Submit: Victor Costan <pwnall@chromium.org>
> Commit-Queue: Ayu Ishii <ayui@chromium.org>
> Reviewed-by: Ayu Ishii <ayui@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#879443}

Change-Id: Ifee1fc660698bf511bd347f3e8f87a2e90083576
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2874780
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#879554}
2021-05-05 21:26:00 +00:00
Victor Costan
525b30ab9b sql: Remove SQLTestBase.
Change-Id: I87bf9499ef590b006660d3b8ab305b0192ec405c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2866306
Auto-Submit: Victor Costan <pwnall@chromium.org>
Commit-Queue: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#879443}
2021-05-05 17:54:10 +00:00
Victor Costan
15d905deef sql: Run SQLDatabaseTestExclusiveMode tests.
Currently, the SQLDatabaseTestExclusiveMode suite is not instantiated,
so the tests are not run. This CL instantiates the suite.

This problem was discovered by attempting to roll googletest past CL
315255779, which causes test binaries to fail when they include test
suites / parametrized tests that are not instantiated, and when they
include empty test suites.

Bug: 1163396
Change-Id: Ieb47f8d612c48af04f3d9d05e1873fc437c2f6c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2615579
Commit-Queue: Victor Costan <pwnall@chromium.org>
Commit-Queue: Darwin Huang <huangdarwin@chromium.org>
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Darwin Huang <huangdarwin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841220}
2021-01-07 22:18:58 +00:00
Shubham Aggarwal
00370898ce Add test coverage for WAL mode in database_unittest
This change makes it so that all tests in database_unittest.cc now run
both with WAL mode on and off. Better test coverage will help us
transition to using WAL mode by default in the future.

Bug: 78507
Change-Id: I116a8151c1ab4919a78657e46df98b26eddb7f11
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2490664
Commit-Queue: Shubham Aggarwal <shuagga@microsoft.com>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821790}
2020-10-28 17:57:54 +00:00
Shubham Aggarwal
7b60fe6e30 Add sql::DatabaseOptions to encapsulate its configuration options
sql::Database uses internal state to manage its configuration options
like page size, journal mode etc. These options need to be set before
Database::Open() is called. Any change to this state has no effect if
done after the database has already been opened. There are also some
SQLite subtleties around different behaviour of this state depending on
whether the database is being opened for the first time or being
re-opened.

This change encapsulates all such state into a sql::DatabaseOptions
struct which is passed to the sql::Database constructor. This ensures
that the required options have been configured before calling Open().

We migrate sql/ to use the new constructor instead of the setters for
the state. In upcoming changes, we plan to remove the setters for this
state. This will make the Database API enforce that the options are set
only once and stay the same over the lifetime of the object.

Bug: 1126968
Change-Id: Id44b6b3883f7a695f3b5cd96ad071e15cb1dc44a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2427035
Commit-Queue: Shubham Aggarwal <shuagga@microsoft.com>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#817386}
2020-10-15 06:00:28 +00:00
Victor Costan
d6e7325a8e sql: Add support for measuring per-database memory usage.
Change-Id: I836b9412f915cdebeff46883c535b83026ed6472
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2463873
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#817189}
2020-10-14 21:11:25 +00:00
Eric Willigers
b3eab8d676 Remove unneeded scoped_feature_list.h
Remove #include from source files
that do not use ScopedFeatureList.

Bug: 1137231
Change-Id: Ie8833c4ac4dc34fcb303dbe674cb882c38380e47
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2462957
Auto-Submit: Eric Willigers <ericwilligers@chromium.org>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816006}
2020-10-11 16:15:40 +00:00
Victor Costan
b223079ca1 sql: Switch SQLite to default to exclusive locking mode.
Chrome used the default SQLite configuration where databases were first
opened in the NORMAL (not exclusive) locking mode, and then databases
that opt in were switched to the EXCLUSIVE locking mode via a "PRAGMA
locking_mode" statement.

This CL switches the default. Databases are first opened in EXCLUSIVE
mode by changing the SQLITE_DEFAULT_LOCKING_MODE build configuration
macro. Databases that don't opt into exclusive mode are switched to the
NORMAL locking mode via a "PRAGMA locking_mode" statement.

This CL should not introduce any behavior changes in most cases. The
result of the "PRAGMA locking_mode" statement was previously ignored,
and is now checked. So, if the desired locking mode cannot be set,
sql::Database::Open() will now fail.

In the long run, Chrome's SQLite usage should be migrated to use the
exclusive locking mode, for the benefits outlined in
https://crbug.com/1120969. When that happens, the "PRAGMA locking_mode"
can go away.

Bug: 56559, 1120969
Change-Id: Ia9ac996fae45890bb5ca11168422e15e594087ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2460982
Commit-Queue: Victor Costan <pwnall@chromium.org>
Reviewed-by: Darwin Huang <huangdarwin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815540}
2020-10-09 08:35:14 +00:00
Shubham Aggarwal
1c06850ffa SQLite: Add WAL mode support to CorruptSizeInHeader
CorruptSizeInHeader is a test helper function that allows to simulate
a corrupt database by altering the header of the DB file. In WAL mode,
transactions don't always touch the DB file, which means the database
can behave normally even when corrupted in this way. In this change,
the CorruptSizeInHeader method checkpoints and truncates the WAL
file. This ensures that any subsequent transaction is guaranteed to hit
the DB file and hence be affect by the header corruption. This change
also adds a test that verifies that the function works correctly.

Change-Id: Ic584e29f89b09a886d96e4424a17de8d37683314
Bug: 78507
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2278413
Commit-Queue: Victor Costan <pwnall@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#785702}
2020-07-07 13:42:57 +00:00
Shubham Aggarwal
be4f97ce11 SQLite: Add support for WAL mode
As per issue 78507, we are looking to add support for SQLite databases
to use Write-ahead logging (https://www.sqlite.org/wal.html) mode in
Chromium. WAL mode should give us significant performance gains across
almost all use-cases.

This change is a first step towards achieving this. It adds opt-in
support to enable WAL mode for a database connection and perform a
checkpoint. It also adds a feature flag to enable WAL mode for all
databases by default to investigate its feasibility and impact on
performance.

Bug: 78507
Change-Id: I7fc5edcc39b50d2a13755d587cf342bded1af60a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2095927
Commit-Queue: Shubham Aggarwal <shuagga@microsoft.com>
Reviewed-by: Brandon Maslen <brandm@microsoft.com>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Reviewed-by: Chris Mumford <cmumford@google.com>
Cr-Commit-Position: refs/heads/master@{#780318}
2020-06-19 15:58:57 +00:00
Daniel Hosseinian
6214d5b988 Revert "[Sheriff] Disable SQLDatabaseTest on Windows ASAN because they are flaky"
This reverts commit 146b9f1b1d.

Reason for revert: These tests were actually failing because death
tests weren't working on win-asan. That problem has been fixed as of
r771124. Also win-asan is not accurately named as it does not define
ADDRESS_SANITIZER.

Original change's description:
> [Sheriff] Disable SQLDatabaseTest on Windows ASAN because they are flaky
>
> Bug: 1027481
> Change-Id: I7fc1806eada39c58f3f6035736bf9d5c595fbb0b
> TBR: pwnall@chromium.org
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1946331
> Reviewed-by: Guido Urdaneta <guidou@chromium.org>
> Commit-Queue: Guido Urdaneta <guidou@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#720463}

TBR=guidou@chromium.org,gab@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1027481
Change-Id: I91ab2178d555e7ee852d7a8bf6bb5b0ca90f806d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2216358
Commit-Queue: Daniel Hosseinian <dhoss@chromium.org>
Reviewed-by: Daniel Hosseinian <dhoss@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771889}
2020-05-26 18:28:23 +00:00
Guido Urdaneta
146b9f1b1d [Sheriff] Disable SQLDatabaseTest on Windows ASAN because they are flaky
Bug: 1027481
Change-Id: I7fc1806eada39c58f3f6035736bf9d5c595fbb0b
TBR: pwnall@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1946331
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720463}
2019-12-02 13:36:40 +00:00
Victor Costan
249be7083d sql: Remove SqlTempStoreMemory experiment.
All the necessary data has been collected. This CL undoes the parts of
https://crrev.com/c/1180530 and https://crrev.com/c/1183786 that were
not general code health improvements.

Bug: 875538
Change-Id: Ibd604c69996072db71c47b18b99f79962f389c3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1612266
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Chris Mumford <cmumford@google.com>
Reviewed-by: Steven Holte <holte@chromium.org>
Commit-Queue: Steven Holte <holte@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660615}
2019-05-16 22:24:10 +00:00
Victor Costan
f85512e56f sql: Make Database::DoesSchemaItemExist() case-sensitive.
The method and its derivatives are supposed to be used in tests, so it's
good to be exact.

Change-Id: Ifc4d6c278a32a125e79c2f1bc6cb3defd01494ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1558158
Reviewed-by: Chris Mumford <cmumford@google.com>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#649633}
2019-04-10 20:51:36 +00:00
Victor Costan
3a4023e9a3 sql: Remove DumpWithoutCrashing() diagnostic code.
this information was de-staffed in 2017, so it's time to remove the
instrumentation code.

sql: :Database can report diagnostic information via
base: :DumpWithoutCrashing(). The project that was supposed to analyze
Change-Id: I8bfd012b67a81e95e9d3598c7dddcd0eb748e015
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1549589
Auto-Submit: Victor Costan <pwnall@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#647434}
2019-04-03 20:08:22 +00:00