Revert "sqlite: Omit support for CHECK-constraint enforcement"
This reverts commit 5eb2cebd5c
.
Reason for revert: http://crbug.com/408243082
Original change's description:
> sqlite: Omit support for CHECK-constraint enforcement
>
> Bug: 41429419
> Change-Id: Ie57572354674af09fab497779c73528474c162ca
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6420854
> Reviewed-by: Greg Thompson <grt@chromium.org>
> Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
> Reviewed-by: CJ Huang <chenjih@google.com>
> Cr-Commit-Position: refs/heads/main@{#1442103}
Bug: 41429419, 408243082
Change-Id: Ia526e48afa9ef66c053a1210a37dfbc29febf862
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6434346
Reviewed-by: Greg Thompson <grt@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1442701}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
45f8e6b57a
commit
b181d0d697
@ -470,7 +470,9 @@ to disable SQLite's foreign key support using
|
||||
should not be used, for the same reasons as foreign key constraints. The
|
||||
equivalent checks should be performed in C++, typically using `DCHECK`.
|
||||
|
||||
`CHECK` constraints are disabled using
|
||||
After
|
||||
[WebSQL](https://www.w3.org/TR/webdatabase/) is removed from Chrome, we plan
|
||||
to disable SQLite's CHECK constraint support using
|
||||
[SQLITE_OMIT_CHECK](https://sqlite.org/compile.html#omit_check).
|
||||
|
||||
#### Triggers {#no-triggers}
|
||||
|
@ -147,19 +147,6 @@ TEST_F(SQLiteFeaturesTest, ForeignKeySupport) {
|
||||
EXPECT_EQ("", ExecuteWithResult(&db_, kSelectChildrenSql));
|
||||
}
|
||||
|
||||
// Ensure that our SQLite version omits enforcement of CHECK constraints.
|
||||
TEST_F(SQLiteFeaturesTest, NoCheckConstraint) {
|
||||
// CHECK constraints still parse.
|
||||
ASSERT_TRUE(
|
||||
db_.Execute("CREATE TABLE foo ("
|
||||
"id INTEGER PRIMARY KEY,"
|
||||
"foo INTEGER CHECK(foo > 0))"));
|
||||
|
||||
// But they are not enforced.
|
||||
ASSERT_TRUE(db_.Execute("INSERT INTO foo VALUES (1,0)"));
|
||||
EXPECT_EQ("1|0", ExecuteWithResults(&db_, "SELECT * FROM foo", "|", "\n"));
|
||||
}
|
||||
|
||||
// Ensure that our SQLite version supports booleans.
|
||||
TEST_F(SQLiteFeaturesTest, BooleanSupport) {
|
||||
ASSERT_TRUE(
|
||||
|
@ -54,9 +54,6 @@ sqlite_chromium_configuration_flags = [
|
||||
# Chrome calls sqlite3_reset() correctly to reset prepared statements.
|
||||
"SQLITE_OMIT_AUTORESET",
|
||||
|
||||
# Chrome does not use CHECK constraints.
|
||||
"SQLITE_OMIT_CHECK",
|
||||
|
||||
# Chromium does not use sqlite3_{get,free}_table().
|
||||
# Chrome doesn't use sqlite3_compileoption_{used,get}().
|
||||
"SQLITE_OMIT_COMPILEOPTION_DIAGS",
|
||||
|
Reference in New Issue
Block a user