1. 23 Apr, 2017 1 commit
  2. 19 Apr, 2017 1 commit
    • shess's avatar
      [sql] Verify control of close-time WAL checkpoint. · f7fcc45c
      shess authored
      SQLite WAL mode by default checkpoints the WAL to the main database at
      close time.  Chromium closes databases at shutdown, which causes
      shutdown slowdowns due to buffered data being flushed.  WAL
      checkpointing would effectively increase the amount of buffered data
      being flushed.
      [WAL mode is currently not in use by Chromium.]
      Review-Url: https://codereview.chromium.org/2827673006
      Cr-Commit-Position: refs/heads/master@{#465772}
  3. 12 Apr, 2017 2 commits
  4. 27 Mar, 2017 1 commit
  5. 24 Mar, 2017 1 commit
  6. 19 Mar, 2017 1 commit
    • shess's avatar
      [sql] Tests for updates to mmap state. · a7b07acd
      shess authored
      Histograms indicate a bit more EVENT_MMAP_STATUS_FAILURE_UPDATE and
      EVENT_MMAP_META_FAILURE_UPDATE than I was hoping for, and I realized
      that that code was untested.  Add some tests for that case.
      Unfortunately for the histograms, the untested code appears to work.
      Review-Url: https://codereview.chromium.org/2756843003
      Cr-Commit-Position: refs/heads/master@{#458007}
  7. 15 Mar, 2017 1 commit
  8. 03 Mar, 2017 1 commit
  9. 02 Mar, 2017 1 commit
    • shess's avatar
      [sql] RecoverDatabase() deletes SQLITE_NOTADB databases. · 00d65d49
      shess authored
      SQLITE_NOTADB happens when the SQLite header data is broken.  That data
      includes meta-information about the file's structure, so any corruption
      in the header would require manual intervention to recover - assuming
      that the entire file is not broken.  SQLITE_NOTADB files are not even
      partially readable through SQLite, so deletion unsticks the file going
      Review-Url: https://codereview.chromium.org/2710823005
      Cr-Commit-Position: refs/heads/master@{#454374}
  10. 10 Feb, 2017 1 commit
  11. 24 Jan, 2017 1 commit
  12. 08 Dec, 2016 1 commit
  13. 21 Nov, 2016 1 commit
  14. 07 Nov, 2016 2 commits
  15. 27 Oct, 2016 2 commits
  16. 25 Oct, 2016 2 commits
    • shess's avatar
      [sql] Test helpers to ease testing of simple queries. · 1f955b18
      shess authored
      ExecuteWithResult() returns the first column of the first row as a
      string, ExecuteWithResults() formats the results with column and row
      separators.  They make it easier to check results using EXPECT_EQ().
      Review-Url: https://codereview.chromium.org/2441153002
      Cr-Commit-Position: refs/heads/master@{#427520}
    • shess's avatar
      [sql] Initialize StatisticsRecorder in SQLTestSuite. · 1cf87f27
      shess authored
      Histograms created using the histogram macros are stored in per-site global storage, so any histogram recorded before StatisticsRecorder::Initialize() are unregistered until the process exits.  HistogramTester relies on StatisticsRecorder, so depending on whether HistogramTester is created before or after a particular histogram macro is used, it may or may not be able to find the corresponding histogram.
      Pull StatisticsRecorder::Initialize() into the test-suite initialization, which should run before any code under test.
      Review-Url: https://codereview.chromium.org/2435933004
      Cr-Commit-Position: refs/heads/master@{#427508}
  17. 20 Oct, 2016 1 commit
    • shess's avatar
      [sql] Verify regexp not cached with prepared statement. · 001ae16f
      shess authored
      When the bug was logged, SQLite had a flaw where the regular
      expression (Y in X REGEXP Y or REGEXP(Y,X)) effectively had the
      compiled results cached with the prepared statement.  At some point
      Chromium pulled a version of SQLite which fixed this, this test
      verifies that the SQLite currently in use has the fix.
      Review-Url: https://chromiumcodereview.appspot.com/2440653002
      Cr-Commit-Position: refs/heads/master@{#426398}
  18. 19 Oct, 2016 1 commit
    • shess's avatar
      Modify sync unit test to use standard sql::test:: helper. · 4640cc23
      shess authored
      Sync tests for DirectoryBackingStore overwrote/truncated the underlying
      database file, which SQLite did not notice because of exclusive locking
      and the page cache.  So then the tests accessed a lot of data to defeat
      that.  This is brittle in the face of various changes to how
      sql::Connection sets up the underlying sqlite3 handle.
      Add sql::test::CorruptSizeInHeaderWithLock() to allow corrupting the
      database while SQLite connections are outstanding.  Remove
      set_exclusive_locking() for DirectoryBackingStore to allow
      CorruptSizeInHeaderWithLock() to run.
      Removing set_exclusive_locking() should not cause notable performance
      degradation.  SQLite keeps a cookie in the header page to track database
      changes, which allows it to re-used cache pages.  So there will be
      uncontended locking (because nobody else locks the file), and the header
      read should be from warm filesystem cache.
      Review-Url: https://chromiumcodereview.appspot.com/2424533002
      Cr-Commit-Position: refs/heads/master@{#426316}
  19. 28 Sep, 2016 1 commit
  20. 01 Sep, 2016 1 commit
    • maruel's avatar
      Delete all test isolate file now that M54 was branched. · 95b6282d
      maruel authored
      The runtime dependencies data was successfully transitioned to GN.
      Keep non-testing isolate as some projects (v8, webrtc) still need some. They
      will be curated incrementally.
        $ git rm $(git ls-files -- "*.isolate" | grep -i test | grep -v testserver)
        $ git ls-files -- "*.isolate" | wc -l
      Review-Url: https://codereview.chromium.org/2257893002
      Cr-Commit-Position: refs/heads/master@{#415954}
  21. 30 Aug, 2016 2 commits
  22. 27 Aug, 2016 1 commit
    • shess's avatar
      [sql] Track SQLite error codes from sql::Recovery ATTACH. · 63188114
      shess authored
      The major reason for sql::Recover::Begin() to fail is in the statement
      attaching the original database to the recovery database.  I believe
      this is because of SQLITE_NOTADB.  This is to verify that hypothesis.
      If the hypothesis is true, then the best course of action is to Raze()
      the database, as SQLITE_NOTADB means that some or all of the SQLite
      header data appears to be garbage.
      Review-Url: https://codereview.chromium.org/2274883003
      Cr-Commit-Position: refs/heads/master@{#414885}
  23. 22 Aug, 2016 1 commit
  24. 20 Aug, 2016 1 commit
    • shess's avatar
      [sql] Retry post-poison open as soon as possible. · bccd300e
      shess authored
      sql::Connection::Open() retries the open if the handle is poisoned by
      the error callback.  The assumption is that the error callback likely
      razed or recovered the database, and since there can be no outstanding
      statements the open can be safely retried.  This change adds this
      handling to call which attempts to probe the database for basic
      Review-Url: https://codereview.chromium.org/2258703004
      Cr-Commit-Position: refs/heads/master@{#413292}
  25. 05 Aug, 2016 1 commit
  26. 14 Jul, 2016 1 commit
    • brettw's avatar
      Convert some GN test support targets to static libs. · 3871f526
      brettw authored
      Converts some source sets that were source sets into static libraries. Converts additional targets in the touched files to static libraries where it seemed relevant.
      A few redundant dependencies were removed (one shouldn't need to specify both "foo" and "foo:test_support"). A few empty source sets were converted to groups.
      Review-Url: https://codereview.chromium.org/2151013002
      Cr-Commit-Position: refs/heads/master@{#405593}
  27. 13 Jul, 2016 1 commit
  28. 02 Jul, 2016 1 commit
    • shess's avatar
      [sql] Database recovery system for Shortcuts. · a402e75a
      shess authored
      sql::Recovery provides a conservative recovery system which requires
      some overhead in the client code.  Such code exists for the "Top Sites"
      and Favicons databases, and has shown that the easy-to-handle cases
      dominate.  Implement a helper function to recover an entire database,
      and apply it to the Shortcuts database.
      Review-Url: https://codereview.chromium.org/1832173002
      Cr-Commit-Position: refs/heads/master@{#403576}
  29. 21 Jun, 2016 2 commits
  30. 15 Jun, 2016 1 commit
    • ssid's avatar
      [tracing] Replace %p with %PRIXPTR in the memory dump names · 4205d7b5
      ssid authored
      The tracing dump names for memory-infra were inconsistent across
      platforms since %p prints 0x on posix and prints the number without
      markers in Windows. To make the names consistent, %p is replaced with
      PRIXPTR with a standard marker "0x".
      TBR=jochen@chromium.org, skyostil@chromium.org
      Review-Url: https://codereview.chromium.org/2067543003
      Cr-Commit-Position: refs/heads/master@{#400004}
  31. 13 Jun, 2016 1 commit
    • shess's avatar
      [sql] Log prepare compile errors on SQLITE_ERROR. · 9e77283d
      shess authored
      Code which prepares statements attempts to flag invalid statements with
      a DLOG(FATAL), because in almost all cases an invalid statement is
      always invalid, likely due to a typo or incorrect schema.  Previously,
      ShouldIgnoreSqliteCompileError() attempted to ignore certain errors
      which sometimes caused failed prepares, but which could vary over time.
      For instance, a corrupt database could cause a failed prepare, but
      doesn't reflect on the statement itself.  The new code only flags on
      SQLITE_ERROR, which is what sqlite3_prepare_v2() returns for syntax
      Merged GetUniqueStatement() and GetUntrackedStatement() into an
      implementation helper to reduce duplication.
      Review-Url: https://codereview.chromium.org/2038733002
      Cr-Commit-Position: refs/heads/master@{#399605}
  32. 07 Jun, 2016 1 commit
    • fdoray's avatar
      Remove use of deprecated MessageLoop methods in sql. · 2dfa7645
      fdoray authored
      are deprecated. This CL makes the following replacements to
      remove some uses of these methods:
      "MessageLoop::current()->PostTask" ->
      "MessageLoop::current()->PostDelayedTask" ->
      "MessageLoop::current()->DeleteSoon" ->
      "MessageLoop::current()->ReleaseSoon" ->
      In files where these replacements are made, it adds these includes:
        #include "base/location.h"
        #include "base/single_thread_task_runner.h"
        #include "base/threading/thread_task_runner_handle.h"
      And removes this include if it is no longer required:
        #include "base/message_loop/message_loop.h"
      Why ThreadTaskRunnerHandle::Get() instead of
       - The two are equivalent on threads that run a MessageLoop.
       - MessageLoop::current() doesn't work in base/task_scheduler
         because the scheduler's thread don't run MessageLoops.
         This CL will therefore facilitate the migration of browser
         threads to base/task_scheduler.
      Steps to generate this patch:
      1. Run message_loop_cleanup.py (see code on the bug).
      2. Run tools/sort-headers.py on modified files.
      3. Run git cl format.
      Review-Url: https://codereview.chromium.org/2033693004
      Cr-Commit-Position: refs/heads/master@{#398284}
  33. 04 Jun, 2016 1 commit
    • ssid's avatar
      [tracing] Sanitize process memory dump names for background mode · 448e5edb
      ssid authored
      For background mode:
      1. ProcessMemoryDump knows the level of detail.
      2. It checks for dump name to be present in whitelist. If not then
         returns a dummy mad. The strings are stripped of numbers (ids) and
         checked against a whitelist of dump names.
      3. Disable creating new dumps just to mark suballocations.
      4. Disable creation of global allocator dumps.
      5. Disable string attributes in allocator dumps.
      Also creates a new whitelist file to handle whitelisting logic.
      TBR=shess@chromium.org, jochen@chromium.org
      Review-Url: https://codereview.chromium.org/2006943003
      Cr-Commit-Position: refs/heads/master@{#397918}
  34. 27 Apr, 2016 1 commit