
Our largest SQLite patch, 0001-Virtual-table-supporting-recovery-of-corrupted-datab.patch, contains the implementation of a virtual table extension that contains custom recovery logic. The automated tests for the extension use SQLite's infrastructure base on Tcl, and don't run on CQ. This CL rewrites the tests to use C++ and //sql, so they can be run on CQ. A follow-up CL will replace the recovery code with a rewritten version that lives in the Chromium tree. This CL also adds a test covering the edge cases of the recovery code's SQLite varint decoding logic, which has proven useful for debugging the rewritten recovery code. Bug: 945204 Change-Id: I50c6cbf6f94dc698915e6fb4925769051396cb4b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1603604 Reviewed-by: Chris Mumford <cmumford@google.com> Commit-Queue: Victor Costan <pwnall@chromium.org> Cr-Commit-Position: refs/heads/master@{#659225}
31 lines
780 B
C++
31 lines
780 B
C++
// Copyright 2018 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef SQL_INTERNAL_API_TOKEN_H_
|
|
#define SQL_INTERNAL_API_TOKEN_H_
|
|
|
|
namespace sql {
|
|
|
|
namespace test {
|
|
struct ColumnInfo;
|
|
} // namespace test
|
|
|
|
// Restricts access to APIs internal to the //sql package.
|
|
//
|
|
// This implements Java's package-private via the passkey idiom.
|
|
class InternalApiToken {
|
|
private:
|
|
// Must NOT be =default to disallow creation by uniform initialization.
|
|
InternalApiToken() {}
|
|
InternalApiToken(const InternalApiToken&) = default;
|
|
|
|
friend class DatabaseTestPeer;
|
|
friend class Recovery;
|
|
friend struct test::ColumnInfo;
|
|
};
|
|
|
|
} // namespace sql
|
|
|
|
#endif // SQL_INTERNAL_API_TOKEN_H_
|