SQLancer Logo


This page lists all bug reports that we created for widely-used Database Management Systems (DBMS), such as SQLite, MySQL, MariaDB, PostgreSQL, CockroachDB, and TiDB. We are thankful to the DBMS developers for responding to our bug reports and fixing all the bugs that we found.

The bug-finding approaches that we implemented are described in these papers:

We are aware that our DBMS testing approach(es) are being adopted by DBMS developers. We appreciate it if you would inform us if you have implemented one of the approaches or intend to do so. If possible, we would also like to refer to your DBMS on this page:

A number of talks on our testing approaches and SQLancer are online at YouTube. The following talk gives an introduction to TLP and a short demo of SQLancer:


Our work has received generous praise by DBMS developers. For example, the SQLite website states the following:

One fuzzing researcher of particular note is Manuel Rigger, currently (as this paragraph is written on 2019-12-21) at ETH Zurich. Most fuzzers only look for assertion faults, crashes, undefined behavior (UB), or other easily detected anomalies. Dr. Rigger's fuzzers, on the other hand, are able to find cases where SQLite computes an incorrect answer. Rigger has found many such cases. Most of these finds are fairly obscure corner cases involving type conversions and affinity transformations, and a good number of the finds are against unreleased features. Nevertheless, his finds are still important as they are real bugs, and the SQLite developers are grateful to be able to identify and fix the underlying problems. Rigger's work is currently unpublished. When it is released, it could be as influential as Zalewski's invention of AFL and profile-guided fuzzing.

Work done with Zhendong Su.

Unique fixed bugs

SQLite3

    The SQLite3 developers were most responsive and very appreciative of our bug reports. They fixed the bugs we reported at an impressive speed, which is why we concentrated on testing this DBMS. For accessing the SQLite mailing list links, you need to be registered and logged in to the http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users.

  • #1 COLLATE nocase index on a WITHOUT ROWID table malfunctions

    Links: [email] [bugtracker] [fix]
    Date found: 28/5/2019
    Status: fixed
    Highlight: This bug was classified as "severe" and had existed since 2013.
    Test case:
    CREATE TABLE test (c1 TEXT PRIMARY KEY) WITHOUT ROWID;
    CREATE INDEX index_0 ON test(c1 COLLATE NOCASE);
    INSERT INTO test(c1) VALUES ('A');
    INSERT INTO test(c1) VALUES ('a');
    SELECT * FROM test; -- only one row is fetched
    
    Test case LOC: 5
    Oracle: contains
    Tags: COLLATE , INDEX , WITHOUT ROWID

  • #2 PRAGMA case_sensitive_like can corrupt some databases

    Links: [bugtracker] [fix] [email]
    Date found: 28/5/2019
    Status: fixed
    Highlight: The failing test case caused the SQLite developers to realize "a defect in the design of SQLite, not a defect in the implementation." Seven options to address this were outlined. Since it was not very clear how to best address this, the quirk was documented in the documentation and a compile time option to omit the relevant pragma was introduced.
    Test case:
    CREATE TABLE test (c0);
    CREATE INDEX index_0 ON test(c0 LIKE '');
    PRAGMA case_sensitive_like=false;
    VACUUM;
    SELECT * from test; -- Error: malformed database schema (index_0) - non-deterministic functions prohibited in index expressions
    
    Test case LOC: 5
    Oracle: error (select)
    Tags: INDEX , LIKE , LANGUAGE_DEFICIENCY

  • #3 Unique index that uses GLOB does not detect duplicate due to REAL conversion

    Links: [email] [fix]
    Date found: 30/5/2019
    Status: fixed
    Test case:
    CREATE TABLE test (c0, c1 REAL);
    CREATE UNIQUE INDEX index_1 ON test(c0 GLOB c1);
    INSERT INTO test(c0, c1) VALUES ('1', '1');
    INSERT INTO test(c0, c1) VALUES ('0', '1');
    REINDEX; -- Error: UNIQUE constraint failed
    
    Test case LOC: 5
    Oracle: error (reindex)
    Tags: INDEX , REINDEX_CONSTRAINT_FAILED , UNEXPECTED_TYPE

  • #4 Multi-row insert circumvents index check

    Links: [bugtracker] [fix] [email]
    Date found: 1/5/2019
    Status: fixed
    Test case:
    CREATE TABLE test (c0, c1 TEXT);
    CREATE UNIQUE INDEX IF NOT EXISTS index_0 ON test(c1 == FALSE);
    CREATE INDEX IF NOT EXISTS index_1 ON test(c0 || FALSE) WHERE c1;
    INSERT OR IGNORE INTO test(c0, c1) VALUES ('a', TRUE);
    INSERT OR IGNORE INTO test(c0, c1) VALUES ('a', FALSE);
    PRAGMA legacy_file_format=true;
    REINDEX; -- Error: UNIQUE constraint failed: index 'index_0'
    
    Test case LOC: 7
    Oracle: error (reindex)
    Tags: INDEX , REINDEX_CONSTRAINT_FAILED , UNEXPECTED_TYPE

  • #5 COLLATE NOCASE index on REAL column malfunctions

    Links: [email] [fix]
    Date found: 1/5/2019
    Status: fixed
    Test case:
    CREATE TABLE test (c0 REAL);
    CREATE INDEX index_0 ON test(c0 COLLATE NOCASE);
    INSERT INTO test(c0) VALUES ('+/');
    SELECT * FROM test WHERE (c0 LIKE '+/'); -- fetches no row
    
    Test case LOC: 4
    Oracle: contains
    Tags: COLLATE , LIKE OPTIMIZATION , INDEX , UNEXPECTED_TYPE

  • #6 UPSERT documentation issue

    Links: [email]
    Date found: 2/5/2019
    Status: fixed (in documentation)
    Highlight: Note that this was not a bug in the code. Rather, the documentation was not very clear on this is.
    Test case:
    CREATE TABLE test (c0 NOT NULL);
    INSERT INTO test(c0) VALUES (NULL) ON CONFLICT DO NOTHING; -- results in an error
    INSERT OR IGNORE INTO test(c0) VALUES (NULL); -- does not result in an error
    
    Test case LOC: 3
    Oracle: error
    Tags: UNCLEAR_TP

  • #7 TYPEOF index on REAL column malfunctions

    Links: [email] [fix]
    Date found: 2/5/2019
    Status: fixed
    Test case:
    CREATE TABLE test (c0 REAL);
    CREATE UNIQUE INDEX index_0 ON test(TYPEOF(c0));
    INSERT OR IGNORE INTO test(c0) VALUES (0.1);
    INSERT OR IGNORE INTO test(c0) VALUES (FALSE);
    REINDEX; -- UNIQUE constraint failed: index 'index_0'
    
    Test case LOC: 5
    Oracle: error (reindex)
    Tags: INDEX , REINDEX_CONSTRAINT_FAILED , UNEXPECTED_TYPE

  • #8 Index on REAL column malfunctions when multiplying with a string

    Links: [email] [fix]
    Date found: 2/5/2019
    Status: fixed
    Test case:
    CREATE TABLE test (c0 REAL);
    CREATE UNIQUE INDEX index_0 ON test(TRIM(('' * c0)));
    INSERT INTO test(c0) VALUES (0.0), (0.1);
    REINDEX; -- UNIQUE constraint failed: index 'index_0'
    
    Test case LOC: 4
    Oracle: error (reindex)
    Tags: INDEX , REINDEX_CONSTRAINT_FAILED , UNEXPECTED_TYPE

  • #9 Problem with REAL values and string functions used in indexes or on expressions

    Links: [email] [fix]
    Date found: 3/5/2019
    Status: fixed
    Highlight: As described in one of the commit messages for this fix, addressing this bug required a "big change" in the code.
    Test case:
    CREATE TABLE test (c0 REAL);
    CREATE UNIQUE INDEX index_0 ON test(LENGTH(-c0));
    INSERT INTO test(c0) VALUES (0.0), ('10:');
    REINDEX; -- UNIQUE constraint failed: index 'index_0'
    
    Test case LOC: 4
    Oracle: error (reindex)
    Tags: INDEX , REINDEX_CONSTRAINT_FAILED

  • #10 GLOB and minus in index and real column

    Links: [email] [fix]
    Date found: 3/5/2019
    Status: fixed
    Test case:
    CREATE TABLE test (c0 REAL);
    CREATE UNIQUE INDEX index_0 ON test(('0' GLOB -c0));
    INSERT INTO test(c0) VALUES (1.0), (0.0);
    REINDEX;
    
    Test case LOC: 4
    Oracle: error (reindex)
    Tags: INDEX , REINDEX_CONSTRAINT_FAILED

  • #11 Incorrect result on a table scan of a partial index

    Links: [bugtracker] [fix] [mail]
    Date found: 4/5/2019
    Status: fixed
    Highlight: This issue was classified as "severe", was since 2013 in SQLite, and was a bug in the theorem prover.
    Test case:
    CREATE TABLE t0(c0);
    CREATE INDEX index_0 ON t0(c0) WHERE (~c0) NOT NULL;
    INSERT INTO t0(c0) VALUES (NULL);
    SELECT * FROM t0 WHERE (LIKELY(~c0) OR TRUE); -- no row fetched
    
    Test case LOC: 4
    Oracle: contains
    Tags: INDEX

  • #12 ALTER TABLE fails when renaming an INTEGER PRIMARY KEY column in a WITHOUT ROWID table

    Links: [mail] [fix]
    Date found: 6/5/2019
    Status: fixed
    Test case:
    CREATE TABLE t0 (c0 INTEGER, PRIMARY KEY (c0)) WITHOUT ROWID;
    ALTER TABLE t0 RENAME COLUMN c0 TO c1; -- no such column: c0
    
    Test case LOC: 2
    Oracle: error (alter table)
    Tags: WITHOUT ROWID

  • #13 INSERT OR FAIL inserts row although it violates a table constraint

    Links: [mail] [fix1] [fix2]
    Date found: 7/5/2019
    Status: fixed
    Highlight: As described on the mailing list, this bug report exposed two bugs and required two different fixes.
    Test case:
    PRAGMA foreign_keys=true;
    CREATE TABLE t0 (c0 UNIQUE, c1 UNIQUE, FOREIGN KEY(c0) REFERENCES t0(c1));
    INSERT OR FAIL INTO t0(c0, c1) VALUES (0, 1);
    INSERT OR FAIL INTO t0(c0, c1) VALUES (0, 2);
    SELECT * FROM t0; -- returns no row
    
    Test case LOC: 5
    Oracle: contains


  • #14 Incorrect result for "<" and "<=" comparison of rowid and non-numeric text value

    Links: [mail] [bugtracker] [fix]
    Date found: 7/5/2019
    Status: fixed
    Highlight: The bug was classified as "severe" and existed in SQLite since 2013.
    Test case:
    CREATE TABLE t0(c0);
    CREATE TABLE t1(c0 INTEGER PRIMARY KEY);
    PRAGMA reverse_unordered_selects=true;
    INSERT INTO t1(c0) VALUES (0);
    INSERT INTO t0(c0) VALUES ('a');
    SELECT * FROM t1, t0 WHERE t1.c0 < t0.c0; -- no row is fetched
    
    Test case LOC: 6
    Oracle: contains
    Tags: WITHOUT ROWID

  • #15 './' LIKE './' does not match

    Links: [fix] [mail]
    Date found: 8/5/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT UNIQUE COLLATE NOCASE);
    INSERT INTO t0(c0) VALUES ('./');
    SELECT * FROM t0 WHERE t0.c0 LIKE './'; -- fetches no rows
    
    Test case LOC: 3
    Oracle: contains
    Tags: COLLATE , LIKE OPTIMIZATION , UNEXPECTED_TYPE

  • #16 Row is not fetched with PRAGMA reverse_unordered_selects=true

    Links: [mail] [fix]
    Date found: 9/5/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INTEGER PRIMARY KEY);
    INSERT INTO t0(c0) VALUES (1);
    PRAGMA reverse_unordered_selects=true;
    SELECT * FROM t0 WHERE ((t0.c0 > 'a') OR (t0.c0 <= 'a')); -- fetches no row
    SELECT ((t0.c0 > 'a') OR (t0.c0 <= 'a')) FROM t0; -- returns 1
    
    Test case LOC: 5
    Oracle: contains


  • #17 Malformed database image when using a REAL PRIMARY KEY

    Links: [mail] [bugtracker] [fix]
    Date found: 9/5/2019
    Status: fixed
    Highlight: This bug was classified as "severe" and existed in SQLite since 2015.
    Test case:
    CREATE TABLE t1 (c0, c1 REAL PRIMARY KEY);
    INSERT INTO t1(c0, c1) VALUES (TRUE, 9223372036854775807), (TRUE, 0);
    UPDATE t1 SET c0 = NULL;
    UPDATE OR REPLACE t1 SET c1 = 1;
    SELECT DISTINCT * FROM t1 WHERE (t1.c0 IS NULL); -- database disk image is malformed
    
    Test case LOC: 5
    Oracle: error (select)
    Tags: CORRUPTED_DB

  • #18 Incorrect handling of Infinity by the ROUND function

    Links: [mail] [fix]
    Date found: 10/5/2019
    Status: fixed
    Test case:
    SELECT 1e500 >= 1,  CAST(1e500 AS INT) >= CAST(1 AS INT), ROUND(1e500) >= ROUND(1); -- 1|1|0
    
    Test case LOC: 1
    Oracle: contains


  • #19 Partial NOT NULL index malfunctions with IS NOT/!=

    Links: [mail] [bugtracker] [fix]
    Date found: 11/5/2019
    Status: fixed
    Highlight: This bug was classified as "critical" and was in SQLite since 2013.
    Test case:
    CREATE TABLE IF NOT EXISTS t0 (c0);
    CREATE INDEX IF NOT EXISTS i0 ON t0(1) WHERE c0 NOT NULL;
    INSERT INTO t0(c0) VALUES(NULL);
    SELECT * FROM t0 WHERE t0.c0 IS NOT 1; -- returns no row
    
    Test case LOC: 4
    Oracle: contains
    Tags: INDEX

  • #20 REINDEX causes rows not to be fetched in a WITHOUT ROWIDs table and PRIMARY KEY DESC

    Links: [mail] [bugtracker] [fix]
    Date found: 13/5/2019
    Status: fixed
    Highlight: The bug highlights a conceptual issue in SQLite and cannot be fixed without breaking backward compatibility. The issue received its own name, namely the "WITHOUT ROWID DESC PRIMARY KEY UNIQUE constraint index anomaly". Nevertheless, as stated in the bug report, it is unlikely that real-world applications are affected.
    Test case:
    CREATE TABLE t0 (c0 PRIMARY KEY DESC, c1 UNIQUE DEFAULT NULL) WITHOUT ROWID;
    INSERT INTO t0(c0) VALUES (1), (2), (3), (4), (5);
    REINDEX;
    SELECT * FROM t0 WHERE t0.c0 IN (SELECT c0 FROM t0) AND t0.c1 ISNULL; -- fetches only one row instead of all five rows
    
    Test case LOC: 4
    Oracle: contains
    Tags: WITHOUT ROWID

  • #21 PRAGMA reverse_unordered_selects=true results in row not being fetched

    Links: [mail] [fix]
    Date found: 14/5/2019
    Status: fixed
    Highlight: This bug was introduced while fixing another bug that I had previously found.
    Test case:
    PRAGMA reverse_unordered_selects=true;
    CREATE TABLE t1 (c0, c1); CREATE TABLE t2 (c0 INT UNIQUE);
    INSERT INTO t1(c0, c1) VALUES (0, 0), (0, NULL);
    INSERT INTO t2(c0) VALUES (1);
    SELECT 1, NULL INTERSECT SELECT * FROM (SELECT t2.c0, t1.c1 FROM t1, t2 WHERE ((t2.rowid <= 'a')) OR (t1.c0 <= t2.c0) ORDER BY 'a' DESC LIMIT 100); -- no row is fetched
    
    Test case LOC: 5
    Oracle: contains


  • #22 REAL rounding seems to depend on FROM clause

    Links: [bugtracker] [fix]
    Date found: 16/5/2019
    Status: fixed
    Test case:
    CREATE TABLE t0 (c0);
    CREATE TABLE t1 (c1 REAL);
    INSERT INTO t1(c1) VALUES (8366271098608253588);
    INSERT INTO t0(c0) VALUES ('a');
    SELECT * FROM t1 WHERE (t1.c1 = CAST(8366271098608253588 AS REAL)); -- fetches row
    SELECT * FROM t0, t1 WHERE (t1.c1 = CAST(8366271098608253588 AS REAL)); -- fetches no row
    SELECT * FROM t0, t1 WHERE (t1.c1 >= CAST(8366271098608253588 AS REAL) AND t1.c1 <= CAST(8366271098608253588 AS REAL)); -- fetches row
    
    Test case LOC: 7
    Oracle: contains


  • #23 Malformed image when using no journal mode, zero cache size, and failing when creating an index

    Links: [bugtracker] [fix]
    Date found: 16/5/2019
    Status: fixed (in documentation)
    Highlight: Although this was not recognized as a bug, the bug report resulted in a documentation update and change in the default options for SQLite's defensive configuration.
    Test case:
    PRAGMA journal_mode=OFF;
    PRAGMA main.cache_size=0;
    CREATE TABLE IF NOT EXISTS t0 (c0);
    CREATE INDEX i0 ON t0(1);
    DROP INDEX "i0";
    INSERT OR IGNORE INTO t0(c0) VALUES (1), (2);
    CREATE UNIQUE INDEX i0 ON t0(1); -- UNIQUE constraint failed: index 'i0'
    CREATE UNIQUE INDEX i0 ON t0(1); -- database disk image is malformed
    
    Test case LOC: 8
    Oracle: error (reindex)
    Tags: INDEX , UNCLEAR_TP , CORRUPTED_DB

  • #24 Query results in a SEGFAULT

    Links: [bugtracker] [fix]
    Date found: 18/5/2019
    Status: fixed
    Test case:
    CREATE TABLE t0 (c0, c1, PRIMARY KEY (c0, c1));
    CREATE TABLE t1 (c0);
    INSERT INTO t1 VALUES (2);
    SELECT * FROM t0, t1 WHERE (t0.c1 >= 1 OR t0.c1 < 1) AND t0.c0 IN (1, t1.c0) ORDER BY 1; -- results in a segfault
    
    Test case LOC: 4
    Oracle: segfault


  • #25 Index on non-existing column results in a fabricated value being fetched

    Links: [bugtracker] [fix1] [fix2]
    Date found: 19/5/2019
    Status: fixed
    Highlight: This bug report resulted in a change of the accepted SQL dialect, disallowing strings in double quotes when creating indexes.
    Test case:
    CREATE TABLE t0(c1, c2);
    INSERT INTO t0(c1, c2) VALUES  ('a', 1);
    CREATE INDEX i0 ON t0("C3");
    ALTER TABLE t0 RENAME COLUMN c1 TO c3;
    SELECT DISTINCT * FROM t0; -- fetches C3|1 rather than a|1
    
    Test case LOC: 5
    Oracle: contains
    Tags: INDEX , LANGUAGE CHANGE , LANGUAGE_DEFICIENCY

  • #26 Nested boolean formula with IN operator computes an incorrect result

    Links: [bugtracker] [fix]
    Date found: 19/5/2019
    Status: fixed
    Highlight: This bug uncovered that the compiler somtimes confuses x IS TRUE with x IS FALSE, and the other way around.
    Test case:
    CREATE TABLE t0(c0);
    INSERT INTO t0(c0) VALUES ('val');
    SELECT * FROM t0 WHERE (((0 IS NOT FALSE) OR NOT (0 IS FALSE OR (t0.c0 IN (-1)))) IS 0); -- fetches no row
    
    Test case LOC: 3
    Oracle: contains


  • #27 "Malformed database schema" when creating a failing index within a transaction

    Links: [bugtracker] [fix]
    Date found: 21/5/2019
    Status: fixed
    Test case:
    CREATE TABLE IF NOT EXISTS t0(c0);
    INSERT INTO t0(c0) VALUES (-9223372036854775808);
    BEGIN TRANSACTION;
    CREATE INDEX i0 ON t0(ABS(c0)); -- integer overflow (expected)
    COMMIT; -- unexpected: the index is still created
    CREATE INDEX i0 ON t0(1); -- malformed database schema (i0) - index i0 already exists
    
    Test case LOC: 6
    Oracle: error (CREATE INDEX)
    Tags: INDEX , CORRUPTED_DB

  • #28 CAST('-' AS NUMERIC) computes 0.0

    Links: [bugtracker] [fix]
    Date found: 25/5/2019
    Status: fixed
    Test case:
    SELECT CAST('-' AS NUMERIC); -- unexpected: computes 0.0 rather than 0
    
    Test case LOC: 1
    Oracle: contains


  • #29 Incorrect result when subtracting a large integer number from a TEXT value

    Links: [bugtracker] [fix]
    Date found: 25/5/2019
    Status: fixed
    Test case:
    SELECT '' - 2851427734582196970; -- actual: -2851427734582196736, expected: -2851427734582196970
    
    Test case LOC: 1
    Oracle: contains


  • #30 CAST to NUMERIC no longer converts to INTEGER

    Links: [bugtracker] [fix]
    Date found: 08/06/2019
    Status: fixed
    Test case:
    CREATE TABLE t0 (c0 TEXT);
    INSERT INTO t0(c0) VALUES ('1.0');
    SELECT CAST(c0 AS NUMERIC) FROM t0; -- expected: 1, actual: 1.0
    
    Test case LOC: 3
    Oracle: contains


  • #31 TEXT value interpreted as column name in an index with empty list in an IN expression

    Links: [bugtracker] [fix]
    Date found: 10/06/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    CREATE INDEX i0 ON t0('1' IN ());
    ALTER TABLE t0 RENAME TO t1; -- error in index i0: no such column: 1
    
    Test case LOC: 3
    Oracle: error (ALTER TABLE)
    Tags: INDEX

  • #32 LIKE malfunctions for INT PRIMARY KEY COLLATE NOCASE column

    Links: [bugtracker] [fix]
    Date found: 10/06/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT PRIMARY KEY COLLATE NOCASE);
    INSERT INTO t0 VALUES (' 1-');
    SELECT * FROM t0 WHERE t0.c0 LIKE ' 1-'; -- expected: ' 1-', actual: no row is fetched
    
    Test case LOC: 3
    Oracle: contains
    Tags: COLLATE , LIKE OPTIMIZATION , UNEXPECTED_TYPE

  • #33 Illegal argument to LIKELIHOOD() does not result in error when combined with "IN ()"

    Links: [bugtracker] [fix]
    Date found: 10/06/2019
    Status: fixed
    Test case:
    CREATE TABLE t1 (c0);
    CREATE INDEX i0 ON t1((LIKELIHOOD(c0, 100) IN ())); -- unexpected: no error
    ALTER TABLE t1 RENAME COLUMN c0 TO c1; -- error occurs only here: second argument to likelihood() must be a constant between 0.0 and 1.0
    
    Test case LOC: 3
    Oracle: error (ALTER TABLE)
    Tags: INDEX

  • #34 CAST('.' AS NUMERIC) computes 0.0 rather than 0

    Links: [bugtracker] [fix]
    Date found: 10/06/2019
    Status: fixed
    Test case:
    SELECT -'.'; -- expected: 0, actual: 0.0
    
    Test case LOC: 1
    Oracle: contains


  • #35 COLLATE expression has an affinity

    Links: [bugtracker] [fix]
    Date found: 10/06/2019
    Status: fixed (in documentation)
    Test case:
    SELECT ((CAST(1 as INT)) COLLATE BINARY) == '1'; -- expected: 0, actual: 1
    
    Test case LOC: 1
    Oracle: contains
    Tags: COLLATE

  • #36 Another case of Illegal argument to LIKELIHOOD() does not result in error when combined with "IN ()"

    Links: [bugtracker] [fix]
    Date found: 10/06/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    CREATE INDEX i0 ON t0(((LIKELIHOOD(1, 2)) AND ((1 IN ())))); -- unexpected: no error
    ALTER TABLE t0 RENAME TO t1; -- -- error occurs only here: second argument to likelihood() must be a constant between 0.0 and 1.0
    
    Test case LOC: 3
    Oracle: error (ALTER TABLE)
    Tags: INDEX

  • #37 -'1.0' computes -1.0 rather than -1

    Links: [bugtracker] [fix]
    Date found: 11/06/2019
    Status: fixed (in documentation)
    Test case:
    SELECT -'1.0'; -- expected: -1, actual: -1.0
    
    Test case LOC: 1
    Oracle: contains


  • #38 COLLATE expression in the right side of an IN operator results in an affinity conversion

    Links: [bugtracker] [fix]
    Date found: 11/06/2019
    Status: fixed
    Test case:
    SELECT (1 IN (CAST('1' as TEXT) COLLATE NOCASE)); -- expected: 0, actual: 1
    
    Test case LOC: 1
    Oracle: contains
    Tags: COLLATE

  • #39 Lossless conversion when casting a large TEXT number to NUMERIC is not performed

    Links: [bugtracker] [fix]
    Date found: 11/06/2019
    Status: fixed (in documentation)
    Test case:
    SELECT CAST('8.2250617031974513E18' AS NUMERIC); -- expected: 8225061703197451300, unexpected: 8.22506170319745e+18
    
    Test case LOC: 1
    Oracle: contains
    Tags: UNCLEAR_TP

  • #40 LIKELY(), UNLIKELY() and LIKELIHOOD() have affinities

    Links: [bugtracker] [fix]
    Date found: 11/06/2019
    Status: fixed
    Test case:
    SELECT LIKELY(CAST(1 AS INT)) = '1'; -- expected: 0, actual: 1
    SELECT UNLIKELY(CAST(1 AS INT)) = '1'; -- expected: 0, actual: 1
    SELECT LIKELIHOOD(CAST(1 AS INT), 0.5) = '1'; -- expected: 0, actual: 1
    
    Test case LOC: 3
    Oracle: contains


  • #41 IS TRUE operator malfunctions with COLLATE and REAL value

    Links: [bugtracker] [fix]
    Date found: 12/06/2019
    Status: fixed
    Test case:
    SELECT 0.5 IS TRUE COLLATE NOCASE; -- expected: 1, actual: 0
    SELECT 0.5 IS TRUE COLLATE RTRIM; -- expected: 1, actual: 0
    SELECT 0.5 IS TRUE COLLATE BINARY; -- expected: 1, actual: 0
    
    Test case LOC: 3
    Oracle: contains
    Tags: COLLATE

  • #42 CAST('-0.0' AS NUMERIC) computes 0.0 rather than 0

    Links: [bugtracker] [fix]
    Date found: 12/06/2019
    Status: fixed
    Highlight: Opening this bug report also (indirectly) caused a discussion on the mailing list on how -0.0 should be printed by SQLite, with over 50 replies (see http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-users/2019-June/084857.html).
    Test case:
    SELECT CAST('-0.0' AS NUMERIC); -- expected: 0, unexpected: 0.0
    
    Test case LOC: 1
    Oracle: contains


  • #43 CAST takes implicit COLLATE of its operand

    Links: [bugtracker] [fix]
    Date found: 12/06/2019
    Status: fixed (in documentation)
    Test case:
    CREATE TABLE t0(c0 COLLATE NOCASE);
    INSERT INTO t0(c0) VALUES ('a');
    SELECT * FROM t0 WHERE CAST(t0.c0 AS TEXT) = 'A'; -- expected: no row is fetched, actual: a
    
    Test case LOC: 3
    Oracle: contains
    Tags: COLLATE

  • #44 LIKE malfunctions for UNIQUE COLLATE NOCASE column

    Links: [bugtracker] [fix]
    Date found: 14/06/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT UNIQUE COLLATE NOCASE);
    INSERT INTO t0(c0) VALUES ('.1%');
    SELECT * FROM t0 WHERE t0.c0 LIKE '.1%'; -- expected: '.1%', actual: no row is fetched
    
    Test case LOC: 3
    Oracle: contains
    Tags: COLLATE , LIKE OPTIMIZATION , UNEXPECTED_TYPE

  • #45 Built-in RTRIM collating sequence yields incorrect comparisons

    Links: [bugtracker] [fix]
    Date found: 14/06/2019
    Status: fixed
    Highlight: This problem has existing in the RTRIM collating sequence since it was first introduced in 2008.
    Test case:
    CREATE TABLE t0(c0 COLLATE RTRIM, c1 BLOB UNIQUE, PRIMARY KEY (c0, c1)) WITHOUT ROWID;
    INSERT INTO t0 VALUES (123, 3), (' ', 1), ('	', 2), ('', 4);
    SELECT * FROM t0 WHERE c1 = 1; -- expected: ' ', 1, actual: no row is fetched
    
    Test case LOC: 3
    Oracle: contains
    Tags: COLLATE , WITHOUT ROWID

  • #46 COLLATE in BETWEEN expression is ignored

    Links: [bugtracker] [fix]
    Date found: 16/06/2019
    Status: fixed
    Test case:
    CREATE TABLE t0 (c3 TEXT);
    INSERT INTO t0(c3) VALUES ('0');
    SELECT * FROM t0 WHERE (t0.c3 COLLATE NOCASE) BETWEEN 1 AND '5'; -- expected: no row is fetched, actual: row is fetched
    
    Test case LOC: 3
    Oracle: contains
    Tags: COLLATE

  • #47 Query with ORDER BY results in "database disk image is malformed" error

    Links: [bugtracker] [fix]
    Date found: 29/07/2019
    Status: fixed
    Test case:
    CREATE TABLE t0 (c0 REAL, c1);
    CREATE UNIQUE INDEX i0 ON t0(c1, 0 | c0);
    INSERT INTO t0(c0) VALUES (4750228396194493326), (0);
    UPDATE OR REPLACE t0 SET c0 = 'a', c1 = '';
    SELECT * FROM t0 ORDER BY t0.c1; -- unexpected: database disk image is malformed
    
    Test case LOC: 5
    Oracle: error (SELECT)
    Tags: CORRUPTED_DB

  • #48 ANALYZE causes DISTINCT to malfunction in CROSS JOIN

    Links: [bugtracker] [fix]
    Date found: 29/07/2019
    Status: fixed
    Test case:
    CREATE TABLE t0 (c0, c1, c2, PRIMARY KEY (c0, c1));
    CREATE TABLE t1 (c2);
    INSERT INTO t0(c2) VALUES (0), (1), (3), (4), (5), (6), (7), (8), (9), (10), (11);
    INSERT INTO t0(c1) VALUES ('a');
    INSERT INTO t1(c2) VALUES (0);
    ANALYZE;
    SELECT DISTINCT t0.c0, t1._rowid_, t0.c1 FROM t1 CROSS JOIN t0 ON TRUE ORDER BY t0.c0; -- expected: |1|, |1|a, actual: |1|
    
    Test case LOC: 7
    Oracle: contains


  • #49 Query with DISTINCT does not fetch all distinct rows

    Links: [bugtracker] [fix]
    Date found: 30/07/2019
    Status: fixed
    Test case:
    CREATE TABLE t1 (c1 , c2, c3, c4 , PRIMARY KEY (c4, c3));
    INSERT INTO t1(c3) VALUES (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (NULL), (1), (0);
    UPDATE t1 SET c2 = 0;
    INSERT INTO t1(c1) VALUES (0), (0), (NULL), (0), (0);
    ANALYZE t1;
    UPDATE t1 SET c3 = 1;
    SELECT DISTINCT * FROM t1 WHERE t1.c3 = 1; -- expected: |0|1|, 0||1|, ||1|, actual: |0|1|
    
    Test case LOC: 7
    Oracle: contains


  • #50 MIN() malfunctions for UNIQUE column

    Links: [bugtracker] [fix]
    Date found: 02/07/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 UNIQUE, c1);
    INSERT INTO t0(c0, c1) VALUES (NULL, 1);
    SELECT MIN(t0.c0), t0.c1 FROM t0; -- expected: NULL | 1, actual: NULL | NULL
    
    Test case LOC: 3
    Oracle: contains


  • #51 MIN() malfunctions for a query with ISNULL condition

    Links: [bugtracker] [fix]
    Date found: 03/08/2019
    Status: fixed
    Highlight: This bug was fixed 11 years after it was introduced.
    Test case:
    CREATE TABLE t0 (c0, c1);
    CREATE INDEX i0 ON t0(c1, c1 + 1 DESC);
    INSERT INTO t0(c0) VALUES (1);
    SELECT MIN(t0.c1), t0.c0 FROM t0 WHERE t0.c1 ISNULL; -- expected: NULL | 1, actual: NULL | NULL
    
    Test case LOC: 4
    Oracle: contains


  • #52 Unexpected affinity conversion in view

    Links: [bugtracker] [fix]
    Date found: 05/08/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0, c1 TEXT);
    CREATE VIEW v0(c0) AS SELECT SUM(t0.c1) FROM t0;
    INSERT INTO t0(c0, c1) VALUES ('a', 1);
    SELECT * FROM v0, t0 WHERE t0.c1 <= v0.c0; -- unexpected: row is not fetched
    
    Test case LOC: 4
    Oracle: contains


  • #53 Row is not fetched in SELECT from VIEW

    Links: [bugtracker] [fix1] [fix2] [fix3]
    Date found: 05/08/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 TEXT, c1);
    INSERT INTO t0(c0, c1) VALUES (-1, 0);
    CREATE VIEW v0(c0, c1) AS SELECT t0.c0, AVG(t0.c1) FROM t0;
    SELECT * FROM v0 WHERE v0.c1 < v0.c0; -- unexpected: row is not fetched
    
    Test case LOC: 4
    Oracle: contains


  • #54 Unexpected affinity conversion for view column in IN operator

    Links: [bugtracker] [fix]
    Date found: 06/08/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 TEXT);
    CREATE VIEW v0(c0) AS SELECT t0.c0 FROM t0;
    INSERT INTO t0(c0) VALUES ('0');
    SELECT 0 IN (c0) FROM v0; -- expected: 0, actual: 1
    
    Test case LOC: 4
    Oracle: contains


  • #55 Incorrect result for query that uses MIN() and a CAST on rowid

    Links: [bugtracker] [fix]
    Date found: 07/08/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 UNIQUE, c1);
    INSERT INTO t0(c1) VALUES (0);
    INSERT INTO t0(c0) VALUES (0);
    CREATE VIEW v0(c0, c1) AS SELECT t0.c1, t0.c0 FROM t0 WHERE CAST(t0.rowid AS INT) = 1;
    SELECT v0.c0, MIN(v0.c1) FROM v0; -- expected: 0|, actual: |
    
    Test case LOC: 5
    Oracle: contains


  • #56 Constant expression in partial index results in row not being fetched

    Links: [bugtracker] [fix]
    Date found: 10/08/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    INSERT INTO t0(c0) VALUES (0);
    CREATE INDEX i0 ON t0(NULL > c0) WHERE (NULL NOT NULL);
    SELECT * FROM t0 WHERE ((NULL IS FALSE) IS FALSE); -- expected: row is fetched: actual: row is not fetched
    
    Test case LOC: 4
    Oracle: contains


  • #57 Null pointer dereference caused by window functions in result-set of EXISTS(SELECT ...)

    Links: [bugtracker] [fix]
    Date found: 15/08/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    INSERT INTO t0(c0) VALUES (0);
    SELECT * FROM t0 WHERE EXISTS (SELECT MIN(c0)  OVER (), CUME_DIST() OVER () FROM t0) BETWEEN 1 AND 1;
    
    Test case LOC: 3
    Oracle: segfault


  • #58 LEFT JOIN fails to fetch row

    Links: [bugtracker] [fix]
    Date found: 17/08/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    CREATE VIEW v0(c0) AS SELECT TYPEOF(1) FROM t0;
    INSERT INTO t0(c0) VALUES (0), (1);
    SELECT * FROM t0 LEFT JOIN v0 ON t0.c0 WHERE NOT(v0.c0 = 'a'); -- unexpected: fetches no row
    
    Test case LOC: 4
    Oracle: contains


  • #59 WHERE clause erroneously influences value of fetched column from view

    Links: [bugtracker] [fix]
    Date found: 17/08/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    CREATE VIEW v0(c0) AS SELECT LOWER(CAST('1e500' AS TEXT)) FROM t0;
    INSERT INTO t0(c0) VALUES (NULL);
    SELECT v0.c0 FROM v0, t0 WHERE t0.rowid NOT IN (0, 0, v0.c0); -- expected: '1e500', actual: Inf
    
    Test case LOC: 4
    Oracle: contains


  • #60 INDEXED BY results in row not being fetched

    Links: [bugtracker] [fix]
    Date found: 20/08/2019
    Status: fixed
    Test case:
    CREATE TABLE t0 (c0, c1);
    CREATE INDEX i0 ON t0(CAST(c0 AS NUMERIC));
    INSERT INTO t0(c0, c1) VALUES ('a', -1);
    SELECT * FROM t0 INDEXED BY i0 WHERE CAST(t0.c0 AS NUMERIC) > LOWER(t0.c1) GROUP BY t0.rowid; -- expected: row is fetched, actual: no row is fetched
    
    Test case LOC: 4
    Oracle: contains


  • #61 DISTINCT malfunctions for IS NULL

    Links: [bugtracker] [fix]
    Date found: 21/08/2019
    Status: fixed
    Test case:
    CREATE TABLE t0 (c0, c1 NOT NULL DEFAULT 1, c2, PRIMARY KEY (c0, c1));
    INSERT INTO t0(c2) VALUES (NULL), (NULL), (NULL), (NULL), (NULL), (NULL), (NULL), (NULL), (NULL), (NULL), (NULL);
    INSERT INTO t0(c2) VALUES ('a');
    ANALYZE t0;
    SELECT DISTINCT * FROM t0 WHERE NULL IS t0.c0; -- unexpected: |1|a is not part of the result set
    
    Test case LOC: 5
    Oracle: contains


  • #62 Row is not fetched in table with INTEGER PRIMARY KEY

    Links: [bugtracker] [fix]
    Date found: 22/08/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INTEGER PRIMARY KEY, c1 TEXT);
    INSERT INTO t0(c0, c1) VALUES (1, 'a');
    SELECT * FROM t0 WHERE '-1' BETWEEN 0 AND t0.c0; -- expected: 1|a, actual: no row is fetched
    
    Test case LOC: 3
    Oracle: contains


  • #63 Row with comparison on TEXT UNIQUE column is not fetched

    Links: [bugtracker] [fix]
    Date found: 22/08/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 TEXT UNIQUE, c1);
    INSERT INTO t0(c0) VALUES (-1);
    SELECT * FROM t0 WHERE - x'ce' >= t0.c0; -- unexpected: row is not fetched
    
    Test case LOC: 3
    Oracle: contains


  • #64 LIKELY() seems to cause unexpected affinity conversion for rowid

    Links: [bugtracker] [fix]
    Date found: 22/08/2019
    Status: fixed
    Test case:
    CREATE TABLE t0 (c0);
    INSERT INTO t0(c0) VALUES ('a');
    SELECT * FROM t0 WHERE LIKELY(t0.rowid) <= '0'; -- unexpected: row is not fetched
    
    Test case LOC: 3
    Oracle: contains


  • #65 Unexpected affinity conversion is performed for the IN operator

    Links: [bugtracker] [fix]
    Date found: 27/08/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT UNIQUE);
    INSERT INTO t0(c0) VALUES (1);
    SELECT * FROM t0 WHERE '1' IN (t0.c0); -- unexpected: fetches row
    
    Test case LOC: 3
    Oracle: metamorphic


  • #66 Partial index causes row to not be fetched

    Links: [bugtracker] [fix]
    Date found: 30/08/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    INSERT INTO t0(c0) VALUES (NULL);
    CREATE INDEX i0 ON t0(1) WHERE c0 NOT NULL;
    SELECT * FROM t0 WHERE (t0.c0 IS FALSE) IS FALSE; -- unexpected: row is not fetched
    
    Test case LOC: 4
    Oracle: metamorphic


  • #67 Partial index causes row to not be fetched in BETWEEN expression

    Links: [bugtracker] [fix]
    Date found: 30/08/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c1);
    CREATE INDEX i0 ON t0(1) WHERE c1 NOTNULL;
    INSERT INTO t0(c1) VALUES (NULL);
    SELECT * FROM t0 WHERE t0.c1 IS FALSE BETWEEN FALSE AND TRUE; -- unexpected: row is not fetched
    
    Test case LOC: 4
    Oracle: metamorphic


  • #68 Partial index and BETWEEN issue

    Links: [bugtracker] [fix]
    Date found: 30/08/2019
    Status: fixed
    Test case:
    CREATE TABLE t0 (c0);
    CREATE INDEX i0 ON t0(1) WHERE c0 NOT NULL;
    INSERT INTO t0(c0) VALUES (NULL);
    SELECT * FROM t0 WHERE '' BETWEEN t0.c0 AND 1 IN (FALSE); -- unexpected: row is not fetched
    
    Test case LOC: 4
    Oracle: metamorphic


  • #69 REINDEX causes "UNIQUE constraint failed" error

    Links: [bugtracker] [fix]
    Date found: 30/08/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 REAL UNIQUE, c1);
    CREATE UNIQUE INDEX i0 ON t0(0 || c1);
    INSERT INTO t0(c0, c1) VALUES (1, 2),  (2, 1);
    INSERT INTO t0(c0) VALUES (1) ON CONFLICT(c0) DO UPDATE SET c1=excluded.c0;
    REINDEX; -- unexpected: UNIQUE constraint failed: index 'i0'
    
    Test case LOC: 5
    Oracle: error


  • #70 Expression computed on row yields incorrect result

    Links: [bugtracker] [fix]
    Date found: 02/09/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 REAL, c1 TEXT);
    CREATE INDEX i0 ON t0(+c0, c0);
    INSERT INTO t0(c0) VALUES(0);
    SELECT CAST(+ t0.c0 AS BLOB) LIKE 0 FROM t0; -- expected: 0, actual: 1
    
    Test case LOC: 4
    Oracle: metamorphic


  • #71 Different rounding when converting TEXT to REAL

    Links: [bugtracker] [fix]
    Date found: 02/09/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 REAL UNIQUE);
    INSERT INTO t0(c0) VALUES(2.07093491255203046E18);
    SELECT * FROM t0 WHERE c0 IN ('2070934912552030444'); -- unexpected: row is fetched
    
    Test case LOC: 3
    Oracle: metamorphic


  • #72 IS NULL unexpectedly evaluates to TRUE

    Links: [bugtracker] [fix]
    Date found: 03/09/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 TEXT, c1 REAL, c2, PRIMARY KEY(c2, c0, c1));
    CREATE INDEX i0 ON t0(c1 IN (c0));
    INSERT INTO t0(c0, c2) VALUES (0, NULL) ON CONFLICT(c2, c1, c0) DO NOTHING;
    UPDATE t0 SET c2 = x'';
    SELECT * FROM t0 WHERE t0.c2 IS NULL; -- unexpected: row is fetched
    
    Test case LOC: 5
    Oracle: metamorphic


  • #73 COLLATE NOCASE string comparison yields incorrect result

    Links: [bugtracker] [fix]
    Date found: 03/09/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 COLLATE NOCASE, c1);
    CREATE INDEX i0 ON t0(0) WHERE c0 >= c1;
    REPLACE INTO t0 VALUES('a', 'B');
    SELECT * FROM t0 WHERE t0.c1 <= t0.c0; -- unexpected: row is not fetched
    
    Test case LOC: 4
    Oracle: metamorphic


  • #74 BETWEEN issue in view

    Links: [bugtracker] [fix]
    Date found: 09/09/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    INSERT INTO t0(c0) VALUES('');
    CREATE VIEW v2(c0, c1) AS SELECT 'B' COLLATE NOCASE, 'a' FROM t0 ORDER BY t0.c0;
    SELECT SUM(count) FROM (SELECT v2.c1 BETWEEN v2.c0 AND v2.c1 as count FROM v2); -- expected: 0, actual: 1
    
    Test case LOC: 4
    Oracle: metamorphic


  • #75 COLLATE issue in view

    Links: [bugtracker] [fix]
    Date found: 11/09/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 COLLATE NOCASE);
    INSERT INTO t0(c0) VALUES ('B');
    CREATE VIEW v0(c0, c1) AS SELECT DISTINCT t0.c0, 'a' FROM t0;
    SELECT v0.c1 >= v0.c0 FROM v0; -- actual: 1, expected: 0
    
    Test case LOC: 4
    Oracle: metamorphic


  • #76 GLOB unexpectedly does not match

    Links: [bugtracker] [fix]
    Date found: 16/09/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 UNIQUE);
    INSERT INTO t0 VALUES (-1);
    SELECT * FROM t0 WHERE t0.c0 GLOB '-*'; -- unexpected: row is not fetched
    
    Test case LOC: 3
    Oracle: metamorphic


  • #77 Row is not fetched when using WHERE clause with INSTR()

    Links: [bugtracker] [fix]
    Date found: 17/09/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 PRIMARY KEY, c1);
    INSERT INTO t0(c0) VALUES (x'bb'), (0);
    SELECT COUNT(*) FROM t0 WHERE INSTR(x'aabb', t0.c0) ORDER BY t0.c0, t0.c1; -- 1
    SELECT * FROM t0 WHERE INSTR(x'aabb', t0.c0) ORDER BY t0.c0, t0.c1; -- no row is fetched
    
    Test case LOC: 4
    Oracle: metamorphic


  • #78 Comparison on view malfunctions

    Links: [bugtracker] [fix]
    Date found: 07/10/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    INSERT INTO t0(c0) VALUES (0);
    CREATE VIEW v0(c0) AS SELECT t0.rowid FROM t0 ORDER BY 1;
    SELECT COUNT(*) FROM v0 WHERE ABS('1') = v0.c0; -- expected: 1, actual: 0
    
    Test case LOC: 4
    Oracle: metamorphic


  • #79 FTS integrity-check malfunctions

    Links: [bugtracker] [fix]
    Date found: 07/10/2019
    Status: fixed
    Highlight: After we reported this bug, a test case for the same bug was found using a fuzzer and reported on the SQLite mailing list
    Test case:
    CREATE TABLE t0(c0);
    CREATE VIRTUAL TABLE vt0 USING fts5(c0);
    BEGIN TRANSACTION;
    INSERT INTO vt0(c0) VALUES (NULL);
    ALTER TABLE t0 ADD COLUMN c5 REAL;
    INSERT INTO vt0(vt0) VALUES('integrity-check'); -- unexpected: database disk image is malformed
    
    Test case LOC: 6
    Oracle: error
    Tags: FTS

  • #80 FTS pgsz option results in "database disk image is malformed" error

    Links: [bugtracker] [fix]
    Date found: 07/10/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE vt0 USING fts5(a);
    PRAGMA reverse_unordered_selects = true;
    INSERT INTO vt0 VALUES('365062398'), (0), (0);
    INSERT INTO vt1(vt1, rank) VALUES('pgsz', '38');
    UPDATE vt0 SET a = 399905135; -- unexpected: database disk image is malformed
    INSERT INTO vt1(vt1) VALUES('integrity-check');
    
    Test case LOC: 6
    Oracle: error
    Tags: FTS

  • #81 FTS rebuild in transaction causes integrity-check to fail

    Links: [bugtracker] [fix]
    Date found: 07/10/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE vt0 USING fts5(c0);
    INSERT INTO vt0(c0) VALUES (NULL);
    BEGIN TRANSACTION;
    INSERT INTO vt0(vt0) VALUES('rebuild');
    INSERT INTO vt0(vt0) VALUES('rebuild');
    INSERT INTO vt0(vt0) VALUES('integrity-check'); -- database disk image is malformed
    
    Test case LOC: 6
    Oracle: error
    Tags: FTS

  • #82 FTS integrity-check indicates that the database disk image is malformed

    Links: [bugtracker] [fix]
    Date found: 09/10/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE vt0 USING fts5(c0, c1);
    INSERT INTO vt0(vt0, rank) VALUES('pgsz', '70000');
    INSERT INTO vt0(c0) VALUES (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0);
    UPDATE vt0 SET c1 = 'T,D&p^y/7#3*v<b<4j7|f';
    INSERT INTO vt0(vt0) VALUES('integrity-check'); -- database disk image is malformed
    
    Test case LOC: 5
    Oracle: error
    Tags: FTS

  • #83 FTS rebuild in combination with crisismerge results in error "database or disk is full"

    Links: [bugtracker] [fix]
    Date found: 09/10/2019
    Status: fixed
    Test case:
    PRAGMA reverse_unordered_selects = true;
    CREATE VIRTUAL TABLE vt0 USING fts5(c0);
    INSERT INTO vt0(vt0, rank) VALUES('crisismerge', 2000);
    INSERT INTO vt0(vt0, rank) VALUES('automerge', 0);
    INSERT INTO vt0(c0) VALUES (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0),(0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0), (0);
    INSERT INTO vt0(vt0) VALUES('rebuild'); -- database or disk is full
    
    Test case LOC: 6
    Oracle: error
    Tags: FTS

  • #84 LEFT JOIN in view malfunctions

    Links: [bugtracker] [fix]
    Date found: 09/10/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c1);
    CREATE TABLE t1(c0);
    CREATE VIEW v0 AS SELECT c1 FROM t1 LEFT JOIN t0;
    INSERT INTO t1 VALUES (1);
    SELECT * FROM v0 WHERE NOT(v0.c1 IS FALSE); -- expected: row is fetched, actual: no row is fetched
    
    Test case LOC: 5
    Oracle: metamorphic


  • #85 LEFT JOIN in view malfunctions with NOTNULL

    Links: [bugtracker] [fix]
    Date found: 10/10/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    CREATE TABLE t1(c1);
    INSERT INTO t0(c0) VALUES(0);
    CREATE VIEW v0(c0) AS SELECT t1.c1 FROM t0 LEFT JOIN t1;
    SELECT * FROM v0 WHERE v0.c0 NOTNULL NOTNULL; -- expected: row is fetched, actual: no row is fetched
    
    Test case LOC: 5
    Oracle: metamorphic


  • #86 FTS order=DESC results into integrity-check failing

    Links: [bugtracker] [fix]
    Date found: 11/10/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE vt0 USING fts4(c0, order=DESC);
    INSERT INTO vt0(c0) VALUES (0), (0);
    INSERT INTO vt0(vt0) VALUES('integrity-check'); database disk image is malformed
    
    Test case LOC: 3
    Oracle: error
    Tags: FTS

  • #87 FTS integrity-check malfunctions for transaction and the prefix option

    Links: [bugtracker] [fix]
    Date found: 11/10/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE vt0 USING fts4(c0, prefix=1);
    BEGIN;
    INSERT INTO vt0 VALUES (0);
    INSERT INTO vt0(vt0) VALUES('optimize');
    INSERT INTO vt0(vt0) VALUES('integrity-check'); -- database disk image is malformed
    
    Test case LOC: 5
    Oracle: error
    Tags: FTS

  • #88 FTS integrity_check fails when inserting x'00'

    Links: [bugtracker] [fix]
    Date found: 11/10/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE vt0 USING fts4(c0);
    INSERT INTO vt0 VALUES (x'00');
    INSERT INTO vt0(vt0) VALUES('integrity-check'); -- database disk image is malformed
    
    Test case LOC: 3
    Oracle: error
    Tags: FTS

  • #89 Trigger inserts duplicate value in UNIQUE column

    Links: [bugtracker] [fix]
    Date found: 16/10/2019
    Status: fixed
    Test case:
    PRAGMA recursive_triggers = true;
    CREATE TABLE t0(c0 UNIQUE);
    CREATE TRIGGER tr0 AFTER DELETE ON t0 BEGIN INSERT INTO t0 VALUES(0); END;
    INSERT OR REPLACE INTO t0(c0) VALUES(0), (0);
    REINDEX; -- UNIQUE constraint failed: t0.c0
    
    Test case LOC: 5
    Oracle: error


  • #90 FTS merge does not terminate

    Links: [bugtracker] [fix]
    Date found: 17/10/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE vt0 USING fts4(c0, order=DESC);
    INSERT INTO vt0(c0) VALUES (0);
    INSERT INTO vt0(c0) VALUES (0);
    UPDATE vt0 SET c0 = NULL;
    INSERT INTO vt0(vt0) VALUES('merge=1,4'); -- unexpected: does not terminate
    
    Test case LOC: 5
    Oracle: hang
    Tags: FTS

  • #91 Comparison of row values results in incorrect result

    Links: [bugtracker] [fix]
    Date found: 22/10/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 COLLATE NOCASE, c1);
    INSERT INTO t0 VALUES('a', 'A');
    SELECT * FROM t0 WHERE (+ t0.c1, 1) >= (t0.c0, 1); -- expected: row is not fetched, actual: row is fetched
    
    Test case LOC: 3
    Oracle: metamorphic


  • #92 Comparison of row values results in incorrect result (incomplete fix)

    Links: [bugtracker] [fix]
    Date found: 22/10/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 COLLATE NOCASE, c1);
    INSERT INTO t0 VALUES('a', 'A');
    SELECT * FROM t0 WHERE (+ t0.c1, 1) >= (t0.c0, 1); -- expected: row is not fetched, actual: row is fetched
    
    Test case LOC: 3
    Oracle: metamorphic


  • #93 Row value comparison yields incorrect result

    Links: [bugtracker] [fix]
    Date found: 22/10/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 TEXT PRIMARY KEY);
    INSERT INTO t0(c0) VALUES ('');
    SELECT * FROM t0 WHERE (t0.c0, TRUE) > (CAST('' AS REAL), FALSE); -- unexpected: row is not fetched
    
    Test case LOC: 3
    Oracle: metamorphic


  • #94 Comparison of row values with COLLATE NOCASE yields incorrect result

    Links: [bugtracker] [fix]
    Date found: 23/10/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 UNIQUE);
    INSERT INTO t0(c0) VALUES('a');
    SELECT * FROM t0 WHERE (t0.c0, 0) < ('B' COLLATE NOCASE, 0); -- unexpected: row is not fetched
    
    Test case LOC: 3
    Oracle: metamorphic


  • #95 Crash on REPLACE INTO of a table with an AFTER DELETE trigger

    Links: [bugtracker] [fix]
    Date found: 24/10/2019
    Status: fixed
    Test case:
    PRAGMA recursive_triggers = true;
    CREATE TABLE t0(c0, c1, c2 UNIQUE);
    CREATE UNIQUE INDEX i0 ON t0(c1) WHERE c0;
    CREATE TRIGGER tr0 AFTER DELETE ON t0 BEGIN DELETE FROM t0; END;
    INSERT INTO t0(c2) VALUES(-1572226132);
    INSERT INTO t0(c0) VALUES(1), (1);
    REPLACE INTO t0(c0, c1, c2) VALUES(2, 0, 0xffffffffa249bbac) -- unexpected: SEGFAULT
    
    Test case LOC: 7
    Oracle: crash


  • #96 FTS integrity-check malfunctions nondeterministically with tokenize="ascii"

    Links: [bugtracker] [fix]
    Date found: 24/10/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE vt0 USING fts5(c0, tokenize = "ascii", prefix = 1);
    INSERT INTO vt0(c0) VALUES (x'd1');
    INSERT INTO vt0(vt0) VALUES('integrity-check'); -- unexpected error: database disk image is malformed
    
    Test case LOC: 3
    Oracle: error
    Tags: FTS

  • #97 Trigger causes query to compute incorrect result

    Links: [bugtracker] [fix]
    Date found: 25/10/2019
    Status: fixed
    Test case:
    PRAGMA temp.recursive_triggers = true;
    CREATE TABLE t0(c0, c1 UNIQUE);
    CREATE TRIGGER c DELETE ON t0
    	BEGIN INSERT INTO t0(c1) VALUES(1);
    END;
    INSERT INTO t0(c1) VALUES(0);
    REPLACE INTO t0(c1) VALUES (0);
    SELECT t0.c1 BETWEEN 0 AND (CASE WHEN 1 THEN 1 ELSE t0.c0 END NOT NULL) FROM t0; -- expected: 1 and 1, actual: 1
    
    Test case LOC: 8
    Oracle: metamorphic


  • #98 REINDEX causes "UNIQUE constraint failed" error for generated column

    Links: [bugtracker] [fix]
    Date found: 26/10/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0, c1 TEXT GENERATED ALWAYS AS (1) UNIQUE);
    INSERT INTO t0(c0) VALUES (1);
    REINDEX;
    INSERT INTO t0(c0) VALUES (0);
    REINDEX; -- unexpected: UNIQUE constraint failed
    
    Test case LOC: 5
    Oracle: error
    Tags: GENERATED_COLUMN

  • #99 Segfault in table with generated columns

    Links: [bugtracker] [fix]
    Date found: 27/10/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INTEGER PRIMARY KEY GENERATED ALWAYS AS(1), c1 UNIQUE GENERATED ALWAYS AS(1), c2 UNIQUE);
    INSERT INTO t0 VALUES(NULL); -- Segmentation fault
    
    Test case LOC: 2
    Oracle: crash
    Tags: GENERATED_COLUMN

  • #100 Segfault when updating table with generated columns

    Links: [bugtracker] [fix]
    Date found: 29/10/2019
    Status: fixed
    Test case:
    PRAGMA temp_store = MEMORY;
    CREATE TEMP TABLE t0(c0, c1 AS(1) CHECK(NULL) UNIQUE NOT NULL, c2 CHECK(1.0) PRIMARY KEY) WITHOUT ROWID;
    CREATE UNIQUE INDEX e ON t0(CAST(0.0 AS INT)) WHERE 0;
    REINDEX;
    INSERT INTO t0(c2) VALUES (0), (1);
    REPLACE INTO t0(c2, c0) VALUES (0, 0), (x'9b', NULL);
    UPDATE t0 SET c2 = 0 -- Segmentation fault
    
    Test case LOC: 7
    Oracle: crash
    Tags: GENERATED_COLUMN

  • #101 VACUUM issue on table with generated column

    Links: [bugtracker] [fix]
    Date found: 29/10/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 AS(1));
    CREATE INDEX i0 ON t0(0 DESC);
    PRAGMA legacy_file_format = true;
    VACUUM; -- table vacuum_db.t0 has 0 columns but 1 values were supplied
    
    Test case LOC: 4
    Oracle: error
    Tags: GENERATED_COLUMN

  • #102 VACUUM on table with generated column results in an error

    Links: [bugtracker] [fix]
    Date found: 29/10/2019
    Status: fixed
    Highlight: This bug report made the SQLite developers remove the PRAGMA legacy_file_format option.
    Test case:
    CREATE TABLE t0(c0 AS(1), c1);
    PRAGMA legacy_file_format = true;
    CREATE INDEX i0 ON t0(0 DESC);
    VACUUM; -- table vacuum_db.t0 has 1 columns but 2 values were supplied
    
    Test case LOC: 4
    Oracle: error
    Tags: GENERATED_COLUMN

  • #103 VACUUM on table with generated column that uses TYPEOF results in an error

    Links: [bugtracker] [fix]
    Date found: 31/10/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 AS(TYPEOF(c1)), c1);
    INSERT INTO t0(c1) VALUES(0);
    VACUUM; -- table vacuum_db.t0 has 1 columns but 2 values were supplied
    
    Test case LOC: 3
    Oracle: error
    Tags: GENERATED_COLUMN

  • #104 Segfault in table with generated column and foreign key

    Links: [bugtracker] [fix]
    Date found: 31/10/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0, c1, c2 AS(1), PRIMARY KEY(c0) FOREIGN KEY(c2) REFERENCES t0);
    CREATE VIRTUAL TABLE vt0 USING fts4;
    CREATE INDEX i0 ON t0(c2, 0 BETWEEN '' AND c1 COLLATE BINARY, CASE '' WHEN c3 THEN 0 WHEN 0 THEN 0 WHEN '' THEN 0 WHEN 0 THEN c0 ELSE c1 END);
    INSERT INTO t0 VALUES (0, 0), ('', 0);
    PRAGMA foreign_keys = true;
    ANALYZE;
    UPDATE t0 SET c1 = c0; -- unexpected: Segmentation fault
    
    Test case LOC: 7
    Oracle: crash
    Tags: GENERATED_COLUMN

  • #105 REPLACE causes segfault in table with generated column and foreign key

    Links: [bugtracker] [fix]
    Date found: 1/11/2019
    Status: fixed
    Test case:
    CREATE TABLE t0 (c0, c1 a UNIQUE AS (1), c2, c3, FOREIGN KEY(c3) REFERENCES t0(c1));
    CREATE VIRTUAL TABLE vt0 USING fts4(c0);
    PRAGMA foreign_keys = true;
    INSERT INTO vt0 VALUES (0);
    REPLACE INTO t0(c3, c2, c0) VALUES (0, 0, 0), (0, 0, 0); -- Segmentation fault
    
    Test case LOC: 5
    Oracle: crash
    Tags: GENERATED_COLUMN

  • #106 Incorrect result for GLOB operator

    Links: [bugtracker] [fix]
    Date found: 2/11/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    CREATE INDEX i0 ON t0(0) WHERE c0 GLOB c0;
    INSERT INTO t0 VALUES (0);
    CREATE UNIQUE INDEX i1 ON t0(0);
    CREATE UNIQUE INDEX i2 ON t0(0);
    REPLACE INTO t0 VALUES(0);
    SELECT COUNT(*) FROM t0 WHERE t0.c0 GLOB t0.c0; -- expected: 1, actual: 2
    
    Test case LOC: 7
    Oracle: metamorphic


  • #107 LEFT JOIN in view malfunctions with partial index on table

    Links: [bugtracker] [fix]
    Date found: 3/11/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    CREATE TABLE t1(c0);
    INSERT INTO t1(c0) VALUES (0);
    CREATE INDEX i0 ON t0(0) WHERE NULL IN (c0);
    CREATE VIEW v0(c0) AS SELECT t0.c0 FROM t1 LEFT JOIN t0;
    SELECT COUNT(*) FROM v0 WHERE NULL IN (v0.c0); -- expected: 0, actual: 1
    
    Test case LOC: 6
    Oracle: metamorphic


  • #108 PRAGMA integrity_check fails due to CHECK constraint even without records

    Links: [bugtracker] [fix]
    Date found: 3/11/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 CHECK(ABS(-9223372036854775808)));
    PRAGMA integrity_check; -- unexpected: integer overflow
    
    Test case LOC: 2
    Oracle: error


  • #109 Row value comparison malfunctions on view with left join

    Links: [bugtracker] [fix]
    Date found: 4/11/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    CREATE TABLE t1(c0);
    CREATE VIEW v0(c0) AS SELECT t0.c0 FROM t1 LEFT JOIN t0;
    INSERT INTO t1(c0) VALUES (0);
    SELECT * FROM v0 WHERE (v0.c0, x'') != (NULL, 0); -- unexpected: row is not fetched
    
    Test case LOC: 5
    Oracle: metamorphic


  • #110 REPLACE on table with generated NOT NULL column results in segfault

    Links: [bugtracker] [fix]
    Date found: 6/11/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 NOT NULL AS(c1), c1);
    REPLACE INTO t0(c1) VALUES(NULL); -- Segmentation fault
    
    Test case LOC: 2
    Oracle: crash
    Tags: GENERATED_COLUMN

  • #111 NULL WHERE condition unexpectedly results in row being fetched

    Links: [bugtracker] [fix]
    Date found: 6/11/2019
    Status: fixed
    Test case:
    CREATE TABLE t0 (c0 GENERATED ALWAYS AS (1), c1 UNIQUE, c2 UNIQUE);
    INSERT INTO t0(c1) VALUES (1);
    SELECT * FROM t0 WHERE 0 = t0.c2 OR t0.c1 BETWEEN t0.c2 AND 1; -- unexpected: row is fetched
    
    Test case LOC: 3
    Oracle: metamorphic
    Tags: GENERATED_COLUMN

  • #112 Segfault when inserting into table with generated columns

    Links: [bugtracker] [fix]
    Date found: 6/11/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 AS ((c4, 9, c4) < ('a', c1, 1)), c1 AS (1) NOT NULL, c2, c3 CHECK  ((x'56', 0) = (c1, 0)), c4 NOT NULL);
    PRAGMA integrity_check;
    INSERT INTO t0 VALUES (0, 0, 0), (0, 0, 0); -- unexpected: Segmentation fault
    
    Test case LOC: 3
    Oracle: crash
    Tags: GENERATED_COLUMN

  • #113 UPDATE on table with two generated columns and CHECK clause results in segfault

    Links: [bugtracker] [fix]
    Date found: 7/11/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0, c1 AS(c0 + c2), c2 AS(c1) CHECK(c2));
    UPDATE t0 SET c0 = NULL; -- Segmentation fault
    
    Test case LOC: 2
    Oracle: crash
    Tags: GENERATED_COLUMN

  • #114 VACUUM results in "database disk image is malformed" for PRIMARY KEY with duplicate column

    Links: [bugtracker] [fix]
    Date found: 7/11/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0, c1 UNIQUE COLLATE NOCASE, PRIMARY KEY(c1, c1)) WITHOUT ROWID;
    INSERT INTO t0(c1) VALUES(0);
    VACUUM; -- unexpected: database disk image is malformed
    
    Test case LOC: 3
    Oracle: error


  • #115 DISTINCT malfunctions for VIEW with virtual table

    Links: [bugtracker] [fix]
    Date found: 7/11/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    CREATE VIRTUAL TABLE vt0 USING fts5(c0);
    INSERT INTO t0(c0) VALUES (1), (0);
    INSERT INTO vt0(c0) VALUES (0), (0);
    CREATE VIEW v0 AS SELECT DISTINCT t0.c0 FROM vt0, t0 ORDER BY vt0.rowid;
    SELECT * FROM v0; -- unexpected: 4 rows are fetched
    
    Test case LOC: 6
    Oracle: metamorphic
    Tags: FTS

  • #116 LEFT JOIN malfunctions with partial ISNULL index

    Links: [bugreport] [fix]
    Date found: 30/11/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    CREATE TABLE t1(c0);
    CREATE INDEX i0 ON t0(1) WHERE c0 ISNULL;
    INSERT INTO t0(c0) VALUES (1);
    INSERT INTO t1(c0) VALUES (1);
    SELECT * FROM t1 LEFT JOIN t0 WHERE t0.c0 ISNULL; -- unexpected: row is fetched
    
    Test case LOC: 6
    Oracle: metamorphic


  • #117 Incorrect result for TEXT comparison on rtree table

    Links: [bugreport] [fix]
    Date found: 04/12/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE rt0 USING rtree(c0, c1, c2);
    INSERT INTO rt0(c2) VALUES(NULL);
    SELECT * FROM rt0 WHERE rt0.c2 >= 'a'; -- unexpected: fetches row
    
    Test case LOC: 3
    Oracle: metamorphic
    Tags: RTREE

  • #118 column = NULL predicate evaluates to TRUE for rtree table

    Links: [bugreport] [fix]
    Date found: 05/12/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE rt0 USING rtree(c0, c1, c2);
    INSERT INTO rt0(c0) VALUES(0);
    SELECT * FROM rt0 WHERE rt0.c0 = NULL; -- unexpected: row is fetched
    
    Test case LOC: 3
    Oracle: metamorphic
    Tags: RTREE

  • #119 Join on two rtree tables malfunctions

    Links: [bugreport] [fix]
    Date found: 05/12/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE rt0 USING rtree(c0, a, b);
    CREATE VIRTUAL TABLE rt1 USING rtree(c0, a, b);
    INSERT INTO rt1(c0) VALUES (x'00');
    INSERT INTO rt0(c0) VALUES ('a');
    SELECT * FROM rt1, rt0 WHERE rt0.c0 = CAST(rt1.c0 AS TEXT); -- unexpected: row is fetched
    
    Test case LOC: 5
    Oracle: metamorphic
    Tags: RTREE

  • #120 Row value comparison malfunctions with rtree table

    Links: [bugreport] [fix]
    Date found: 05/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    CREATE VIRTUAL TABLE rt0 USING rtree(c0, c1, c2);
    INSERT INTO rt0(c2) VALUES(NULL);
    INSERT INTO t0 VALUES(0);
    SELECT * FROM rt0, t0 WHERE (t0.c0, 0) > (rt0.c2, 0); -- unexpected: row is fetched
    
    Test case LOC: 5
    Oracle: metamorphic
    Tags: RTREE

  • #121 Comparison on INT column in rtree table malfunctions

    Links: [bugreport] [fix]
    Date found: 06/12/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE rt0 USING rtree(c0, c1, c2 INT);
    INSERT INTO rt0(c2) VALUES(0);
    SELECT * FROM rt0 WHERE '0' = rt0.c2; -- unexpected: row is not fetched
    
    Test case LOC: 3
    Oracle: metamorphic
    Tags: RTREE

  • #122 Incorrect result for predicate on rtree table

    Links: [bugreport] [fix] [docs fix]
    Date found: 06/12/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE rt0 USING rtree(c0, c1, c2);
    INSERT INTO rt0(c1) VALUES(0);
    SELECT * FROM rt0 WHERE rt0.c1 > '-1'; -- unexpected: row is fetched
    
    Test case LOC: 3
    Oracle: metamorphic
    Tags: RTREE

  • #123 NOT NULL auxiliary column in rtree table malfunctions

    Links: [bugreport] [docs fix]
    Date found: 06/12/2019
    Status: fixed (in documentation)
    Test case:
    CREATE VIRTUAL TABLE rt0 USING rtree(c0, c1, c2, +c3 NOT NULL);
    INSERT INTO rt0(c3) VALUES(NULL); -- unexpected: inserting NULL succeeds
    SELECT 0 in (rt0.c3) ISNULL FROM rt0; -- expected: 1, actual: 0
    
    Test case LOC: 3
    Oracle: metamorphic
    Tags: RTREE

  • #124 CREATE VIRTUAL TABLE causes segfault

    Links: [fix]
    Date found: 06/12/2019
    Status: fixed
    Highlight: We reported this bug via a private email.
    Test case:
    CREATE VIRTUAL TABLE vt0 USING rtree;
    
    Test case LOC: 1
    Oracle: crash
    Tags: RTREE

  • #125 Generated column and foreign key causes a segfault

    Links: [fix]
    Date found: 06/12/2019
    Status: fixed
    Test case:
    PRAGMA cache_size = 100000;
    PRAGMA foreign_keys = true;
    CREATE TEMP TABLE t0(c0, c1 INTEGER PRIMARY KEY AUTOINCREMENT CHECK (c0), c2 BLOB NOT NULL CHECK (LTRIM(1)) UNIQUE DEFAULT '0000000000000'
    COLLATE BINARY, c3 BLOB UNIQUE NOT NULL ON CONFLICT ABORT CHECK ((''IN (c0, NULL, c1))) GENERATED ALWAYS AS (1), FOREIGN KEY(c1) REFERENCES t0(c2) ON DELETE CASCADE);
    CREATE UNIQUE INDEX i0 ON t0(0, 0, 0);
    CREATE UNIQUE INDEX i1 ON t0(0, 0, 0);
    CREATE UNIQUE INDEX i2 ON t0(0, 0, c1);
    CREATE UNIQUE INDEX i3 ON t0(0, 0, c1);
    CREATE UNIQUE INDEX i4 ON t0(c0, 0, c2);
    CREATE INDEX i5 ON t0(0, CASE WHEN 1 THEN 1 WHEN c2 THEN c1 END, 0);
    VACUUM;
    INSERT OR REPLACE INTO t0(c0, c1) VALUES (2, 1), (1, 0); -- segfault
    
    Test case LOC: 12
    Oracle: crash
    Tags: GENERATED_COLUMN

  • #126 Query on table without rows and generated column results in "out of memory" error

    Links: [bugreport] [fix]
    Date found: 08/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 AS (1), c1);
    CREATE TABLE t1(c0);
    SELECT * FROM t0, t1 WHERE t0.c0 == 0; -- out of memory
    
    Test case LOC: 3
    Oracle: error
    Tags: GENERATED_COLUMN

  • #127 PRAGMA integrity_check does not terminate on table with generated column

    Links: [bugreport] [fix]
    Date found: 09/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0 (c0, c1 NOT NULL GENERATED ALWAYS AS (c0 = 0));
    INSERT INTO t0(c0) VALUES (0);
    PRAGMA integrity_check; -- hangs
    
    Test case LOC: 3
    Oracle: hang
    Tags: GENERATED_COLUMN

  • #128 LEFT JOIN segfault on rtree table

    Links: [fix]
    Date found: 11/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    CREATE VIRTUAL TABLE vt0 USING rtree(c0, c1, c2);
    INSERT INTO t0(c0) VALUES(0);
    SELECT * FROM t0 LEFT JOIN vt0 ON c2 IN (0) WHERE c1 IN (NULL);
    
    Test case LOC: 4
    Oracle: crash
    Tags: RTREE

  • #129 REINDEX results in "UNIQUE constraint failed" for generated column

    Links: [bugreport] [fix]
    Date found: 10/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 AS (0 = UNLIKELY(c1)) UNIQUE, c1 TEXT);
    INSERT INTO t0(c1) VALUES (1), (0);
    REINDEX; -- UNIQUE constraint failed: t0.c0
    
    Test case LOC: 3
    Oracle: error
    Tags: GENERATED_COLUMN

  • #130 FTS database disk image is malformed for UTF-16 encoding after update

    Links: [bugreport] [commit]
    Date found: 11/12/2019
    Status: fixed
    Test case:
    PRAGMA encoding = 'UTF-16';
    CREATE VIRTUAL TABLE vt0 USING fts5(c0);
    INSERT INTO vt0 VALUES (x'46f0');
    UPDATE vt0 SET c0=NULL;
    INSERT INTO vt0(vt0) VALUES('integrity-check'); -- database disk image is malformed
    
    Test case LOC: 5
    Oracle: error
    Tags: FTS

  • #131 REINDEX segfaults on table with generated columns

    Links: [bugreport] [fix]
    Date found: 14/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 AS(1 >= 1), c1 UNIQUE AS(TYPEOF(c0)), c2);
    CREATE VIRTUAL TABLE t1 USING fts4;
    INSERT INTO t0 VALUES(0);
    REINDEX; -- segfault
    
    Test case LOC: 4
    Oracle: segfault
    Tags: GENERATED_COLUMN

  • #132 LEFT JOIN malfunctions with generated column

    Links: [bugreport] [fix]
    Date found: 16/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    CREATE TABLE t1(c0, c1 AS(1));
    INSERT INTO t0 VALUES(0);
    SELECT t1.c1 IS TRUE FROM t0 LEFT JOIN t1; -- expected: 0, actual: 1
    
    Test case LOC: 4
    Oracle: metamorphic
    Tags: GENERATED_COLUMN

  • #133 UPDATE causes "database table is locked" for rtree table

    Links: [bugreport] [fix]
    Date found: 19/12/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE t0 USING rtree(c0, c1, c2);
    INSERT INTO t0(c1) VALUES(0), (0);
    UPDATE t0 SET c0 = (SELECT 1 FROM t0); -- unexpected: database table is locked
    
    Test case LOC: 3
    Oracle: error
    Tags: RTREE

  • #134 FILTER clause in window function causes a segfault

    Links: [fix]
    Date found: 20/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    CREATE TABLE t1(c0, c1 UNIQUE);
    INSERT INTO t0(c0) VALUES(NULL);
    SELECT COUNT(*) FROM t0, t1 WHERE (SELECT AVG(0) FILTER(WHERE t1.c1)); -- segmentation fault
    
    Test case LOC: 4
    Oracle: crash


  • #135 Incorrect result for BETWEEN and generated column

    Links: [bugreport] [fix]
    Date found: 20/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 REAL AS(1) UNIQUE, c1 INT);
    INSERT INTO t0 VALUES('');
    SELECT * FROM t0 WHERE (1 BETWEEN CAST(t0.c0 AS TEXT) AND t0.c0); -- unexpected: row is fetched
    
    Test case LOC: 3
    Oracle: metamorphic
    Tags: GENERATED_COLUMN

  • #136 FTS database disk image is malformed for UTF-16 encoding

    Links: [bugreport] [commit]
    Date found: 20/12/2019
    Status: fixed
    Test case:
    PRAGMA encoding = 'UTF-16';
    CREATE VIRTUAL TABLE vt0 USING fts5(c0);
    INSERT INTO vt0 VALUES (x'3078');
    INSERT INTO vt0(vt0) VALUES('integrity-check'); -- database disk image is malformed
    
    Test case LOC: 4
    Oracle: error
    Tags: FTS

  • #137 FTS database disk image is malformed for update on languageid

    Links: [bugreport] [commit]
    Date found: 21/12/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE vt0 USING fts4(c0, languageid="lid");
    INSERT INTO vt0 VALUES (0), (1);
    BEGIN;
    UPDATE vt0 SET lid = 1;
    INSERT INTO vt0(vt0) VALUES('integrity-check'); -- unexpected: database disk image is malformed
    
    Test case LOC: 5
    Oracle: error
    Tags: FTS

  • #138 Debug assertion sqlite3VdbeMemAboutToChange: Assertion `(mFlags&MEM_Str)==0 || (pMem->n==pX->n && pMem->z==pX->z)' failed

    Links: [bugreport] [fix]
    Date found: 22/12/2019
    Status: fixed
    Test case:
    PRAGMA encoding = 'UTF16';
    CREATE TABLE t0(c0 REAL, c1);
    INSERT INTO t0(c0) VALUES (''), (0);
    CREATE INDEX i0 ON t0(c1) WHERE c0 GLOB 3;
    UPDATE t0 SET c1=0; -- sqlite3.c:75871: sqlite3VdbeMemAboutToChange: Assertion `(mFlags&MEM_Str)==0 || (pMem->n==pX->n && pMem->z==pX->z)' failed.
    
    Test case LOC: 5
    Oracle: crash
    Tags: DEBUG

  • #139 Debug assertion fts5StructureRead: Assertion `p->iStructVersion!=0' failed

    Links: [bugreport] [fix]
    Date found: 22/12/2019
    Status: fixed
    Test case:
    PRAGMA locking_mode = EXCLUSIVE;
    PRAGMA journal_mode = PERSIST;
    CREATE VIRTUAL TABLE vt0 USING fts5(c0);
    INSERT INTO vt0(vt0) VALUES('integrity-check');
    INSERT INTO vt0(vt0, rank) VALUES('usermerge', 2); -- sqlite3.c:213961: fts5StructureRead: Assertion `p->iStructVersion!=0' failed.
    
    Test case LOC: 5
    Oracle: crash
    Tags: DEBUG , FTS

  • #140 Debug assertion sqlite3VdbeExec: Assertion `memIsValid(pRec)' failed

    Links: [bugreport] [fix]
    Date found: 22/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 UNIQUE);
    INSERT INTO t0 VALUES(0);
    SELECT * FROM t0 WHERE (0, t0.c0) IN(SELECT DENSE_RANK() OVER(), LAG(0) OVER() FROM t0); -- sqlite3.c:87244: sqlite3VdbeExec: Assertion `memIsValid(pRec)' failed.
    
    Test case LOC: 3
    Oracle: crash
    Tags: DEBUG

  • #141 SELECT on window function causes a segfault

    Links: [bugreport] [fix]
    Date found: 22/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 UNIQUE);
    SELECT * FROM t0 WHERE(c0, 0) IN(SELECT FIRST_VALUE(0) OVER(), 0); -- Segmentation fault
    
    Test case LOC: 2
    Oracle: crash


  • #142 Debug assertion sqlite3VdbeExec: Assertion `flags3==pIn3->flags' failed

    Links: [bugreport] [fix]
    Date found: 22/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 CHECK(c1 IN(c1)), c1 INT);
    INSERT INTO t0(c1) VALUES('0'); -- sqlite3.c:86300: sqlite3VdbeExec: Assertion `flags3==pIn3->flags' failed.
    
    Test case LOC: 2
    Oracle: crash
    Tags: DEBUG

  • #143 Debug assertion sqlite3ExprSkipCollateAndLikely: Assertion `pExpr->op==TK_COLLATE' failed

    Links: [bugreport] [fix]
    Date found: 22/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    CREATE INDEX i0 ON t0((c0 NOTNULL) COLLATE BINARY);
    SELECT * FROM t0 WHERE(c0 NOTNULL) COLLATE BINARY BETWEEN 0 AND c0; -- sqlite3.c:98025: sqlite3ExprSkipCollateAndLikely: Assertion `pExpr->op==TK_COLLATE' failed.
    
    Test case LOC: 3
    Oracle: crash
    Tags: DEBUG

  • #144 Debug assertion constructAutomaticIndex: Assertion `!ExprHasProperty(pExpr, EP_FromJoin) || pExpr->iRightJoinTable!=pSrc->iCursor || pLoop->prereq!=0' failed

    Links: [bugreport] [fix]
    Date found: 22/12/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE vt0 USING fts5(c0);
    CREATE TABLE t0(c0);
    CREATE VIEW v0(c0) AS SELECT 0 GROUP BY 1;
    SELECT * FROM v0, t0 LEFT JOIN vt0 ON vt0.c0 MATCH 1 WHERE v0.c0 == 0 -- sqlite3.c:143296: constructAutomaticIndex: Assertion `!ExprHasProperty(pExpr, EP_FromJoin) || pExpr->iRightJoinTable!=pSrc->iCursor || pLoop->prereq!=0' failed.
    
    Test case LOC: 4
    Oracle: crash
    Tags: DEBUG , FTS

  • #145 Debug assertion sqlite3VdbeExec: Assertion `pIn1!=pIn3' failed

    Links: [bugreport] [fix]
    Date found: 22/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 TEXT, CHECK(c0 IN (c0)));
    INSERT INTO t0 VALUES(0);
    UPDATE t0 SET c0 = 0; -- sqlite3.c:86323: sqlite3VdbeExec: Assertion `pIn1!=pIn3' failed.
    
    Test case LOC: 3
    Oracle: crash
    Tags: DEBUG

  • #146 Debug assertion sqlite3VdbeExec: Assertion `flags3==pIn3->flags' failed (2)

    Links: [bugreport] [fix]
    Date found: 23/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT, CHECK(CASE c0 WHEN c0 THEN 0 END));
    INSERT INTO t0 VALUES('0'); -- sqlite3.c:86300: sqlite3VdbeExec: Assertion `flags3==pIn3->flags' failed.
    
    Test case LOC: 2
    Oracle: crash
    Tags: DEBUG

  • #147 Debug assertion sqlite3MemCompare: Assertion `pMem1->enc==pMem2->enc || pMem1->db->mallocFailed' failed

    Links: [bugreport] [fix]
    Date found: 23/12/2019
    Status: fixed
    Test case:
    PRAGMA encoding = 'UTF16';
    CREATE VIRTUAL TABLE t0 USING fts5(c0);
    INSERT INTO t0(c0) VALUES (x'00');
    SELECT * FROM t0 WHERE CAST(SUBSTR(c0, 0) AS TEXT) > 0; -- sqlite3.c:81076: sqlite3MemCompare: Assertion `pMem1->enc==pMem2->enc || pMem1->db->mallocFailed' failed.
    
    Test case LOC: 4
    Oracle: crash
    Tags: DEBUG , FTS

  • #148 Debug assertion sqlite3VdbeMemAboutToChange: Assertion `(mFlags&MEM_Str)==0 || (pMem->n==pX->n && pMem->z==pX->z)' failed (2)

    Links: [bugreport] [fix]
    Date found: 23/12/2019
    Status: fixed
    Test case:
    PRAGMA encoding = 'UTF16';
    CREATE TABLE t0(c0 TEXT);
    CREATE INDEX i0 ON t0(0 LIKE COALESCE(c0, 0));
    INSERT INTO t0(c0) VALUES (0), (0); -- sqlite3.c:75871: sqlite3VdbeMemAboutToChange: Assertion `(mFlags&MEM_Str)==0 || (pMem->n==pX->n && pMem->z==pX->z)' failed.
    
    Test case LOC: 4
    Oracle: crash
    Tags: DEBUG

  • #149 Debug assertion sqlite3VdbeExec: Assertion `pC!=0' failed

    Links: [bugreport] [fix]
    Date found: 23/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 UNIQUE);
    SELECT * FROM t0 WHERE (t0.c0, 1) IN(SELECT NTILE(1) OVER(), 0 FROM t0); -- sqlite3.c:90197: sqlite3VdbeExec: Assertion `pC!=0' failed.
    
    Test case LOC: 2
    Oracle: crash
    Tags: DEBUG

  • #150 Debug assertion impliesNotNullRow: Assertion `pWalker->eCode==0' failed

    Links: [bugreport] [fix]
    Date found: 23/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    CREATE TABLE t1(c0);
    SELECT * FROM t0 LEFT JOIN t1 WHERE (t1.c0 BETWEEN 0 AND 0) > ('' AND t0.c0); -- sqlite3.c:103271: impliesNotNullRow: Assertion `pWalker->eCode==0' failed.
    
    Test case LOC: 3
    Oracle: crash
    Tags: DEBUG

  • #151 Debug assertion rtreeRelease: Assertion `pRtree->nNodeRef==0 || pRtree->bCorrupt' failed

    Links: [fix] [bugreport]
    Date found: 23/12/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE rt0 USING rtree(c0, c1, c2);
    CREATE TABLE t0(c0);
    INSERT INTO t0 VALUES (0), (1);
    INSERT INTO rt0(c0) VALUES (0), (1);
    CREATE VIEW v0 AS SELECT 0 LIMIT 0;
    SELECT * FROM t0 LEFT JOIN rt0 INNER JOIN v0; -- sqlite3.c:185720: rtreeRelease: Assertion `pRtree->nNodeRef==0 || pRtree->bCorrupt' failed.
    
    Test case LOC: 6
    Oracle: crash
    Tags: DEBUG , RTREE

  • #152 FTS database disk image is malformed for special characters in table

    Links: [bugreport] [fix]
    Date found: 23/12/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE vt1 USING fts5(c1, c2, prefix = 1, tokenize = "porter ascii");
    INSERT INTO vt1 VALUES (x'e4', '+䔬+');
    INSERT INTO vt1(vt1) VALUES('integrity-check'); -- database disk image is malformed
    
    Test case LOC: 3
    Oracle: error
    Tags: DEBUG , FTS

  • #153 Debug assertion sqlite3VdbeExec: Assertion `pIn1!=pIn3' failed (2)

    Links: [bugreport] [fix]
    Date found: 23/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 TEXT, CHECK(c0 BETWEEN 0 AND +c0));
    INSERT INTO t0 VALUES (0);
    UPDATE t0 SET c0 = 0; -- sqlite3.c:86402: sqlite3VdbeExec: Assertion `pIn1!=pIn3' failed.
    
    Test case LOC: 3
    Oracle: crash
    Tags: DEBUG

  • #154 UPDATE with complex WHERE condition on rtree results in "database table is locked" error

    Links: [bugreport]
    Date found: 23/12/2019
    Status: fixed (in documentation)
    Highlight: This was not considered a bug. However, to clarify, a section "Reading And Writing At The Same Time" was added to the rtree documentation.
    Test case:
    CREATE VIRTUAL TABLE rt0 USING rtree(c0, c1, c2);
    INSERT INTO rt0(c0) VALUES (0), (1), (2);
    UPDATE rt0 SET c0 = 0 WHERE(SELECT ROW_NUMBER() OVER() FROM rt0); -- database table is locked
    
    Test case LOC: 3
    Oracle: error
    Tags: RTREE

  • #155 Debug assertion sqlite3Fts5HashScanNext: Assertion `!sqlite3Fts5HashScanEof(p)' failed

    Links: [bugreport] [fix]
    Date found: 24/12/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE vt0 USING fts5(c0, prefix = 71, tokenize = "porter ascii", prefix = 9);
    BEGIN;
    INSERT INTO vt0(c0) VALUES (x'e9');
    INSERT INTO vt0(vt0) VALUES('integrity-check'); -- sqlite3.c:213028: sqlite3Fts5HashScanNext: Assertion `!sqlite3Fts5HashScanEof(p)' failed
    
    Test case LOC: 4
    Oracle: crash
    Tags: DEBUG , FTS

  • #156 FTS database disk image is malformed for UTF-16 encoding and integrity check

    Links: [bugreport] [fix]
    Date found: 24/12/2019
    Status: fixed
    Test case:
    PRAGMA encoding = 'UTF-16';
    CREATE VIRTUAL TABLE vt0 USING fts5(c0, c1);
    INSERT INTO vt0(vt0, rank) VALUES('pgsz', '37');
    INSERT INTO vt0(c0, c1) VALUES (0.66077, 1957391816);
    INSERT INTO vt0(vt0) VALUES('integrity-check'); -- unexpected: database disk image is malformed
    
    Test case LOC: 5
    Oracle: error
    Tags: FTS

  • #157 Debug assertion fts5CheckTransactionState: Assertion `iSavepoint<=p->ts.iSavepoint' failed

    Links: [bugreport] [fix]
    Date found: 25/12/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE vt0 USING fts5(c0);
    CREATE VIRTUAL TABLE vt1 USING fts4(c0);
    INSERT INTO vt1(c0) VALUES(0);
    BEGIN;
    UPDATE vt1 SET c0 = 0;
    INSERT INTO vt1(c0) VALUES (0), (0);
    UPDATE vt0 SET c0 = 0;
    INSERT INTO vt1(c0) VALUES (0);
    UPDATE vt1 SET c0 = 0;
    INSERT INTO vt1(vt1) VALUES('automerge=1');
    UPDATE vt1 SET c0 = 0;
    DROP TABLE vt1; -- sqlite3.c:219981: fts5CheckTransactionState: Assertion `iSavepoint<=p->ts.iSavepoint' failed
    
    Test case LOC: 12
    Oracle: crash
    Tags: DEBUG , FTS

  • #158 Debug assertion sqlite3TableColumnAffinity: Assertion `iCol<pTab->nCol' failed.

    Links: [bugreport] [fix]
    Date found: 25/12/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE t0 USING rtree(c0, c1, c2);
    SELECT * FROM t0 WHERE ((0, 0) IN (SELECT COUNT(*), LAG(5) OVER(PARTITION BY 0) FROM t0), 0) <= (t0.c1, 0); -- sqlite3.c:98053: sqlite3TableColumnAffinity: Assertion `iCol<pTab->nCol' failed.
    
    Test case LOC: 2
    Oracle: crash
    Tags: DEBUG , RTREE

  • #159 Debug assertion sqlite3BtreeInsert: Assertion `pCur->curFlags & BTCF_ValidNKey' failed

    Links: [bugreport] [fix]
    Date found: 26/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 UNIQUE AS(0), c1, c2);
    INSERT INTO t0(c1) VALUES(0);
    UPDATE t0 SET c1 = 0, c2 = 0 WHERE(c0) >= 0; -- sqlite3.c:72305: sqlite3BtreeInsert: Assertion `pCur->curFlags & BTCF_ValidNKey' failed.
    
    Test case LOC: 3
    Oracle: crash
    Tags: DEBUG , GENERATED_COLUMN

  • #160 Debug assertion sqlite3FinishCoding: Assertion `!pParse->isMultiWrite || sqlite3VdbeAssertMayAbort(v, pParse->mayAbort)' failed

    Links: [bugreport] [fix]
    Date found: 26/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 PRIMARY KEY, c1, c2 UNIQUE) WITHOUT ROWID;
    INSERT OR FAIL INTO t0(c2) VALUES (0), (NULL) ON CONFLICT(c2) DO UPDATE SET c1 = c0 -- sqlite3.c:108474: sqlite3FinishCoding: Assertion `!pParse->isMultiWrite || sqlite3VdbeAssertMayAbort(v, pParse->mayAbort)' failed.
    
    Test case LOC: 2
    Oracle: crash
    Tags: DEBUG

  • #161 Debug assertion assert_pager_state: Assertion `pPager->changeCountDone==0 || pPager->eLock>=RESERVED_LOCK' failed

    Links: [bugreport] [fix]
    Date found: 27/12/2019
    Status: fixed
    Test case:
    PRAGMA locking_mode = EXCLUSIVE;
    PRAGMA journal_mode = WAL;
    PRAGMA locking_mode = NORMAL;
    PRAGMA integrity_check;
    PRAGMA journal_mode = MEMORY; -- sqlite3.c:51926: assert_pager_state: Assertion `pPager->changeCountDone==0 || pPager->eLock>=RESERVED_LOCK' failed.
    
    Test case LOC: 5
    Oracle: crash
    Tags: DEBUG

  • #162 FTS4 integrity-check results in "database disk image is malformed" for UTF-16 encoding

    Links: [bugreport] [documentation]
    Date found: 27/12/2019
    Status: fixed (in documentation)
    Test case:
    PRAGMA encoding = 'UTF-16';
    CREATE VIRTUAL TABLE vt0 USING fts4(c0);
    INSERT INTO vt0 VALUES ('');
    INSERT INTO vt0(vt0) VALUES('integrity-check'); -- database disk image is malformed
    
    Test case LOC: 4
    Oracle: error
    Tags: FTS

  • #163 Debug assertion sqlite3VdbeExec: Assertion `memIsValid(&aMem[pOp->p1])' failed.

    Links: [bugreport] [fix]
    Date found: 28/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 NOT NULL DEFAULT '', c1 AS(c0) NOT NULL);
    REPLACE INTO t0(c0) VALUES(NULL); -- sqlite3.c:85112: sqlite3VdbeExec: Assertion `memIsValid(&aMem[pOp->p1])' failed.
    
    Test case LOC: 2
    Oracle: crash
    Tags: DEBUG , GENERATED_COLUMN

  • #164 Debug assertion exprSrcCount: Assertion `0' failed

    Links: [bugreport] [fix]
    Date found: 28/12/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    SELECT (0, 0) IN(SELECT MIN(c0), NTILE(0) OVER()) FROM t0; -- sqlite3.c:103486: exprSrcCount: Assertion `0' failed.
    
    Test case LOC: 2
    Oracle: crash
    Tags: DEBUG

  • #165 Debug assertion sqlite3VdbeExec: Assertion `memIsValid(pRec)' failed

    Links: [bugreport] [fix]
    Date found: 28/12/2019
    Status: fixed
    Highlight: According to the SQLite developers, this bug report revealed a subtle problem n the new (unreleased) generated columns feature.
    Test case:
    CREATE TABLE t0(c0 NOT NULL DEFAULT 1, c1 AS(c0) UNIQUE);
    REPLACE INTO t0 VALUES(NULL); -- sqlite3.c:87334: sqlite3VdbeExec: Assertion `memIsValid(pRec)' failed.
    
    Test case LOC: 2
    Oracle: crash
    Tags: DEBUG , GENERATED_COLUMN

  • #166 Debug assertion sqlite3VdbeMemAboutToChange: Assertion `(mFlags&MEM_Real)==0 || pMem->u.r==pX->u.r' failed

    Links: [bugreport] [fix]
    Date found: 28/12/2019
    Status: fixed
    Test case:
    PRAGMA foreign_keys = true;
    CREATE TABLE t0(c0 INT AS(2) UNIQUE, c1 TEXT UNIQUE, FOREIGN KEY(c0) REFERENCES t0(c1));
    INSERT INTO t0(c1) VALUES(0.16334143182538696), (0); -- sqlite3.c:75926: sqlite3VdbeMemAboutToChange: Assertion `(mFlags&MEM_Real)==0 || pMem->u.r==pX->u.r' failed.
    
    Test case LOC: 3
    Oracle: crash
    Tags: DEBUG , GENERATED_COLUMN

  • #167 Trigger on normal table causes the database disk image to become malformed

    Links: [bugreport] [fix]
    Date found: 29/12/2019
    Status: fixed
    Test case:
    PRAGMA recursive_triggers = true;
    CREATE TABLE t0(c0 UNIQUE ON CONFLICT REPLACE, c1, c2);
    CREATE INDEX i0 ON t0(c2
    INSERT INTO t0(c0) VALUES (0);
    CREATE TRIGGER tr0 DELETE ON t0 BEGIN
    UPDATE t0 SET c2 = c0;
    END;
    INSERT INTO t0(c0, c2) VALUES(4, 0), (9, 0);
    UPDATE t0 SET c0 = 0;
    SELECT * FROM t0 WHERE x'' > t0.c2 GROUP BY c1; -- database disk image is malformed
    
    Test case LOC: 10
    Oracle: error


  • #168 NATURAL JOIN on virtual table results in "parse error in rank function"

    Links: [bugreport] [fix]
    Date found: 30/12/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE vt0 USING fts5(c0, c1);
    CREATE VIRTUAL TABLE vt1 USING fts5(c0);
    INSERT INTO vt1(c0) VALUES ('');
    SELECT * FROM vt1 NATURAL JOIN vt0 WHERE vt0.c1 MATCH 'a'; -- parse error in rank function:
    
    Test case LOC: 4
    Oracle: error
    Tags: FTS

  • #169 Debug assertion codeVectorCompare: Assertion `0' failed

    Links: [bugreport] [fix]
    Date found: 30/12/2019
    Status: fixed
    Highlight: Since we reported this bug 18 minutes after it was introduced, Richard Hipp sent a post titled '18 minutes 41 seconds' to the SQLite mailing list (see https://www.sqlite.org/src/info/f481636f1a0333c6)
    Test case:
    CREATE TABLE t0(c0 CHECK(((0, 0) > (0, c0))));
    INSERT INTO t0(c0) VALUES(0) ON CONFLICT(c0) DO UPDATE SET c0 = 3; -- sqlite3.c:98717: codeVectorCompare: Assertion `0' failed.
    
    Test case LOC: 2
    Oracle: crash
    Tags: DEBUG

  • #170 Debug assertion sqlite3VdbeMemAboutToChange: Assertion `(mFlags&MEM_Real)==0 || pMem->u.r==pX->u.r' failed (2)

    Links: [bugreport] [fix]
    Date found: 31/12/2019
    Status: fixed
    Test case:
    PRAGMA foreign_keys = true;
    CREATE TABLE t0(c0 TEXT PRIMARY KEY, c1 INT UNIQUE REFERENCES t0 CHECK(CAST(c1 AS INT) BETWEEN 0 AND CASE WHEN 1 THEN c0 END));
    REPLACE INTO t0(c0, c1) VALUES(0.7675826647230917, 0), (0, x''); -- sqlite3.c:75952: sqlite3VdbeMemAboutToChange: Assertion `(mFlags&MEM_Real)==0 || pMem->u.r==pX->u.r' failed.
    
    Test case LOC: 3
    Oracle: crash
    Tags: DEBUG

  • #171 FTS5 integrity-check results in "database disk image is malformed" for UTF-16 encoding and SUBSTR

    Links: [bugreport] [fix]
    Date found: 02/01/2020
    Status: fixed
    Test case:
    PRAGMA encoding = 'UTF16';
    CREATE VIRTUAL TABLE vt0 USING fts5(c0);
    INSERT INTO vt0 VALUES (SUBSTR(x'37', ''));
    INSERT INTO vt0(vt0) VALUES('integrity-check'); -- database disk image is malformed
    
    Test case LOC: 4
    Oracle: error
    Tags: FTS

  • #172 DBSTAT query computes incorrect result for aggregate column

    Links: [bugreport] [fix]
    Date found: 04/01/2020
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE stat USING dbstat;
    SELECT * FROM stat WHERE stat.aggregate == NULL; -- unexpected: row is fetched
    
    Test case LOC: 2
    Oracle: metamorphic
    Tags: DBSTAT

  • #173 DBSTAT query computes incorrect result for name column

    Links: [bugreport] [fix]
    Date found: 04/01/2020
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE stat USING dbstat;
    SELECT * FROM stat WHERE stat.name = NULL; -- unexpected: row is fetched
    
    Test case LOC: 2
    Oracle: metamorphic
    Tags: DBSTAT

  • #174 Incorrect result for query with 0 >= t0.c0 AND t0.c0 = v0.c0 condition

    Links: [bugreport] [fix]
    Date found: 08/01/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0);
    INSERT INTO t0 VALUES('0');
    CREATE VIEW v0(c0) AS SELECT CAST(0 AS INT) FROM t0;
    SELECT * FROM t0, v0 WHERE 0 >= t0.c0 AND t0.c0 = v0.c0; -- unexpected: fetches row
    
    Test case LOC: 4
    Oracle: metamorphic


  • #175 Incorrect result for COUNT(), UTF16be encoding and SUBSTR

    Links: [bugreport] [fix]
    Date found: 08/01/2020
    Status: fixed
    Test case:
    PRAGMA encoding = 'UTF16be';
    CREATE TABLE t0(c0, c1);
    INSERT INTO t0(c0) VALUES (x'00');
    CREATE INDEX i0 ON t0(c0 COLLATE BINARY);
    INSERT INTO t0(c0) VALUES (1);
    SELECT COUNT(*) FROM t0 WHERE SUBSTR(t0.c0, ','); -- expected: 1, actual: 2
    
    Test case LOC: 6
    Oracle: metamorphic


  • #176 GROUP BY causes unexpected conversion

    Links: [bugreport] [fix]
    Date found: 10/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 REAL, c1 REAL GENERATED ALWAYS AS (c0));
    INSERT INTO t0(c0) VALUES (1);
    SELECT * FROM t0 GROUP BY c0; -- expected: 1.0|1.0, actual: 1.0|1
    SELECT * FROM t0; -- 1.0|1.0
    
    Test case LOC: 4


  • #177 MAX yields unexpected result for UTF-16

    Links: [bugreport] [fix]
    Date found: 04/03/2020
    Status: fixed
    Test case:
    PRAGMA encoding = 'UTF-16';
    CREATE TABLE t0(c0 TEXT);
    INSERT INTO t0(c0) VALUES ('윆'), (1);
    SELECT MAX(CASE 1 WHEN 1 THEN t0.c0 END) FROM t0; -- 윆
    SELECT MAX(t0.c0) FROM t0; -- 1
    
    Test case LOC: 5


  • #178 Unexpected result for MIN on string that contains a null character

    Links: [bugreport] [fix]
    Date found: 05/03/2020
    Status: fixed (in documentation)
    Test case:
    SELECT HEX(MIN(a)) FROM (SELECT CHAR(0, 1) COLLATE NOCASE as a UNION SELECT CHAR(0, 0) as a); -- 0000
    SELECT HEX(MIN(a)) FROM (SELECT CHAR(0, 0) COLLATE NOCASE as a UNION SELECT CHAR(0, 1) as a); -- 0001
    
    Test case LOC: 2


  • #179 UNION operator malfunctions in LEFT JOIN on view

    Links: [bugreport] [fix]
    Date found: 25/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE VIEW v0(c0) AS SELECT CAST(t0.c0 AS INTEGER) FROM t0;
    INSERT INTO t0(c0) VALUES (0);
    SELECT * FROM t0 LEFT JOIN v0 ON v0.c0 >= '0' WHERE TRUE UNION SELECT 0,0 WHERE 0; -- expected: {0|0}, actual:{0|NULL}
    
    Test case LOC: 4
    Oracle: qp-distinct


PostgreSQL

  • #1 GROUP BY and inheritance issue

    Links: [mail] [fix]
    Date found: 02/07/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT PRIMARY KEY, c1 INT);
    CREATE TABLE t1(c0 INT) INHERITS (t0);
    INSERT INTO t0(c0, c1) VALUES(0, 0);
    INSERT INTO t1(c0, c1) VALUES(0, 1);
    SELECT c0, c1 FROM t0 GROUP BY c0, c1; -- expected: 0|0 and 0|1, actual: 0|0
    
    Test case LOC: 5
    Oracle: contains


  • #2 DISCARD TEMP results in "ERROR: cache lookup failed for type 0"

    Links: [mail] [mail 2] [fix]
    Date found: 4/07/2019
    Status: fixed
    Test case:
    CREATE TEMP TABLE t0(c0 INT GENERATED ALWAYS AS IDENTITY) PARTITION BY HASH((t0.c0));
    VACUUM FULL;
    DISCARD TEMP; -- unexpected: ERROR: cache lookup failed for type 0
    
    Test case LOC: 3
    Oracle: error (DISCARD)


  • #3 ERROR: found unexpected null value in index

    Links: [mail] [fix]
    Date found: 10/07/2019
    Status: fixed
    Highlight: Tom Lane commented this find with "nifty". :-)
    Test case:
    -- requires another open transaction holding a snapshot
    CREATE TABLE t0(c0 TEXT);
    INSERT INTO t0(c0) VALUES('b'), ('a');
    ANALYZE;
    INSERT INTO t0(c0) VALUES (NULL);
    UPDATE t0 SET c0 = 'a';
    CREATE INDEX i0 ON t0(c0);
    SELECT * FROM t0 WHERE 'baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' > t0.c0; -- unexpected: ERROR: found unexpected null value in index "i0"
    
    Test case LOC: 7
    Oracle: error
    Tags: MULTITHREADED

  • #4 ERROR: negative bitmapset member not allowed in SELECT

    Links: [mail]
    Date found: 10/07/2019
    Status: fixed
    Highlight: Later on this day, another bug report was opened on this: https://www.postgresql.org/message-id/flat/20190711150822.z7cirna2fjtrfcnu%40development#d05c216fb9f3d27e3b69520666b043c6. Although we reported the bug first, the second bug reporter, rather than us, was credited. Although we asked for a clarification on the mailing list (see https://www.postgresql.org/message-id/CA%2Bu7OA6RsonbT1S06TaO99QDL2H8zS-N2jO%3DwSuqAOJLX5yQSg%40mail.gmail.com), we did not receive any response.
    Test case:
    CREATE TABLE t0(c0 BOOLEAN, c1 BOOLEAN, UNIQUE(c1));
    CREATE STATISTICS s1 ON c0, c1 FROM t0;
    INSERT INTO t0(c0) VALUES(TRUE);
    ANALYZE t0;
    SELECT * FROM t0 WHERE (t0.c0 AND t0.c1) >= TRUE; -- ERROR:  negative bitmapset member not allowed
    
    Test case LOC: 5
    Oracle: error


  • #5 REINDEX CONCURRENTLY causes ALTER TABLE to fail

    Links: [email] [fix]
    Date found: 17/07/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INTEGER , c1 BOOLEAN);
    INSERT INTO t0(c0, c1) VALUES(1369652450, FALSE), (414515746, TRUE), (897778963, FALSE);
    CREATE UNIQUE INDEX i0 ON t0((1 / t0.c0)) WHERE ('-H') >= (t0.c1::TEXT) COLLATE "C";
    REINDEX TABLE CONCURRENTLY t0;
    ALTER TABLE t0 ALTER c1 TYPE TEXT; -- could not create unique index "i0" DETAIL:  Key ((1 / c0))=(0) is duplicated.
    
    Test case LOC: 5
    Oracle: error


  • #6 INSERT INTO causes segfault on trunk

    Links: Date found: 24/09/2019
    Status: fixed
    Highlight: We reported this bug on the security mailing list where it was stated that "next week it'd have been a security issue [since a new PostgreSQL version would have been released], perhaps, but since v12 isn't formally released yet I don't think we need to treat it as one.
    Test case:
    CREATE TABLE t0(c0 integer, c1 integer GENERATED ALWAYS AS (t0.c0) STORED);
    CREATE TABLE t1(LIKE t0 INCLUDING DEFAULTS);
    INSERT INTO t1(c0) VALUES(NULL);
    
    Test case LOC: 3
    Oracle: segfault


  • #7 Unexpected "cache lookup failed for collation 0" failure

    Links: [email] [fix]
    Date found: 13/11/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 CHAR(2) COLLATE "C", c1 CHAR(2) COLLATE "POSIX");
    INSERT INTO t0 VALUES('', '');
    SELECT * FROM t0 WHERE t0.c1 NOT IN (t0.c0); -- unexpected: cache lookup failed for collation 0
    
    Test case LOC: 3
    Oracle: error


  • #8 Failed assertion clauses != NIL

    Links: [email] [fix]
    Date found: 19/11/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 boolean, c1 boolean, c2 boolean);
    INSERT INTO t0 VALUES(FALSE, FALSE, FALSE);
    CREATE STATISTICS s0 ON c0, c2 FROM t0;
    ANALYZE;
    SELECT * FROM t0 WHERE t0.c2 OR t0.c1 OR t0.c0; -- TRAP: FailedAssertion("clauses != NIL", File: "mcv.c", Line: 1551)
    
    Test case LOC: 5
    Oracle: crash
    Tags: DEBUG

  • #9 No = operator for opfamily 426

    Links: [email] [fix] [improvement 1] [improvement 2]
    Date found: 19/11/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 TEXT);
    CREATE INDEX i0 ON t0(c0 bpchar_ops);
    SELECT * FROM t0 WHERE t0.c0 LIKE ''; -- ERROR:  no = operator for opfamily 426
    
    Test case LOC: 3
    Oracle: error


  • #10 Fetching from information_schema.tables results in segfault

    Links: [fix]
    Date found: 20/11/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 int);
    CREATE VIEW v0 AS SELECT * FROM t0;
    CREATE OR REPLACE VIEW v0 AS SELECT * FROM v0;
    SELECT * FROM information_schema.tables; -- server process (PID 2461) was terminated by signal 11: Segmentation fault
    
    Test case LOC: 4
    Oracle: crash


  • #11 Segfault when creating constant bit_length() index on TEMP table

    Links: [fix]
    Date found: 22/11/2019
    Status: fixed
    Test case:
    CREATE TEMP TABLE t0(c0 int) ON COMMIT DELETE ROWS;
    CREATE INDEX i0 ON t0(bit_length('')); -- Segmentation fault
    
    Test case LOC: 2
    Oracle: crash


MySQL

  • #1 Functional index seems to malfunction with UNSIGNED column

    Links: [bugtracker]
    Date found: 20/06/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT UNSIGNED);
    INSERT INTO t0(c0) VALUES(4294967294);
    CREATE INDEX i0 ON t0((ABS(t0.c0))); -- unexpected: ERROR 3752 (22003): Value is out of range for functional index 'i0'
    
    Test case LOC: 3
    Oracle: error (CREATE INDEX)
    Tags: INDEX

  • #2 The negation of a "<=>" comparison malfunctions depending on the column's type

    Links: [bugtracker]
    Date found: 21/06/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 TINYINT);
    INSERT INTO t0(c0) VALUES(NULL);
    SELECT * FROM t0 WHERE NOT(t0.c0 <=> 2035382037); -- expected: row is fetched, actual: no row is fetched
    
    Test case LOC: 3
    Oracle: contains


  • #3 Row is not fetched when using a function expression that should yield TRUE

    Links: [bugtracker]
    Date found: 22/06/2019
    Status: fixed
    Highlight: The bug was fixed in 8.0.17, but not necessarily based on our bug report, since it was not referenced.
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0(c0) VALUES(1);
    SELECT * FROM t0 WHERE IF(FALSE, t0.c0, 0.1); -- expected: row is fetched, actual: row is not fetched
    
    Test case LOC: 3
    Oracle: contains


  • #4 XOR operator returns incorrect result for strings with a floating-point number

    Links: [bugtracker]
    Date found: 22/06/2019
    Status: fixed
    Test case:
    SELECT FALSE XOR '0.5'; -- expected: 1, actual: 0
    
    Test case LOC: 1
    Oracle: contains
    Tags: WHITESPACE

  • #5 Duplicate entry for key 'PRIMARY' when querying information_schema.TABLES

    Links: [bugtracker]
    Date found: 22/06/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT) ENGINE = MyISAM;
    select * from information_schema.TABLES; -- unexpected (when executed with multiple threads): Duplicate entry 'triggerbug21-t0' for key 'PRIMARY'
    
    Test case LOC: 2
    Oracle: error (SELECT)


  • #6 CHECK TABLE FOR UPGRADE crashes server (segfault)

    Links: Date found: 23/06/2019
    Status: fixed
    Highlight: This bug report revealed a security vulnerability that was fixed in a Critical Patch Update (CVSSv3.0 Base Score: 4.9)
    Test case:
    DROP DATABASE IF EXISTS test;
    CREATE DATABASE test;
    USE test;
    CREATE TABLE t0(c0 INT);
    CREATE INDEX i0 ON t0((t0.c0 || 1));
    INSERT INTO t0(c0) VALUES(1);
    CHECK TABLE t0 FOR UPGRADE; -- results in a segfault when executed with multiple threads
    
    Test case LOC: 7
    CVE: CVE-2019-2879
    Oracle: segfault
    Tags: INDEX

  • #7 BENCHMARK() returns NULL in some cases but is documented to always return 0

    Links: [bugtracker]
    Date found: 24/06/2019
    Status: fixed (in documentation)
    Test case:
    SELECT BENCHMARK(NULL, 1); -- expected: 0, actual: NULL
    SELECT BENCHMARK(-1, 1); -- expected: 0, actual: NULL
    
    Test case LOC: 2
    Oracle: contains


  • #8 Function return value with newline yields wrong result when used as a boolean

    Links: [bugtracker]
    Date found: 24/06/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 TEXT);
    INSERT IGNORE INTO t0(c0) VALUES("\n123");
    SELECT * FROM t0 WHERE COALESCE(t0.c0); -- expected: row is fetched, actual: no row is fetched
    SELECT * FROM t0 WHERE IFNULL(t0.c0, 1); -- expected: row is fetched, actual: no row is fetched
    
    Test case LOC: 4
    Oracle: contains
    Tags: WHITESPACE

  • #9 TEXT column used as boolean incorrectly evaluates to false

    Links: [bugtracker]
    Date found: 24/06/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 TEXT);
    INSERT INTO t0(c0) VALUES(0.9);
    SELECT * FROM t0 WHERE t0.c0; -- expected: row is fetched, actual: row is not fetched
    
    Test case LOC: 3
    Oracle: contains


  • #10 CAST of negative function return value to UNSIGNED malfunctions with BIGINT

    Links: [bugtracker]
    Date found: 24/06/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 BIGINT UNSIGNED);
    INSERT INTO t0(c0) VALUES(NULL);
    SELECT * FROM t0 WHERE CAST(COALESCE(t0.c0, -1) AS UNSIGNED); -- expected: row is selected, actual: no row is selected
    SELECT * FROM t0 WHERE CAST(IFNULL(t0.c0, -1) AS UNSIGNED); -- expected: row is selected, actual: no row is selected
    
    Test case LOC: 4
    Oracle: contains


  • #11 AND/OR/XOR compute wrong result for small floating-point numbers in TEXT columns

    Links: [bugtracker]
    Date found: 24/06/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 TEXT);
    INSERT INTO t0(c0) VALUES("0.5");
    SELECT * FROM t0 WHERE t0.c0 AND 1; -- expected: 0.5, actual: no row is fetched
    SELECT * FROM t0 WHERE t0.c0 OR 0; -- expected: 0.5, actual: no row is fetched
    SELECT * FROM t0 WHERE t0.c0 XOR 0;  -- expected: 0.5, actual: no row is fetched
    
    Test case LOC: 5
    Oracle: contains


  • #12 The logical operators &, |, and ^ do not ignore newlines in TEXT

    Links: [bugtracker]
    Date found: 24/06/2019
    Status: fixed
    Test case:
    SELECT '\n1' & 1; -- expected: 1, actual: 0
    SELECT '\n1' | 0; -- expected: 1, actual: 0
    SELECT '\n1' ^ 1; -- expected: 0, actual: 1
    
    Test case LOC: 3
    Oracle: contains
    Tags: WHITESPACE

  • #13 Compare that uses UNSIGNED cast and function malfunctions in the MEMORY engine

    Links: [bugtracker]
    Date found: 25/06/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT) ENGINE = MEMORY;
    INSERT INTO t0(c0) VALUES(0);
    INSERT INTO t1(c0) VALUES(-1);
    SELECT * FROM t0, t1 WHERE (CAST(t1.c0 AS UNSIGNED)) > (IFNULL("u", t0.c0)); -- expected: row is fetched, actual: no row is fetched
    
    Test case LOC: 5
    Oracle: contains


  • #14 Setting sort_buffer_size to a large value causes query to go out of memory

    Links: [bugtracker]
    Date found: 25/06/2019
    Status: fixed
    Test case:
    SET SESSION sort_buffer_size = 18446744073709551615;
    CREATE TABLE t0(c0 INT UNIQUE, c1 INT UNIQUE);
    INSERT INTO t0(c0) VALUES(1), (2), (3);
    SELECT * FROM t0 WHERE NOT((t0.c1 IS NULL) AND ((t0.c0) != (1))); -- unexpected: ERROR 5 (HY000): Out of memory (Needed 24 bytes)
    
    Test case LOC: 4
    Oracle: error (SELECT)


  • #15 Unexpected result for IN operator and constants

    Links: [bugtracker]
    Date found: 25/06/2019
    Status: fixed (in documentation)
    Test case:
    SELECT "a" IN (0); -- expected: 0, actual: 1
    
    Test case LOC: 1
    Oracle: contains


  • #16 Query involving &, <, and AND operators computes incorrect result

    Links: [bugtracker]
    Date found: 25/06/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT, c1 TEXT);
    INSERT INTO t0(c0, c1) VALUES(-1, "a");
    SELECT * FROM t0 WHERE t0.c1 < (t0.c0 & t0.c0) AND t0.c0 = -1; -- expected: fetches row, actual: does not fetch the row
    
    Test case LOC: 3
    Oracle: contains


  • #17 Query with GREATEST function malfunctions

    Links: [mail]
    Date found: 26/06/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 TEXT);
    INSERT INTO t0(c0) VALUES ("a");
    SELECT * FROM t0 WHERE GREATEST((-1) & (-1), -t0.c0); -- expected: row is fetched, actual: row is not fetched
    
    Test case LOC: 3
    Oracle: contains


  • #18 A predicate that compares 0 with -0 yields an incorrect result

    Links: [bugreport]
    Date found: 31/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 DOUBLE);
    INSERT INTO t0 VALUES(0);
    INSERT INTO t1 VALUES('-0');
    SELECT * FROM t0, t1 WHERE t0.c0 = t1.c0; -- expected: {0, -0}, actual: {}
    
    Test case LOC: 5


MariaDB

    All our bug reports for MariaDB were verified quickly. However, only one of them was fixed, which is why we have stopped testing this DBMS.

  • #1 UNIQUE constraint causes a query with string comparison to omit a row in the result set

    Links: [bugtracker] [fix]
    Date found: 15/11/2019
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT UNIQUE);
    INSERT INTO t0 VALUES (NULL), (NULL), (NULL), (NULL), (1), (0);
    SELECT * FROM t0 WHERE c0 < '\n2'; -- expected rows with c0=0 and c0=1, actual: only row with c0=0 is fetched
    
    Test case LOC: 3
    Oracle: metamorphic


CockroachDB

  • #1 Generated column causes query to omit a record in the result set

    Links: [bugreport] [fix]
    Date found: 19/01/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 BOOL UNIQUE, c1 INT AS (NULL) STORED);
    INSERT INTO t0 (c0) VALUES (true);
    SELECT * FROM t0 WHERE c0; -- expected: row is fetched, actual: row is not fetched
    
    Test case LOC: 3
    Oracle: metamorphic


  • #2 Crash when using VECTORIZE=experimental_on

    Links: [bugreport] [fix]
    Date found: 19/01/2020
    Status: fixed
    Test case:
    SET SESSION VECTORIZE=experimental_on;
    CREATE TABLE t0(c0 STRING);
    CREATE TABLE t1(c0 STRING UNIQUE NOT NULL);
    SELECT * FROM t0, t1 WHERE t0.c0 NOT BETWEEN t1.c0 AND '' AND (t1.c0 IS NULL); -- crash
    
    Test case LOC: 4
    Oracle: crash


  • #3 Unexpected error when using EXPERIMENTAL SCRUB

    Links: [bugreport] [fix]
    Date found: 20/01/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 STRING UNIQUE, c1 STRING COLLATE en PRIMARY KEY);
    EXPERIMENTAL SCRUB TABLE t0; -- ERROR: scrub-index: unsupported comparison operator: <collatedstring{en}> IS NOT DISTINCT FROM <unknown>
    
    Test case LOC: 2
    Oracle: error


  • #4 DEFAULT value causes unexpected syntax error when executing INSERT

    Links: [bugreport] [fix]
    Date found: 20/01/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 BOOL DEFAULT (NULL BETWEEN ('' COLLATE en) AND ''));
    INSERT INTO t0(c0) VALUES(DEFAULT); -- ERROR: at or near "collate": syntax error
    
    Test case LOC: 2
    Oracle: error


  • #5 TO_ENGLISH(-9223372036854775808) results in an internal error

    Links: [bugreport] [fix]
    Date found: 21/01/2020
    Status: fixed
    Test case:
    SELECT TO_ENGLISH(-9223372036854775808); -- internal error: runtime error: index out of range
    
    Test case LOC: 1
    Oracle: error
    Tags: INTERNAL_ERROR

  • #6 Incorrect result for BETWEEN SYMMETRIC query

    Links: [bugreport] [fix1] [fix2]
    Date found: 21/01/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 BOOL UNIQUE, c1 BOOL CHECK (true));
    INSERT INTO t0(c0) VALUES (true);
    SELECT * FROM t0 WHERE t0.c0 AND (false NOT BETWEEN SYMMETRIC t0.c0 AND NULL AND true); -- unexpected: row is fetched
    
    Test case LOC: 3
    Oracle: metamorphic


  • #7 Internal error for BETWEEN operator and CAST to BYTES

    Links: [bugreport] [fix]
    Date found: 21/01/2020
    Status: fixed
    Test case:
    SELECT '' BETWEEN ''::BYTES AND ''; -- ERROR: internal error: lookup for ComparisonExpr ((@1)[bytes] > ('')[string])[bool]'s CmpOp failed
    
    Test case LOC: 1
    Oracle: error
    Tags: INTERNAL_ERROR

  • #8 Query on VIEW with OFFSET NULL and WHERE condition involving CURRENT_USER() unexpectedly fetches a row

    Links: [bugreport] [fix]
    Date found: 22/01/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 BOOL);
    INSERT INTO t0(c0) VALUES (false);
    CREATE VIEW v0(c0) AS SELECT c0 FROM t0 WHERE t0.c0 OFFSET NULL;
    SELECT * FROM v0 WHERE CURRENT_USER() != ''; -- unexpected: a row is fetched
    
    Test case LOC: 4
    Oracle: metamorphic


  • #9 Incorrect result for query with IS NULL condition on UNIQUE column and VECTORIZE=experimental_on

    Links: [bugreport] [fix]
    Date found: 22/01/2020
    Status: fixed
    Test case:
    SET SESSION VECTORIZE=experimental_on;
    CREATE TABLE t1(c0 INT);
    CREATE TABLE t0(c0 INT UNIQUE);
    INSERT INTO t1(c0) VALUES (0);
    INSERT INTO t0(c0) VALUES (NULL), (NULL);
    SELECT * FROM t0, t1 WHERE t0.c0 IS NULL; -- expected: two rows are fetched, actual: one row is fetched
    
    Test case LOC: 6
    Oracle: metamorphic


  • #10 Internal error setting tracing=true

    Links: [bugreport] [fix]
    Date found: 23/01/2020
    Status: fixed
    Test case:
    SET SESSION tracing=true; -- ERROR: internal error: expected string for set tracing argument, not *tree.DBool
    
    Test case LOC: 1
    Oracle: error
    Tags: INTERNAL_ERROR

  • #11 Internal error for CASE expression and VECTORIZE=experimental_on

    Links: [bugreport] [fix]
    Date found: 23/01/2020
    Status: fixed
    Test case:
    SET SESSION VECTORIZE=experimental_on;
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0 (c0) VALUES (0);
    SELECT * FROM t0 WHERE CASE WHEN t0.c0 > 0 THEN NULL END; --  internal error: unexpected error from the vectorized runtime: Vec is of unknown type and should not be accessed
    
    Test case LOC: 4
    Oracle: error
    Tags: INTERNAL_ERROR

  • #12 Deadlock in SHOW TABLES

    Links: [bugreport] [fix]
    Date found: 26/01/2020
    Status: fixed
    Test case:
    --thread 1
    DROP DATABASE IF EXISTS db0;
    CREATE DATABASE db0;
    USE db0;
    CREATE TABLE t0(c0 INT);
    --thread2
    SHOW TABLES;
    
    Test case LOC: 5
    Oracle: hang


  • #13 Internal error "estimated distinct count must be non-zero"

    Links: [bugreport] [fix]
    Date found: 27/01/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0(rowid) VALUES (0), (1), (2);
    CREATE VIEW v0(c0) AS SELECT CASE WHEN t0.c0 > 0 THEN 1 ELSE t0.rowid END FROM t0;
    CREATE STATISTICS s0 FROM t0;
    DELETE FROM t0;
    INSERT INTO t0(rowid) VALUES (3);
    INSERT INTO t0(rowid) VALUES (4);
    CREATE STATISTICS s1 ON rowid FROM t0;
    SELECT * FROM v0 WHERE v0.c0 > 0; -- internal error: estimated distinct count must be non-zero
    
    Test case LOC: 9
    Oracle: error
    Tags: INTERNAL_ERROR

  • #14 Multi-record UPSERT inserts duplicate values in PRIMARY KEY, resulting in inconsistent results

    Links: [bugreport] [fix]
    Date found: 29/01/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT PRIMARY KEY, c1 BOOL, c2 INT UNIQUE);
    INSERT INTO t0(c0) VALUES (0);
    UPSERT INTO t0(c2, c0) VALUES (0, 0), (1, 0);
    SELECT * FROM t0; -- {0 | NULL | 1}
    
    Test case LOC: 4
    Oracle: metamorphic


  • #15 Internal error for NATURAL JOIN and VECTORIZE='experimental_on'

    Links: [bugreport] [fix]
    Date found: 30/01/2020
    Status: fixed
    Test case:
    SET SESSION VECTORIZE='experimental_on';
    CREATE TABLE t0(c0 INT4);
    CREATE TABLE t1(c0 INT8);
    INSERT INTO t0(c0) VALUES(0);
    INSERT INTO t1(c0) VALUES(0);
    SELECT * FROM t0 NATURAL JOIN t1; -- internal error: unexpected error from the vectorized runtime: interface conversion: coldata.column is []int32, not []int64
    
    Test case LOC: 6
    Oracle: error
    Tags: INTERNAL_ERROR

  • #16 Server exits on query with LEFT JOIN

    Links: [bugreport] [fix]
    Date found: 30/01/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    SELECT * FROM t0 LEFT JOIN t1 ON true LIMIT -1; -- causes server to exit
    
    Test case LOC: 3
    Oracle: crash


  • #17 Internal error for ILIKE_ESCAPE and special characters

    Links: [bugreport] [fix]
    Date found: 01/01/2020
    Status: fixed
    Test case:
    SELECT ILIKE_ESCAPE('a', '꧕', '�'); -- internal error: runtime error: index out of range [2] with length 1
    
    Test case LOC: 1
    Oracle: error
    Tags: INTERNAL_ERROR

  • #18 Complex ORDER BY clause results in internal error with VECTORIZE=experimental_on

    Links: [bugreport] [fix]
    Date found: 01/01/2020
    Status: fixed
    Test case:
    SET SESSION VECTORIZE=experimental_on;
    CREATE TABLE t0(c0 STRING, c1 BOOL, c2 INT);
    INSERT INTO t0(c0) VALUES('');
    INSERT INTO t0(rowid, c1, c0) VALUES(0, true, '');
    SELECT * FROM t0 ORDER BY CASE WHEN t0.c1 IS NULL THEN t0.c0 WHEN true THEN t0.c0 END; -- unexpected error from the vectorized runtime: cannot overwrite value on flat Bytes: maxSetIndex=1, setIndex=0, consider using Reset
    
    Test case LOC: 5
    Oracle: error
    Tags: INTERNAL_ERROR

  • #19 Internal error for SUBSTRING with negative length and VECTORIZE=experimental_on

    Links: [bugreport]
    Date found: 02/01/2020
    Status: fixed
    Test case:
    SET SESSION VECTORIZE=experimental_on;
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0(c0) VALUES(0);
    SELECT * FROM t0 WHERE SUBSTRING('', 0, -1) = ''; -- unexpected error from the vectorized runtime: negative substring length -1 not allowed
    
    Test case LOC: 4
    Oracle: error
    Tags: INTERNAL_ERROR

  • #20 Internal error for arithmetic operators and NULLIF

    Links: [bugreport] [fix]
    Date found: 03/01/2020
    Status: fixed
    Test case:
    SELECT NULLIF(NULL, 0) + NULLIF(NULL, 0); -- internal error: could not find overload for binary expression plus
    
    Test case LOC: 1
    Oracle: error
    Tags: INTERNAL_ERROR

  • #21 Internal error for query with negative LIMIT on view with negative LIMIT

    Links: [bugreport] [fix]
    Date found: 04/01/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE VIEW v0(c0) AS SELECT 1 FROM t0 LIMIT -1;
    SELECT DISTINCT t0.c0 FROM t0, v0 LIMIT -1; -- internal error: runtime error: invalid memory address or nil pointer dereference
    
    Test case LOC: 3
    Oracle: error
    Tags: INTERNAL_ERROR

  • #22 Internal error for case expression involving NULLIF and VECTORIZE=experimental_on

    Links: [bugreport] [fix]
    Date found: 04/01/2020
    Status: fixed
    Test case:
    SET SESSION VECTORIZE=experimental_on;
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0(c0) VALUES (0);
    SELECT * FROM t0 WHERE 0 > (CASE WHEN NULLIF(NULL, ILIKE_ESCAPE('', CURRENT_USER(), '')) THEN 0 ELSE t0.c0 END);
    
    Test case LOC: 4
    Oracle: error
    Tags: INTERNAL_ERROR

  • #23 FULL JOIN with an SUBSTRING ON clause results in an internal error

    Links: [bugreport] [fix]
    Date found: 05/01/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c1 INT);
    SELECT * FROM t0 FULL JOIN t1 ON (SUBSTRING('', ')') = '') = (t1.c1 > 0); -- cannot map variable 3 to an indexed var
    
    Test case LOC: 3
    Oracle: error
    Tags: INTERNAL_ERROR

  • #24 NOT BETWEEN query on VIEW results in an internal error with VECTORIZE=experimental_on

    Links: [bugreport] [fix]
    Date found: 06/02/2020
    Status: fixed
    Test case:
    SET SESSION VECTORIZE=experimental_on;
    CREATE TABLE t0(c0 BYTES);
    CREATE VIEW v0(c0) AS SELECT MIN(t0.c0) FROM t0;
    SELECT * FROM v0 WHERE v0.c0 NOT BETWEEN v0.c0 AND v0.c0; -- ERROR: internal error: unexpected error from the vectorized runtime: runtime error: index out of range [2047] with length 1024
    
    Test case LOC: 4
    Oracle: error
    Tags: INTERNAL_ERROR

  • #25 Internal error for SUBSTRING, INT4 cast, and VECTORIZE=experimental_on

    Links: [bugreport] [fix]
    Date found: 07/02/2020
    Status: fixed
    Test case:
    SET SESSION VECTORIZE=experimental_on;
    CREATE TABLE t0(c0 BOOL);
    INSERT INTO t0(c0) VALUES(true);
    SELECT * FROM t0 WHERE SUBSTRING('', 0, t0.c0::INT4) > ''; -- ERROR: internal error: unexpected error from the vectorized runtime: interface conversion: coldata.column is []int32, not []int64
    
    Test case LOC: 4
    Oracle: error
    Tags: INTERNAL_ERROR

  • #26 Internal error when setting VECTORIZE = experimental_on and DEFAULT_INT_SIZE = 4

    Links: [bugreport] [fix]
    Date found: 09/02/2020
    Status: fixed
    Test case:
    SET VECTORIZE = experimental_on;
    SET DEFAULT_INT_SIZE = 4;
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0 VALUES(0);
    SELECT CAST(0 BETWEEN(CASE NULL WHEN t0.c0 = 0 THEN NULL END) AND 0 IS TRUE AS INT) FROM t0; -- ERROR: internal error: unexpected error from the vectorized runtime: interface conversion: coldata.column is []int64, not []int32
    
    Test case LOC: 5
    Oracle: error
    Tags: INTERNAL_ERROR

  • #27 EXPERIMENTAL SCRUB TABLE crashes server for table with TIMESTAMP column

    Links: [bugreport] [fix]
    Date found: 12/02/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 TIMESTAMP UNIQUE);
    INSERT INTO t0(c0) VALUES(TIMESTAMP '1969-1-1');
    INSERT INTO t0(c0) VALUES(TIMESTAMP '1969-1-2');
    EXPERIMENTAL SCRUB TABLE t0; -- crashes server
    
    Test case LOC: 4
    Oracle: crash


  • #28 Internal error for VECTORIZE=experimental_on, DEFAULT_INT_SIZE=4, and aggregate query

    Links: [bugreport] [fix]
    Date found: 12/02/2020
    Status: fixed
    Test case:
    SET VECTORIZE=experimental_on;
    SET DEFAULT_INT_SIZE=4;
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0 VALUES(NULL);
    SELECT SUM(c) FROM (SELECT CAST((IF(IF(false, false, c0 IS NULL), NULL, NULL)) BETWEEN 0 AND 0 IS TRUE AS INT) c FROM t0); -- internal error: unexpected error from the vectorized runtime: interface conversion: coldata.column is []int64, not []int32
    
    Test case LOC: 5
    Oracle: error


  • #29 COUNT_ROWS() malfunctions for GROUP BY

    Links: [bugreport] [fix]
    Date found: 26/02/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE VIEW v0(c0) AS SELECT COUNT_ROWS() FROM t0 GROUP BY 0+0;
    SELECT * FROM v0; -- expected: {}, actual: {0}
    
    Test case LOC: 3
    Oracle: contains


  • #30 EXPLAIN (VEC) SELECT results in an internal error "zero length schema unsupported"

    Links: [bugreport] [fix]
    Date found: 14/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 STRING);
    CREATE TABLE t1(c0 STRING);
    EXPLAIN (VEC) SELECT t0.c0 FROM t0, t1; -- unexpected error from the vectorized runtime: zero length schema unsupported
    
    Test case LOC: 3
    Oracle: error


  • #31 EXPLAIN (VEC) SELECT results in an internal error "input to aggregatorBase is not an execinfra.OpNode"

    Links: [bugreport] [fix]
    Date found: 14/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    EXPLAIN (VEC) SELECT STDDEV(0) FROM t0 WHERE ('' COLLATE en)::BOOL; -- internal error: unexpected error from the vectorized runtime: 
    
    Test case LOC: 2
    Oracle: error


  • #32 Incorrect result for MAX, INTERLEAVE IN PARENT, and vectorize=experimental_on

    Links: [bugreport] [fix]
    Date found: 16/03/2020
    Status: fixed
    Test case:
    SET vectorize=experimental_on;
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 BOOL) INTERLEAVE IN PARENT t0(rowid);
    INSERT INTO t0(c0) VALUES (0);
    INSERT INTO t1(rowid, c0) VALUES(0, TRUE);
    SELECT MAX(t1.rowid) FROM t1 WHERE t1.c0; -- { NULL }
    
    Test case LOC: 6


  • #33 Query with negative LIMIT results in an internal error "node lookup-join with MaxCost added to the memo"

    Links: [bugreport] [fix]
    Date found: 17/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT UNIQUE);
    CREATE TABLE t1(c0 INT);
    CREATE VIEW v0(c0) AS SELECT 0 FROM t1 LIMIT -1;
    SELECT * FROM v0, t0 NATURAL JOIN t1 LIMIT -1; -- internal error: node lookup-join with MaxCost added to the memo
    
    Test case LOC: 4
    Oracle: error


  • #34 VALUES table expression malfunctions with MAX

    Links: [bugreport] [fix]
    Date found: 17/03/2020
    Status: fixed
    Test case:
    SELECT MAX(t0.c0) FROM (VALUES (NULL), (NULL)) t0(c0); -- expected: {NULL}, actual: {NULL, NULL}
    
    Test case LOC: 1
    Oracle: notable


  • #35 DROP DATABASE issue with TEMP tables

    Links: [bugreport] [fix]
    Date found: 21/03/2020
    Status: fixed
    Test case:
    CREATE DATABASE db11;
    USE db11;
    SET experimental_enable_temp_tables = 'on';
    CREATE TEMP TABLE t0(c0 INT); -- end session
    DROP DATABASE db11 CASCADE; -- cannot access temporary tables of other sessions
    
    Test case LOC: 5
    Oracle: error


  • #36 UPSERT causes a decoding error in collated string column

    Links: [bugreport] [fix]
    Date found: 21/03/2020
    Status: fixed
    Highlight: https://github.com/cockroachdb/cockroach/pull/46570#pullrequestreview-381413671
    Test case:
    CREATE TABLE t0(c0 BOOL, c1 STRING COLLATE en);
    CREATE INDEX ON t0(rowid, c1 DESC);
    INSERT INTO t0(c1, rowid) VALUES('' COLLATE en, 0);
    UPSERT INTO t0(rowid) VALUES (0), (1); -- error decoding 11 bytes: did not find marker 0x12 in buffer 0x13ff00ff00ff00ff00fffe
    
    Test case LOC: 4
    Oracle: error


  • #37 INSERT ... DO NOTHING results in an error "UPSERT or INSERT...ON CONFLICT command cannot affect row a second time"

    Links: [bugreport] [fix]
    Date found: 21/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT UNIQUE DEFAULT 0);
    INSERT INTO t0(rowid) VALUES (0), (1) ON CONFLICT (c0) DO NOTHING; -- UPSERT or INSERT...ON CONFLICT command cannot affect row a second time
    
    Test case LOC: 2
    Oracle: error


  • #38 UPSERT on table with FOREIGN KEY constraint results in an internal error "cannot convert int to type bool"

    Links: [bugreport] [fix]
    Date found: 21/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 BOOL, c1 SERIAL2 CHECK (FALSE), FOREIGN KEY (c1) REFERENCES t0(rowid));
    UPSERT INTO t1(c0) VALUES (false); -- internal error: cannot convert int to type bool
    
    Test case LOC: 3
    Oracle: error


  • #39 NATURAL JOIN fails with "duplicate column name" on view

    Links: [bugreport] [fix]
    Date found: 21/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE VIEW v0(c0, c1) AS SELECT DISTINCT c0, c0 FROM t0;
    SELECT * FROM v0 NATURAL JOIN t0; -- duplicate column name: "c1"
    
    Test case LOC: 3
    Oracle: error


  • #40 EXPLAIN (VEC) results in an internal error "input to aggregatorBase is not an execinfra.OpNode"

    Links: [bugreport] [fix]
    Date found: 21/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    EXPLAIN (VEC) SELECT STDDEV((t1.c0 > ANY (0, 0))::INT) FROM t0, t1 GROUP BY t0.rowid; -- unexpected error from the vectorized runtime: input to aggregatorBase is not an execinfra.OpNode
    
    Test case LOC: 3
    Oracle: error


  • #41 HAVING clause incorrectly evaluates to TRUE for VARIANCE(0) IS NOT NULL predicate

    Links: [bugreport] [fix]
    Date found: 22/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0(c0) VALUES(0);
    SELECT t0.c0 FROM t0 GROUP BY t0.c0 HAVING NOT (VARIANCE(0) IS NULL); -- expected: {}, actual: {0}
    
    Test case LOC: 3


  • #42 Internal error for vectorize=on and multiplication of INT4 values

    Links: [bugreport] [fix]
    Date found: 29/03/2020
    Status: fixed
    Test case:
    SET vectorize=on;
    CREATE TABLE t0(c0 INT4);
    CREATE TABLE t1(c0 INT4);
    INSERT INTO t0(c0) VALUES(0);
    INSERT INTO t1(c0) VALUES (0);
    SELECT 1 FROM t0, t1 GROUP BY t0.c0 * t1.c0; -- unexpected error from the vectorized runtime: interface conversion: coldata.column is []int32, not []int64
    
    Test case LOC: 6
    Oracle: error


  • #43 Internal error: lookup for ComparisonExpr ((@2)[float] != ('NaN')[string])[bool]'s CmpOp failed

    Links: [bugreport] [fix]
    Date found: 02/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    SELECT * FROM t0 GROUP BY t0.c0 HAVING MIN((CASE WHEN false THEN NULL END):::FLOAT) IS NOT NAN; -- internal error: lookup for ComparisonExpr ((@2)[float] != ('NaN')[string])[bool]'s CmpOp failed
    
    Test case LOC: 2
    Oracle: error


  • #44 CREATE STATISTICS on table with ARRAY column

    Links: [bugreport] [fixed]
    Date found: 03/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 STRING[]);
    INSERT INTO t0(c0) VALUES(ARRAY[]);
    CREATE STATISTICS s0 ON c0 FROM t0; -- ERROR: unable to encode table key: *tree.DArray
    
    Test case LOC: 3
    Oracle: error


  • #45 Comparison with (-9223372036854775808)::TIMESTAMP results in an unexpected error

    Links: [bugreport] [fix]
    Date found: 03/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 TIMESTAMP UNIQUE);
    SELECT * FROM t0 WHERE (-9223372036854775808)::TIMESTAMP!=t0.c0; -- ERROR: unordered spans (/Table/1208/2/{!NULL-292277026596-12-04T15:30:07.999999001Z} /Table/1208/{2/292277026596-12-04T15:30:08.000001Z-3})
    
    Test case LOC: 2
    Oracle: error


  • #46 Query with an invalid regular expression unexpectedly does not fail

    Links: [bugreport] [fix]
    Date found: 03/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE VIEW v0(c0) AS SELECT COUNT_ROWS() FROM t0;
    SELECT * FROM v0 WHERE '' !~ '+'; -- expected: error parsing regexp: missing argument to repetition operator: `+`, actual: {}
    
    Test case LOC: 3


  • #47 Incorrect result for query on interleaved index when vectorize=on

    Links: [bugreport] [fix]
    Date found: 04/04/2020
    Status: fixed
    Test case:
    SET vectorize=on;
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    INSERT INTO t0(c0) VALUES(0);
    INSERT INTO t1(c0) VALUES(NULL);
    CREATE INDEX ON t1(c0) INTERLEAVE IN PARENT t0(c0);
    SELECT * FROM t0 WHERE t0.rowid > 0; -- expected: {}, actual: {0}
    
    Test case LOC: 7


  • #48 TRUNCATE on temporary table results in "unexpected value: <nil>"

    Links: [bugreport] [fix]
    Date found: 04/04/2020
    Status: fixed
    Test case:
    SET experimental_enable_temp_tables = 'on';
    CREATE TEMP TABLE t0(c0 INT);
    TRUNCATE t0; -- ERROR: unexpected value: <nil>
    
    Test case LOC: 3
    Oracle: error


  • #49 Internal error for an invalid CREATE INDEX statement

    Links: [bugreport] [fix]
    Date found: 04/04/2020
    Status: fixed
    Test case:
    set experimental_enable_hash_sharded_indexes = 'on';
    CREATE TABLE t0();
    CREATE INDEX ON t0(c0) USING HASH WITH BUCKET_COUNT = 1;
    
    Test case LOC: 3
    Oracle: error


  • #50 SELECT statement on table with a hash-sharded index results in an internal error

    Links: [bugreport] [fix]
    Date found: 04/04/2020
    Status: fixed
    Test case:
    set experimental_enable_hash_sharded_indexes = 'on';
    CREATE TABLE t0(c0 INT);
    CREATE INDEX ON t0(c0) USING HASH WITH BUCKET_COUNT = 1;
    SELECT 1 FROM t0 WHERE 0 < rowid GROUP BY crdb_internal_c0_shard_1, c0 ORDER BY crdb_internal_c0_shard_1; -- ERROR: internal error: no output column equivalent to 1
    
    Test case LOC: 4
    Oracle: error


  • #51 ORDER BY unexpectedly causes a value to be represented in E notation when VECTORIZE=on

    Links: [bugreport] [fix]
    Date found: 07/04/2020
    Status: fixed
    Test case:
    SET SESSION VECTORIZE=on;
    CREATE TABLE t0 (c0 DECIMAL PRIMARY KEY, c1 INT UNIQUE);
    INSERT INTO t0(c0) VALUES (1819487610);
    SELECT t0.c0 FROM t0 ORDER by t0.c1; -- expected: {1819487610}, actual: {1.81948761E+9}
    
    Test case LOC: 4


  • #52 Column that is used both as an INT2 and INT4 results in an internal error

    Links: [bugreport] [fix]
    Date found: 07/04/2020
    Status: fixed
    Test case:
    SET vectorize=on;
    CREATE TABLE t0(c0 INT2 UNIQUE);
    INSERT INTO t0 VALUES(1);
    SELECT * FROM t0 WHERE (t0.c0 + t0.c0::INT4) = 0; -- unexpected error from the vectorized runtime: interface conversion: coldata.column is []int32, not []int64
    
    Test case LOC: 4
    Oracle: error


  • #53 BETWEEN expression with an INTERVAL and DECIMAL cast results in an incorrect result

    Links: [bugreport] [fix]
    Date found: 10/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 DECIMAL UNIQUE);
    INSERT INTO t0(c0) VALUES(0);
    SELECT t0.c0 FROM t0 WHERE t0.c0 BETWEEN t0.c0 AND INTERVAL '-1'::DECIMAL; -- expected: {}, actual: {0}
    
    Test case LOC: 3


TiDB

  • #1 Double negation causes incorrect result

    Links: [bugreport] [fix]
    Date found: 26/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0(c0) VALUES (2);
    SELECT t0.c0 FROM t0 WHERE (NOT NOT t0.c0) = t0.c0; -- expected: {}, actual: {2}
    
    Test case LOC: 3


  • #2 Incorrect result for an UNION query and a generated column

    Links: [bugreport]
    Date found: 26/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT, c1 TEXT AS (0.9));
    INSERT INTO t0(c0) VALUES (0);
    SELECT 0 FROM t0 WHERE false UNION SELECT 0 FROM t0 WHERE NOT t0.c1; -- expected: {0}, actual: {}
    
    Test case LOC: 3


  • #3 ANALYZE TABLE causes SIGSEGV on latest trunk

    Links: [bugreport] [fix]
    Date found: 26/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT UNIQUE, c2 INT UNIQUE);
    REPLACE INTO t0(c0, c2) VALUES (0, 0), (0, 0), (0, 1);
    ANALYZE TABLE t0; -- SIGSEGV
    
    Test case LOC: 3
    Oracle: crash


  • #4 ANALYZE TABLE results in "analyze worker panic" with tidb_enable_fast_analyze=1

    Links: [bugreport] [fix]
    Date found: 26/03/2020
    Status: fixed
    Test case:
    set @@tidb_enable_fast_analyze=1;
    CREATE TABLE t0(c0 INT, c1 INT, PRIMARY KEY(c0, c1));
    INSERT INTO t0 VALUES (0, 0);
    ANALYZE TABLE t0; -- analyze worker panic
    
    Test case LOC: 4
    Oracle: error


  • #5 ANALYZE TABLE results in "invalid encoded key" with tidb_enable_fast_analyze=1

    Links: [bugreport] [fix]
    Date found: 26/03/2020
    Status: fixed
    Test case:
    set @@tidb_enable_fast_analyze=1;
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0 VALUES (0);
    CREATE INDEX i0 ON t0(c0);
    ANALYZE TABLE t0 INDEX i0; -- invalid encoded key
    
    Test case LOC: 5
    Oracle: error


  • #6 COLLATE causes an incorrect result in the presence of an index

    Links: [bugreport] [fix]
    Date found: 27/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT, c1 CHAR);
    CREATE INDEX i0 ON t0(c1, c0);
    INSERT INTO t0(c1) VALUES (0);
    SELECT t0.c0 FROM t0 WHERE t0.c1 = CHAR(1 COLLATE 'latin1_bin'); -- expected: {}, actual: {NULL}
    
    Test case LOC: 4


  • #7 Unexpected "Data truncation: %s value is out of range in '%s'" error in UNION query

    Links: [bugreport] [fix]
    Date found: 27/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0(c0) VALUES (0);
    SELECT * FROM t0 WHERE -10000000000000000000 | t0.c0 UNION SELECT * FROM t0; -- unexpected: %s value is out of range in '%s'
    
    Test case LOC: 3
    Oracle: error


  • #8 GROUP BY clause nondeterministically results in an incorrect result or error

    Links: [bugreport] [fix]
    Date found: 29/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT, c1 INT);
    CREATE TABLE t1(c0 INT, c1 INT);
    CREATE TABLE t2(c0 INT, c1 INT );
    INSERT INTO t1(c0) VALUES (8, 58), (19, 79);
    INSERT INTO t1 VALUES (22, 19), (91, 69);
    INSERT INTO t0 VALUES (29, 5), (11, NULL);
    INSERT INTO t1 VALUES (NULL, 60), (0, 49), (23, NULL);
    INSERT INTO t1(c1, c0) VALUES (58, 33), (11, 82);
    INSERT INTO t1 VALUES (18, 65), (33, 10), (31, 13), (98, 30);
    INSERT INTO t1(c0, c1) VALUES (NULL, 8), (17, 99), (70, 63), (22, 28);
    INSERT INTO t2(c0, c1) VALUES (90, NULL), (88, 89), (11, 26);
    INSERT INTO t0 VALUES (75, 68);
    INSERT INTO t0(c0, c1) VALUES (54, 19);
    INSERT INTO t1 VALUES (14, 53);
    INSERT INTO t1 VALUES (72, NULL);
    INSERT INTO t0 VALUES (29, 94), (48, 3);
    INSERT INTO t0(c0, c1) VALUES (29, 9), (66, 39);
    INSERT INTO t2 VALUES (92, 75);
    INSERT INTO t2(c1) VALUES (23), (67);
    INSERT INTO t1 VALUES (69, NULL), (NULL, 78);
    INSERT INTO t0(c0) VALUES (71), (59);
    INSERT INTO t2 VALUES (97, 8), (92, 45);
    INSERT INTO t1 VALUES (37, 57), (46, 89);
    INSERT INTO t1(c1) VALUES (51);
    INSERT INTO t0 VALUES (24, 70), (14, 87);
    INSERT INTO t2 VALUES (33, NULL), (77, 68);
    INSERT INTO t1 VALUES (48, 44);
    INSERT INTO t2(c0, c1) VALUES (56, 51), (80, NULL), (NULL, 27);
    INSERT INTO t0(c0) VALUES (88), (90), (58);
    INSERT INTO t2 VALUES (43, 16);
    ANALYZE TABLE t1, t2;
    SELECT t1.c0 LIKE t1.c0 FROM t1, t2, t0 GROUP BY t1.c0 LIKE t1.c0; -- non-deterministic result or "runtime error: index out of range [1] with length 1"
    
    Test case LOC: 32
    Oracle: qp-groupby


  • #9 A predicate column1 = -column2 incorrectly evaluates to false for 0 values

    Links: [bugreport] [fix]
    Date found: 29/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 FLOAT);
    CREATE TABLE t1(c0 FLOAT);
    INSERT INTO t1(c0) VALUES (0);
    INSERT INTO t0(c0) VALUES (0);
    SELECT t1.c0 FROM t1, t0 WHERE t0.c0=-t1.c0; -- expected: {0}, actual: {}
    
    Test case LOC: 5


  • #10 Join on tables with redundant indexes causes a server panic

    Links: [bugreport] [fix]
    Date found: 29/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT PRIMARY KEY);
    CREATE TABLE t1(c0 INT PRIMARY KEY);
    CREATE INDEX i0 ON t1(c0);
    CREATE INDEX i0 ON t0(c0);
    SELECT * FROM t0, t1 WHERE t1.c0=t0.c0;
    
    Test case LOC: 5
    Oracle: crash


  • #11 Incorrect result for LEFT JOIN and NULL values

    Links: [bugreport] [fix]
    Date found: 30/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(t0 INT UNIQUE);
    CREATE TABLE t1(c0 FLOAT);
    INSERT INTO t1(c0) VALUES (0);
    INSERT INTO t0(t0) VALUES (NULL), (NULL);
    SELECT t1.c0 FROM t1 LEFT JOIN t0 ON 1; -- expected: {0, 0}, actual: {0}
    
    Test case LOC: 5


  • #12 Query with a NATURAL LEFT JOIN unexpectedly results in an error

    Links: [bugreport] [fix]
    Date found: 30/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 TEXT);
    CREATE VIEW v0(c0) AS SELECT NULL;
    SELECT * FROM v0 NATURAL LEFT JOIN t0; -- unsupport column type for encode 6
    
    Test case LOC: 3
    Oracle: error


  • #13 Query with RIGHT JOIN causes a server panic

    Links: [bugreport] [fix]
    Date found: 30/03/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE VIEW v0(c0) AS SELECT 0 FROM t0 ORDER BY -t0.c0;
    SELECT * FROM v0 RIGHT JOIN t0 ON false; -- connection running loop panic
    
    Test case LOC: 3
    Oracle: crash


  • #14 Incorrect result for a predicate that uses the CHAR() function

    Links: [bugreport] [fix]
    Date found: 01/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0(c0) VALUES (0);
    SELECT t0.c0 FROM t0 WHERE CHAR(204355900); -- expected: {0}, actual: {}
    
    Test case LOC: 3


  • #15 LIKE operator malfunctions for COLLATE 'latin1_bin'

    Links: [bugreport] [fix]
    Date found: 01/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT, c1 TEXT(10), PRIMARY KEY(c0));
    CREATE INDEX i0 ON t0(c1(10));
    INSERT INTO t0(c0, c1) VALUES (0, NULL);
    SELECT * FROM t0 WHERE t0.c1 LIKE '@%' COLLATE 'latin1_bin'; -- expected: {}, actual: {0, NULL}
    
    Test case LOC: 4


  • #16 Using a column both in a string comparison and as a boolean yields an incorrect result

    Links: [bugreport] [fix]
    Date found: 01/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 TEXT(10));
    INSERT INTO t0(c0) VALUES (1);
    CREATE INDEX i0 ON t0(c0(10));
    SELECT * FROM t0 WHERE ('a' != t0.c0) AND t0.c0; -- expected: {1}, actual: {}
    
    Test case LOC: 4


  • #17 A USE_INDEX_MERGE hint causes a server panic

    Links: [bugreport] [fix]
    Date found: 01/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT, c1 INT, PRIMARY KEY(c1));
    CREATE INDEX i0 ON t0(c0);
    SELECT /*+ USE_INDEX_MERGE(t0, PRIMARY) */ * FROM t0 WHERE 1 OR t0.c1;
    
    Test case LOC: 3
    Oracle: error


  • #18 USE_INDEX_MERGE on table with generated column causes a server crash

    Links: [bugreport] [fix]
    Date found: 01/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT, c1 INT AS (c0));
    CREATE INDEX i0 ON t0(c1);
    SELECT /*+ USE_INDEX_MERGE(t0, c0_2) */ t0.c0 FROM t0 UNION ALL SELECT 0 FROM t0;
    
    Test case LOC: 3
    Oracle: crash


  • #19 fast ANALYZE TABLE on INDEX PRIMARY causes an error "analyze worker panic"

    Links: [bugreport] [fix]
    Date found: 01/04/2020
    Status: fixed
    Test case:
    set @@tidb_enable_fast_analyze=1;
    CREATE TABLE t0(c0 INT PRIMARY KEY);
    ANALYZE TABLE t0 INDEX PRIMARY; -- analyze worker panic
    
    Test case LOC: 3
    Oracle: error


  • #20 USE_INDEX_MERGE results in an incorrect result for a generated column

    Links: [bugreport] [fix]
    Date found: 01/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT AS (1), c1 INT PRIMARY KEY);
    INSERT INTO t0(c1) VALUES (0);
    CREATE INDEX i0 ON t0(c0);
    SELECT /*+ USE_INDEX_MERGE(t0, i0, PRIMARY)*/ t0.c0 FROM t0 WHERE t0.c1 OR t0.c0;
    SELECT t0.c0 FROM t0 WHERE t0.c1 OR t0.c0; -- expected: {1}, actual: {NULL}
    
    Test case LOC: 5


  • #21 SELECT on table with generated column causes a server panic

    Links: [bugreport] [fix]
    Date found: 02/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 CHAR AS (c1) UNIQUE, c1 INT);
    INSERT INTO t0(c1) VALUES (0), (1);
    SELECT * FROM t0; -- connection running loop panic
    
    Test case LOC: 3
    Oracle: error


  • #22 RIGHT JOIN with CONCAT_WS fails to fetch a row

    Links: [bugreport] [fix]
    Date found: 02/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    INSERT INTO t0(c0) VALUES (NULL);
    SELECT * FROM t1 RIGHT JOIN t0 ON TRUE WHERE CONCAT_WS(t0.c0=t0.c0, 0, NULL) IS NULL; -- expected: {NULL}, actual: {}
    
    Test case LOC: 4


  • #23 INSERT IGNORE causes an incorrect result for a query on a DECIMAL column

    Links: [bugreport] [fix]
    Date found: 02/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 NUMERIC PRIMARY KEY);
    INSERT IGNORE INTO t0(c0) VALUES (NULL);
    SELECT * FROM t0 WHERE c0; -- expected: {}, actual: {0}
    
    Test case LOC: 3


  • #24 REGEXP predicate unexpectedly results in an error "No valid regexp pattern found"

    Links: [bugreport] [fix]
    Date found: 02/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    INSERT INTO t0 VALUES (NULL), (1);
    INSERT INTO t1 VALUES (0);
    SELECT t0.c0 FROM t0 JOIN t1 ON (t0.c0 REGEXP 1) | t1.c0  WHERE BINARY STRCMP(t1.c0, t0.c0); --  No valid regexp pattern found
    
    Test case LOC: 5
    Oracle: error


  • #25 NATURAL LEFT JOIN with a NOT predicate results in a server panic

    Links: [bugreport] [fix]
    Date found: 15/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    SELECT * FROM t1 NATURAL LEFT JOIN t0 WHERE NOT t1.c0;
    
    Test case LOC: 3
    Oracle: error


  • #26 A predicate with COLLATE 'binary' results in a server panic "invalid memory address or nil pointer dereference"

    Links: [bugreport] [fix]
    Date found: 23/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    SELECT * FROM t1 LEFT JOIN t0 ON TRUE WHERE BINARY EXPORT_SET(0, 0, 0 COLLATE 'binary', t0.c0, 0 COLLATE 'binary'); -- server panic
    
    Test case LOC: 3
    Oracle: error


DuckDB

    The DuckDB developers fixed our bugs at an impressive speed, which allowed us to extensively test this DBMS.

  • #1 A predicate NOT(NULL OR TRUE) unexpectedly evaluates to TRUE

    Links: [bugreport] [fix1] [fix2]
    Date found: 07/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0(c0) VALUES (0);
    SELECT * FROM t0 WHERE NOT(NULL OR TRUE); -- expected: {}, actual: {1}
    
    Test case LOC: 3


  • #2 A comparison column=column unexpectedly evaluates to TRUE for column=NULL

    Links: [bugreport] [fix]
    Date found: 07/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0(c0) VALUES (NULL);
    SELECT * FROM t0 WHERE c0 = c0; -- expected: {}, actual: {NULL}
    
    Test case LOC: 3


  • #3 PRAGMA table_info provides no output

    Links: [bugreport] [fix]
    Date found: 07/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    PRAGMA table_info('t0'); -- expected: {0|c0|INTEGER|false|NULL|false}, actual: {}
    
    Test case LOC: 2
    Oracle: manuel


  • #4 SIMILAR TO results in an "Unknown error -1"

    Links: [bugreport] [fix]
    Date found: 08/04/2020
    Status: fixed
    Test case:
    SELECT '' SIMILAR TO ''; -- Error: Unknown error -1
    
    Test case LOC: 1
    Oracle: error


  • #5 Comparison on UNIQUE NUMERIC column causes a query to omit a row in the result set

    Links: [bugreport] [fix]
    Date found: 08/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 NUMERIC UNIQUE);
    INSERT INTO t0(c0) VALUES (1163404482), (0), (488566);
    SELECT * FROM t0 WHERE 0.1 < c0; -- expected: {}, actual: {1163404482.0, 488566.0}
    
    Test case LOC: 3


  • #6 INSERT causes an abort with "terminate called after throwing an instance of 'duckdb::InvalidTypeException'"

    Links: [bugreport] [fix]
    Date found: 08/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 BOOLEAN, c1 INT);
    CREATE INDEX i0 ON t0(c1, c0);
    INSERT INTO t0(c1) VALUES (0); -- terminate called after throwing an instance of 'duckdb::InvalidTypeException'
    
    Test case LOC: 3
    Oracle: crash


  • #7 Comparison of two boolean columns in different tables results in an error "Not implemented: Unimplemented type for sort"

    Links: [bugreport] [fix]
    Date found: 08/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 BOOL);
    CREATE TABLE t1(c0 BOOL);
    INSERT INTO t1(c0) VALUES (0);
    INSERT INTO t0(c0) VALUES (0);
    SELECT t0.c0 FROM t0, t1 WHERE t1.c0 < t0.c0; -- Error: Not implemented: Unimplemented type for sort
    
    Test case LOC: 5
    Oracle: error


  • #8 SELECT causes JDBC driver to crash

    Links: [bugreport] [fix]
    Date found: 09/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 VARCHAR, c1 DOUBLE);
    CREATE TABLE t1(c0 DOUBLE, PRIMARY KEY(c0));
    INSERT INTO t0(c0) VALUES (0), (0), (0), (0);
    INSERT INTO t0(c0) VALUES (NULL), (NULL);
    INSERT INTO t1(c0) VALUES (0), (1);
    
    SELECT t0.c0 FROM t0, t1; -- A fatal error has been detected by the Java Runtime Environment
    
    Test case LOC: 6
    Oracle: crash


  • #9 RIGHT JOIN with a predicate that compares two integer columns results in an "Unhandled type" error

    Links: [bugreport] [fix]
    Date found: 10/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    SELECT * FROM t0 RIGHT JOIN t1 ON t0.c0!=t1.c0; -- Error: Unhandled type for empty NL join
    
    Test case LOC: 3
    Oracle: error


  • #10 INSERT results in an error "Not implemented: Cannot create data from this type"

    Links: [bugreport] [fix]
    Date found: 10/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 BOOLEAN, c1 INT, PRIMARY KEY(c0, c1));
    INSERT INTO t0(c1, c0) VALUES (0, 0); -- Error: Not implemented: Cannot create data from this type
    
    Test case LOC: 2
    Oracle: error


  • #11 A RIGHT JOIN unexpectedly fetches rows

    Links: [bugreport] [fix]
    Date found: 10/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c1 BOOLEAN);
    INSERT INTO t0(c0) VALUES (1);
    SELECT * FROM t0 RIGHT JOIN t1 on true; -- expected: {}, actual: {1|false}
    
    Test case LOC: 4


  • #12 Query results in an error "INTERNAL: Failed to bind column reference "c0" [5.0] (bindings: [6.0])"

    Links: [bugreport] [fix]
    Date found: 10/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    SELECT * FROM t1 JOIN t0 ON t1.c0 < t1.c0 - t0.c0 WHERE t0.c0 <= t1.c0; -- Error: INTERNAL: Failed to bind column reference "c0" [5.0] (bindings: [6.0])
    
    Test case LOC: 3
    Oracle: error


  • #13 Creating an empty table results in a crash

    Links: [bugreport] [fix]
    Date found: 10/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0();
    
    Test case LOC: 1
    Oracle: crash


  • #14 LEFT JOIN on column with NULL value results in a segmentation fault

    Links: [bugreport] [fix]
    Date found: 10/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    INSERT INTO t0(c0) VALUES (0);
    INSERT INTO t1(c0) VALUES (NULL);
    SELECT * FROM t1 LEFT JOIN t0 ON t0.c0=t1.c0; -- Segmentation fault
    
    Test case LOC: 5
    Oracle: crash


  • #15 SIMILAR TO results in an incorrect result

    Links: [bugreport] [fix]
    Date found: 10/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0(c0) VALUES (-10);
    SELECT * FROM t0 WHERE t0.c0 NOT SIMILAR TO 0; -- expected: {-10}, actual: {}
    
    Test case LOC: 3


  • #16 LEFT JOIN with comparison on integer columns results in "Not implemented: Unimplemented type for nested loop join!"

    Links: [bugreport] [fix]
    Date found: 11/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    INSERT INTO t1(c0) VALUES (0);
    INSERT INTO t0(c0) VALUES (0);
    SELECT * FROM t0 LEFT JOIN t1 ON t0.c0 <= t1.c0; -- Not implemented: Unimplemented type for nested loop join!
    
    Test case LOC: 5
    Oracle: error


  • #17 Incorrect result after an INSERT violates a UNIQUE constraint

    Links: [bugreport] [fix]
    Date found: 11/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE UNIQUE INDEX i0 ON t0(c0);
    INSERT INTO t0(c0) VALUES (1);
    INSERT INTO t0(c0) VALUES (1); -- Failed to commit: Constraint: PRIMARY KEY or UNIQUE constraint violated: duplicated key
    SELECT * FROM t0 WHERE t0.c0 = 1; -- expected: {1}, actual: {}
    
    Test case LOC: 5


  • #18 Query with a negative shift predicate yields an incorrect result

    Links: [bugreport] [fix]
    Date found: 11/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT8, c1 DOUBLE);
    INSERT INTO t1(c0) VALUES (0);
    INSERT INTO t1(c1, c0) VALUES (1, 1);
    INSERT INTO t0 VALUES (0);
    SELECT * FROM t1 JOIN t0 ON t1.c1 WHERE NOT (t1.c0<<-1); -- expected: {1|1|0}, actual: {}
    
    Test case LOC: 6


  • #19 Query with comparison on boolean column results in "Invalid type: Invalid Type [BOOL]: Invalid type for index"

    Links: [bugreport] [fix]
    Date found: 11/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 BOOL UNIQUE);
    INSERT INTO t0(c0) VALUES (0);
    SELECT * FROM t0 WHERE t0.c0 = true; -- Error: Invalid type: Invalid Type [BOOL]: Invalid type for index
    
    Test case LOC: 3
    Oracle: error


  • #20 Query with an AND predicate, NOT and comparison yields an incorrect result

    Links: [bugreport] [fix]
    Date found: 11/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    INSERT INTO t0(c0) VALUES (0);
    INSERT INTO t1(c0) VALUES (0);
    SELECT * FROM t1, t0 WHERE NOT ((t1.c0 AND t0.c0) < 0); -- expected: {0|0}, actual: {}
    
    Test case LOC: 5


  • #21 Query using the LN() function does not terminate

    Links: [bugreport] [fix]
    Date found: 11/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    INSERT INTO t0(c0) VALUES (0);
    INSERT INTO t1(c0) VALUES (0), (0), (1), (-1);
    SELECT * FROM t0, t1 WHERE LN(t1.c0) < t0.c0; -- does not terminate
    
    Test case LOC: 5
    Oracle: crash


  • #22 ROUND() evaluates to -nan

    Links: [bugreport] [fix]
    Date found: 11/04/2020
    Status: fixed
    Test case:
    SELECT ROUND(0.1, 1000); -- -nan
    
    Test case LOC: 1


  • #23 Casting a large number to REAL and multiplying it with zero results in -nan

    Links: [bugreport] [fix]
    Date found: 11/04/2020
    Status: fixed
    Test case:
    SELECT 1e100::real*0; -- -nan
    
    Test case LOC: 1


  • #24 The trigonometric functions can result in -nan

    Links: [bugreport] [fix]
    Date found: 11/04/2020
    Status: fixed
    Test case:
    SELECT SIN(1e1000); -- -nan
    
    Test case LOC: 1


  • #25 Incorrect result for a JOIN predicate t1.c0 IN (t0.c0) and WHERE predicate t1.c0<=t0.c0

    Links: [bugreport] [fix]
    Date found: 12/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 FLOAT);
    INSERT INTO t0(c0) VALUES (1), (0);
    INSERT INTO t1(c0) VALUES (1);
    SELECT t1.c0 FROM t1 JOIN t0 ON t1.c0 IN (t0.c0) WHERE t1.c0<=t0.c0; -- expected: {1.0}, actual: {4.67454452791745e-310}
    
    Test case LOC: 5


  • #26 Query that uses the CONCAT() function and OR expression crashes

    Links: [bugreport] [fix]
    Date found: 12/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 REAL);
    CREATE TABLE t1(c0 INT2);
    CREATE TABLE t2(c0 INT);
    INSERT INTO t0 VALUES (-1);
    INSERT INTO t1 VALUES (0);
    INSERT INTO t2 VALUES (0), (0);
    SELECT * FROM t1, t2, t0 WHERE CONCAT(t1.c0) OR t0.c0; -- Segmentation fault
    
    Test case LOC: 7
    Oracle: crash


  • #27 Incorrect result for query that uses REGEXP_MATCHES()

    Links: [bugreport] [fix]
    Date found: 12/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 VARCHAR);
    INSERT INTO t0(c0) VALUES (0.1);
    SELECT * FROM t0 WHERE REGEXP_MATCHES(t0.c0, '1'); -- expected: {0.1}, actual: {}
    
    Test case LOC: 3


  • #28 SELECT on DATE column with a large negative value results in a "double free or corruption"

    Links: [bugreport] [fix]
    Date found: 12/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 DATE);
    INSERT INTO t0 VALUES (-10000000);
    SELECT c0 FROM t0; -- double free or corruption (out)
    
    Test case LOC: 3
    Oracle: crash


  • #29 Overflow when casting from REAL to INT results in "Invalid TypeId -1"

    Links: [bugreport] [fix]
    Date found: 12/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 REAL);
    INSERT INTO t0(c0) VALUES (10000000000);
    SELECT t0.c0 ::INT FROM t0; -- Error: Conversion: Invalid TypeId -1
    
    Test case LOC: 3
    Oracle: error


  • #30 UPDATE causes subsequent query to segfault

    Links: [bugreport] [fix]
    Date found: 12/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 VARCHAR, c1 DOUBLE UNIQUE);
    INSERT INTO t0(c0) VALUES (NULL);
    UPDATE t0 SET c0=0;
    INSERT INTO t0(c0, c1) VALUES (0, 0);
    SELECT * FROM t0 WHERE 1 > c1; -- Segmentation fault
    
    Test case LOC: 5
    Oracle: crash


  • #31 GROUP BY clause results in non-deterministic result

    Links: [bugreport] [fix]
    Date found: 12/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 NUMERIC);
    INSERT INTO t0(c0) VALUES (-515965088);
    INSERT INTO t0(c0) VALUES (1), (-5.15965088E8);
    CREATE INDEX i0 ON t0(c0);
    SELECT t0.c0 FROM t0 GROUP BY t0.c0, REVERSE(t0.c0); -- non-deterministic result
    
    Test case LOC: 5


  • #32 Nondeterministic clause when using an UNION query and HAVING clause

    Links: [bugreport] [fix]
    Date found: 12/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 VARCHAR);
    INSERT INTO t1 VALUES (0.9201898334673894), (0);
    INSERT INTO t0 VALUES (0);
    SELECT * FROM t0, t1 GROUP BY t0.c0, t1.c0 HAVING t1.c0!=MAX(t1.c0) UNION ALL SELECT * FROM t0, t1 GROUP BY t0.c0, t1.c0 HAVING NOT t1.c0>MAX(t1.c0); -- nondeterministic
    
    Test case LOC: 5


  • #33 Fetching from table and view results in a crash

    Links: [bugreport] [fix]
    Date found: 12/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE VIEW v0 AS SELECT 0, 1 FROM t0 ORDER BY t0.c0;
    SELECT t0.c0 FROM t0, v0; -- Conversion: Invalid TypeId <int>
    
    Test case LOC: 3
    Oracle: crash


  • #34 Incorrect result for predicate with shift on a BIGINT column

    Links: [bugreport] [fix]
    Date found: 12/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 BIGINT);
    INSERT INTO t0(c0) VALUES (-1);
    INSERT INTO t0(c0) VALUES (0);
    SELECT * FROM t0 WHERE t0.c0 AND (t0.c0<<64);-- expected: {}, actual: {-1}
    
    Test case LOC: 4


  • #35 [JDBC] Special character causes the JVM to terminate with "basic_string::_M_construct null not valid"

    Links: [bugreport] [fix]
    Date found: 13/04/2020
    Status: fixed
    Test case:
    CREATE TABLE(c0 VARCHAR);
    INSERT INTO t0 VALUES('?'); -- terminate called after throwing an instance of 'std::logic_error'
    
    Test case LOC: 2
    Oracle: crash


  • #36 Nested MAX() results in nondeterministic result or double free

    Links: [bugreport] [fix]
    Date found: 13/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 VARCHAR);
    INSERT INTO t0 VALUES ('aaaaaaaaaaaa');
    SELECT MAX(agg0) FROM (SELECT MAX(t0.c0) AS agg0 FROM t0) as s0; -- nondeterministic result or crash
    
    Test case LOC: 3


  • #37 Unexpected result for SUM() upon overflow

    Links: [bugreport] [fix]
    Date found: 13/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c1 BIGINT);
    INSERT INTO t0(c1) VALUES (2);
    INSERT INTO t0(c1) VALUES (9223372036854775807);
    SELECT SUM(t0.c1) FROM t0; -- expected: {9223372036854776000}, actual: {-9223372036854775807}
    
    Test case LOC: 4


  • #38 SELECT on view with text constant in ORDER BY crashes

    Links: [bugreport] [fix]
    Date found: 13/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0(c0) VALUES (0);
    CREATE VIEW v0(c0) AS SELECT 1 FROM t0;
    SELECT * FROM v0 ORDER BY 'a'; --  Assertion `types.size() > 0' failed (original test case crashed)
    
    Test case LOC: 4
    Oracle: crash


  • #39 Query with SIMILAR TO results in "Assertion `strlen(dataptr) == length' failed"

    Links: [bugreport] [fix]
    Date found: 13/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0 VALUES (0);
    SELECT * FROM t0 WHERE t0.c0 SIMILAR TO '.'; -- Assertion `strlen(dataptr) == length' failed
    
    Test case LOC: 3
    Oracle: crash
    Tags: DEBUG

  • #40 Nested CASE expression results in Assertion `other.auxiliary->type == VectorBufferType::STRING_BUFFER' failed

    Links: [bugreport] [fix]
    Date found: 13/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0 VALUES (NULL), (0), (1);
    SELECT * FROM t0 WHERE CASE WHEN c0 THEN 0 ELSE CASE '0.1' WHEN c0 THEN '' END END; -- Assertion `other.auxiliary->type == VectorBufferType::STRING_BUFFER' failed.
    
    Test case LOC: 3
    Oracle: crash
    Tags: DEBUG

  • #41 RIGHT JOIN results in Assertion `filter->expressions.size() == 1' failed

    Links: [bugreport]
    Date found: 14/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    SELECT * FROM t0 RIGHT JOIN t1 ON 0 WHERE t0.c0 OR t1.c0 BETWEEN t0.c0 AND 1; -- Assertion `filter->expressions.size() == 1' failed.
    
    Test case LOC: 3
    Oracle: crash
    Tags: DEBUG

  • #42 Incorrect result for SUM() and negative number

    Links: [bugreport] [fix]
    Date found: 15/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0 (c0 INT);
    INSERT INTO t0 VALUES (0);
    SELECT SUM(-1) FROM t0; -- expected: {-1}, actual: {1.8446744073709552e+19}
    
    Test case LOC: 3


  • #43 SELECT with CASE expression causes an assertion failure "Assertion `!entry.first->Equals(&expr)' failed"

    Links: [bugreport] [fix]
    Date found: 15/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    SELECT * FROM t0 GROUP BY -4.40304405E8 ORDER BY (CASE 1 WHEN 0 THEN 0 ELSE -440304405 END); -- Assertion `!entry.first->Equals(&expr)' failed.
    
    Test case LOC: 2
    Oracle: crash


  • #44 REVERSE() on special character results in "Assertion `strcmp(dataptr, normalized) == 0' failed."

    Links: [bugreport] [fix]
    Date found: 16/04/2020
    Status: fixed
    Test case:
    SELECT REVERSE('S̈a︍'); --  Assertion `strcmp(dataptr, normalized) == 0' failed.
    
    Test case LOC: 1
    Oracle: crash


  • #45 Incorrect result for BETWEEN query that casts column to boolean

    Links: [bugreport] [fix]
    Date found: 19/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0 VALUES (-1);
    SELECT t0.c0 FROM t0 WHERE NOT (0 BETWEEN 0 AND t0.c0::BOOL); -- expected: {}, actual: {-1}
    
    Test case LOC: 3


  • #46 Query using PREFIX() results in an error std::bad_alloc

    Links: [bugreport] [fix]
    Date found: 19/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 VARCHAR);
    SELECT * FROM t0 WHERE PREFIX(t0.c0, ''); -- Error: std::bad_alloc
    
    Test case LOC: 2
    Oracle: error


  • #47 Updated value in column is not visible in a SELECT

    Links: [bugreport] [fix]
    Date found: 24/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 VARCHAR, c1 VARCHAR);
    INSERT INTO t0(c0) VALUES(0), ('');
    UPDATE t0 SET c1 = 1;
    SELECT t0.c1 FROM t0 WHERE '' = t0.c0; -- expected: {1}, actual: {''}
    
    Test case LOC: 4


  • #48 SUBSTRING with an invalid start position causes a segmentation fault

    Links: [bugreport] [fix]
    Date found: 24/04/2020
    Status: fixed
    Test case:
    SELECT SUBSTRING(0, 3, 0); -- segmentation fault
    
    Test case LOC: 1
    Oracle: crash


  • #49 DISTINCT malfunctions for BOOLEAN

    Links: [bugreport] [fix]
    Date found: 24/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 BOOLEAN);
    INSERT INTO t0 VALUES (NULL), (false);
    SELECT DISTINCT t0.c0 FROM t0; -- expected: {NULL, false}, actual: {NULL, NULL}
    
    Test case LOC: 3
    Oracle: qp-distinct


  • #50 Comparing a string with a boolean yields an incorrect result after UPDATE

    Links: [bugreport] [fix]
    Date found: 25/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 VARCHAR);
    INSERT INTO t0(c0) VALUES (0);
    UPDATE t0 SET c0=0;
    UPDATE t0 SET c0=true;
    SELECT * FROM t0 WHERE t0.c0 = true; -- expected: {true}, actual: {}
    
    Test case LOC: 5


  • #51 A select with BETWEEN and VARCHAR cast results in an incorrect result

    Links: [bugreport] [fix]
    Date found: 25/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INTEGER);
    INSERT INTO t0(c0) VALUES (-2);
    SELECT t0.c0 FROM t0 WHERE -1 BETWEEN t0.c0::VARCHAR AND 1; -- expected: {-2}, actual: {}
    
    Test case LOC: 3


  • #52 Predicate checking for an empty string yields an incorrect result

    Links: [bugreport] [fix]
    Date found: 25/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 VARCHAR);
    INSERT INTO t0(c0) VALUES (''), (0);
    SELECT * FROM t0 WHERE t0.c0 = ''; -- expected: {''}, actual: {}
    
    Test case LOC: 3


  • #53 NOACCENT.NOCASE comparison with a special character results in a segmentation fault

    Links: [bugreport] [fix]
    Date found: 25/04/2020
    Status: fixed
    Test case:
    SELECT '' COLLATE NOACCENT.NOCASE='Ʇ';
    
    Test case LOC: 1
    Oracle: crash


  • #54 A negative DATE results in a "double free or corruption" crash

    Links: [bugreport] [fix]
    Date found: 25/04/2020
    Status: fixed
    Test case:
    SELECT DATE '-10000-01-01'; -- double free or corruption
    
    Test case LOC: 1
    Oracle: crash


  • #55 Query with complex ORDER BY causes an incorrect rowid value

    Links: [bugreport] [fix]
    Date found: 25/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0 VALUES (1), (0), (1);
    SELECT t0.rowid FROM t0 WHERE t0.rowid ORDER BY CASE ((t0.c0) ::BOOL) WHEN 1 THEN t0.rowid END; -- expected: {0, 2}, actual: {140671047175328, 2}
    
    Test case LOC: 3


  • #56 Creating an index on rowid results in an internal error "Failed to bind column reference"

    Links: [bugreport] [fix]
    Date found: 25/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE INDEX i0 ON t0(rowid, c0); -- INTERNAL: Failed to bind column reference "c0" [0.1] (bindings: [0.0])
    
    Test case LOC: 2
    Oracle: error


  • #57 Comparison with a DATE yields an incorrect result

    Links: [bugreport] [fix]
    Date found: 25/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 VARCHAR);
    INSERT INTO t0(c0) VALUES (DATE '2000-01-02');
    SELECT * FROM t0 WHERE DATE '2000-01-01' < t0.c0; -- expected: {2000-01-02}, actual: {}
    
    Test case LOC: 3


  • #58 Expression with LIKE and comparison causes an assertion failure

    Links: [bugreport] [fix]
    Date found: 26/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 VARCHAR);
    INSERT INTO t0 VALUES (0);
    SELECT * FROM t0 WHERE c0 LIKE '' AND c0 < true; -- Assertion `tableFilter[0].comparison_type == ExpressionType::COMPARE_GREATERTHAN || tableFilter[0].comparison_type == ExpressionType::COMPARE_GREATERTHANOREQUALTO' failed.
    
    Test case LOC: 3
    Oracle: crash
    Tags: DEBUG

  • #59 STDDEV_POP unexpectedly does not fetch any rows

    Links: [bugreport] [fix]
    Date found: 27/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 DOUBLE);
    INSERT INTO t0(c0) VALUES(1E200), (0);
    SELECT STDDEV_POP(c0) FROM t0; -- unexpected: does not fetch a row
    
    Test case LOC: 3
    Oracle: crash
    Tags: DEBUG

  • #60 UPDATE results in crash or assertion failure

    Links: [bugreport] [fix]
    Date found: 28/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT, c1 VARCHAR);
    INSERT INTO t0 VALUES (0, 0), (NULL, 0);
    UPDATE t0 SET c1 = c0; -- SEGV on unknown address 0x000000000000
    
    Test case LOC: 3
    Oracle: crash


  • #61 GROUP BY does not take COLLATE into account

    Links: [bugreport] [fix]
    Date found: 29/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 VARCHAR COLLATE NOCASE);
    INSERT INTO t0(c0) VALUES ('a'), ('A');
    SELECT t0.c0 FROM t0 GROUP BY t0.c0; -- expected: {'a'} or {'A'}, actual: {'a', 'A'}
    
    Test case LOC: 3
    Oracle: qp-groupby


  • #62 BETWEEN with COLLATE NOACCENT.NOCASE expression results in a segfault/ASan failure

    Links: [bugreport] [fix]
    Date found: 29/04/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 DATE, c1 VARCHAR);
    INSERT INTO t0(c0) VALUES (NULL), ('2000-01-01');
    SELECT * FROM t0 WHERE 'a' BETWEEN c0 AND c1 COLLATE NOACCENT.NOCASE; -- segfault
    
    Test case LOC: 3
    Oracle: crash
    Tags: DEBUG

  • #63 Incorrect result for MIN() on expression involving rowid

    Links: [bugreport] [fix]
    Date found: 01/05/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0 VALUES (-1);
    SELECT MIN(CAST(c0 AS BIGINT) << 63) FROM t0; -- expected: {-9223372036854775808}, actual: {NULL}
    
    Test case LOC: 3


  • #64 Large argument to RPAD results in std::bad_alloc

    Links: [bugreport] [fix]
    Date found: 01/05/2020
    Status: fixed
    Test case:
    SELECT RPAD('a', 100000000000000000, 0); -- Error: std::bad_alloc
    
    Test case LOC: 1
    Oracle: error


  • #65 Failed ALTER COLUMN results in a "Transaction conflict" error that cannot be aborted

    Links: [bugreport] [fix]
    Date found: 04/05/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 DATE);
    INSERT INTO t0 VALUES (DATE '2000-01-01');
    ALTER TABLE t0 ALTER COLUMN c0 SET DATA TYPE INT;
    INSERT INTO t0 VALUES (DEFAULT); -- TransactionContext: Transaction conflict: adding entries to a table that has been altered!
    
    Test case LOC: 4
    Oracle: error


  • #66 Query on altered table results in a segmentation fault

    Links: [bugreport] [fix]
    Date found: 04/05/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT UNIQUE, c1 DATE);
    ALTER TABLE t0 ALTER c1 TYPE INT;
    INSERT INTO t0(c0) VALUES(-1);
    SELECT * FROM t0 WHERE c0 < 0; -- Segmentation fault
    
    Test case LOC: 4
    Oracle: crash


  • #67 UPDATE on altered table results in an error "Could not find node in column segment tree"

    Links: [bugreport] [fix]
    Date found: 05/05/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 TIMESTAMP);
    INSERT INTO t0 VALUES(NULL);
    DELETE FROM t0;
    ALTER TABLE t0 ALTER c0 TYPE DATE;
    INSERT INTO t0 VALUES(NULL);
    UPDATE t0 SET c0 = '1969-12-18'; -- Error: Could not find node in column segment tree!
    
    Test case LOC: 6
    Oracle: error


  • #68 ALTER TABLE results in an assertion failure "Assertion `expr.return_type == vector.type' failed"

    Links: [bugreport] [fix]
    Date found: 05/05/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT, c1 VARCHAR);
    INSERT INTO t0(c1) VALUES(NULL);
    ALTER TABLE t0 ALTER c1 TYPE TIMESTAMP;
    
    Test case LOC: 3
    Oracle: crash
    Tags: DEBUG

  • #69 DROP column results in an assertion failure unique.index < base.columns.size().

    Links: [bugreport] [fix]
    Date found: 05/05/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT, c INT UNIQUE);
    ALTER TABLE t0 DROP c0; -- Assertion `unique.index < base.columns.size()' failed.
    
    Test case LOC: 2
    Oracle: crash
    Tags: DEBUG

  • #70 DROP column results in an assertion failure unique.index < base.columns.size() 2

    Links: [bugreport] [fix]
    Date found: 05/05/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT, c1 INT UNIQUE);
    ALTER TABLE t0 DROP c1; -- Assertion `unique.index < base.columns.size()' failed.
    
    Test case LOC: 2
    Oracle: crash
    Tags: DEBUG

  • #71 ALTER TYPE with USING results in an assertion failure "types.size() > 0"

    Links: [bugreport] [fix]
    Date found: 05/05/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    ALTER TABLE t0 ALTER c0 TYPE VARCHAR USING ''; -- Assertion `types.size() > 0' failed.
    
    Test case LOC: 2
    Oracle: crash
    Tags: DEBUG

  • #72 Query using LEFT() results in a segmentation fault

    Links: [bugreport] [fix]
    Date found: 06/05/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 BOOL);
    INSERT INTO t0(c0) VALUES (NULL);
    SELECT * FROM t0 WHERE LEFT(t0.c0, -1); -- Segmentation fault
    
    Test case LOC: 3
    Oracle: crash


  • #73 SELECT with RIGHT JOIN causes an assertion failure "Assertion `!finalized' failed"

    Links: [bugreport] [fix]
    Date found: 07/05/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 VARCHAR);
    CREATE TABLE t1(c0 VARCHAR);
    INSERT INTO t0 VALUES('');
    INSERT INTO t1 VALUES(0);
    CREATE VIEW v0 AS SELECT 0 FROM t0, t1 WHERE t0.c0 = t1.c0;
    SELECT * FROM v0 RIGHT JOIN t1 ON 1; -- Assertion `!finalized' failed
    
    Test case LOC: 6
    Oracle: crash
    Tags: DEBUG

TDEngine

  • #1 DROP DATABASE seems to leave behind a table when using the "tables" configuration option

    Links: [bugtracker]
    Date found: 01/10/2019
    Status: fixed
    Test case:
    CREATE DATABASE db tables 1;
    USE db;
    CREATE TABLE t0(c0 TIMESTAMP, c1 int);
    CREATE TABLE t1(c0 TIMESTAMP, c1 int);
    DROP DATABASE db;
    CREATE DATABASE db;
    USE db;
    CREATE TABLE t0(c0 TIMESTAMP, c1 int);
    CREATE TABLE t1(c0 TIMESTAMP, c1 int);
    
    Test case LOC: 9
    Oracle: error


Unique confirmed bugs

PostgreSQL

  • #1 SELECT results in "ERROR: index key does not match expected index column"

    Links: [mail]
    Date found: 02/07/2019
    Status: verified
    Highlight: This bug was reproduced to occur in "v11 and quite a large number of branches before that". The bug was fixed "somewhat accidentally" for v12, but backporting the relevant patch was declared to be too invasive.
    Test case:
    CREATE TABLE t0(c0 boolean UNIQUE);
    CREATE INDEX i0 ON t0((nullif(FALSE, TRUE)));
    INSERT INTO t0(c0) VALUES(TRUE);
    SELECT * FROM t0 WHERE nullif(FALSE, TRUE) OR t0.c0; -- expected: row is fetched, actual: ERROR:  index key does not match expected index column
    
    Test case LOC: 4
    Oracle: error (SELECT)
    Tags: INDEX

  • #2 ALTER TABLE results in "ERROR: could not open relation with OID 43707388"

    Links: [mail]
    Date found: 4/07/2019
    Status: verified
    Highlight: A fix for this seemed to be non-trivial and it was put on the "back burner until we have some consensus how to proceed on that".
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE UNIQUE INDEX i0 ON t0(c0);
    ALTER TABLE t0 ADD PRIMARY KEY USING INDEX i0, ALTER c0 TYPE BIGINT;
    -- unexpected: ERROR: could not open relation with OID 43707388
    
    Test case LOC: 3
    Oracle: error (ALTER TABLE)
    Tags: INDEX

  • #3 Multiple inheritance and ALTER TABLE issue

    Links: [email]
    Date found: 27/07/2019
    Status: verified
    Test case:
    CREATE TABLE t0(c0 boolean);
    CREATE TABLE t1(c0 boolean);
    CREATE TABLE t2(c0 boolean) INHERITS(t0, t1);
    ALTER TABLE t0 ALTER c0 TYPE TEXT;
    UPDATE t1 SET c0 = TRUE; -- ERROR:  attribute "c0" of relation "t2"does not match parent's type
    
    Test case LOC: 5
    Oracle: error


  • #4 REINDEX CONCURRENTLY unexpectedly fails

    Links: [email]
    Date found: 13/11/2019
    Status: verified
    Test case:
    CREATE TEMP TABLE t0(c1 INT PRIMARY KEY) ON COMMIT DELETE ROWS;
    REINDEX TABLE CONCURRENTLY t0; -- unexpected: ERROR:  index "t0_pkey_ccnew" already contains data
    
    Test case LOC: 2
    Oracle: error


  • #5 FailedAssertion("!OidIsValid(def->collOid)", File: "view.c", Line: 89)

    Links: [email]
    Date found: 02/12/2019
    Status: verified
    Test case:
    CREATE TABLE t0(c0 TEXT COLLATE "POSIX");
    CREATE VIEW v0(c0) AS (SELECT (t0.c0 COLLATE "C")::INT FROM t0); -- FailedAssertion("!OidIsValid(def->collOid)", File: "view.c", Line: 89)
    
    Test case LOC: 2
    Oracle: crash


MySQL

  • #1 REPAIR TABLE on a functional table marks it as crashed

    Links: [bugtracker]
    Date found: 15/06/2019
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT UNIQUE, c1 INT, c2 INT UNIQUE) ENGINE = MyISAM;
    INSERT INTO t0(c0) VALUES(DEFAULT), ("");
    INSERT IGNORE INTO t0(c2) VALUES("a");
    REPLACE INTO t0(c1, c0, c2) VALUES(1, DEFAULT, DEFAULT), (DEFAULT, "a", "a");
    REPAIR TABLE t0 QUICK EXTENDED USE_FRM;
    SELECT * FROM t0; -- unexpected: Table 'to' is marked as crashed and last (automatic?) repair failed
    
    Test case LOC: 6
    Oracle: error (SELECT)


  • #2 "Can't find record" error in SELECT statement 1 (MyISAM engine)

    Links: [bugtracker]
    Date found: 18/06/2019
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT UNIQUE, c1 INT, c2 INT, c3 INT UNIQUE) ENGINE = MyISAM;
    INSERT INTO t0(c0) VALUES(DEFAULT), ("a");
    INSERT IGNORE INTO t0(c3) VALUES("a"), (1);
    REPLACE INTO t0(c1, c0, c3) VALUES(1, 2, 3), (1, "a", "a");
    SELECT (NULL) IN (SELECT t0.c3 FROM t0 WHERE t0.c0);
    
    Test case LOC: 5
    Oracle: error (SELECT)


  • #3 "Can't find record" error in SELECT statement 2 (HEAP engine)

    Links: [bugtracker]
    Date found: 18/06/2019
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT UNIQUE) ENGINE = HEAP;
    INSERT INTO t0(c0) VALUES (DEFAULT), ("a"), ("a");
    SELECT (NULL) IN (SELECT t0.c0 FROM t0 WHERE ((t0.c0) OR TRUE) IS NULL); -- unexpected: ERROR 1032 (HY000): Can't find record in 't0'
    
    Test case LOC: 3
    Oracle: error (SELECT)


  • #4 DROP PRIMARY KEY on UNIQUE PRIMARY KEY does not update information_schema.column

    Links: [bugtracker]
    Date found: 20/06/2019
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT PRIMARY KEY UNIQUE);
    ALTER TABLE t0 DROP PRIMARY KEY;
    select COLUMN_KEY, COLUMN_NAME from information_schema.columns where table_schema = 'a' and TABLE_NAME = 't0'; -- unexpected: c0 is still shown as PRI
    ALTER TABLE t0 DROP PRIMARY KEY; -- ERROR 1091 (42000): Can't DROP 'PRIMARY'; check that column/key exists
    
    Test case LOC: 4
    Oracle: error (ALTER TABLE)


  • #5 IN operator issue when comparing signed column and the column cast to unsigned

    Links: [bugtracker]
    Date found: 24/06/2019
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0(c0) VALUES(-1);
    SELECT t0.c0 IN (1, CAST(t0.c0 AS UNSIGNED)) from t0; -- expected: 0, actual: 1
    
    Test case LOC: 3
    Oracle: contains


  • #6 SET GLOBAL on rbr_exec_mode fails

    Links: [bugtracker]
    Date found: 25/06/2019
    Status: verified
    Test case:
    SET GLOBAL rbr_exec_mode = STRICT; -- unexpected: ERROR 1228 (HY000): Variable 'rbr_exec_mode' is a SESSION variable and can't be used with SET GLOBAL
    
    Test case LOC: 1
    Oracle: error (SET GLOBAL)


  • #7 SET key_cache_* and key_buffer_* variables fails nondeterministically

    Links: [bugtracker]
    Date found: 26/06/2019
    Status: verified
    Test case:
    SET GLOBAL key_cache_division_limit = 100; -- unexpected: fails nondeterministically with ERROR 1210 (HY000): Incorrect arguments to SET
    
    Test case LOC: 1
    Oracle: error (SET)


  • #8 Incorrect result when comparing an UNSIGNED INT with a floating-point number

    Links: [bugreport]
    Date found: 31/03/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT UNSIGNED);
    INSERT INTO t0(c0) VALUES(0);
    SELECT * FROM t0 WHERE 0.9 > t0.c0; -- expected: {0}, actual: {}
    
    Test case LOC: 3


  • #9 BETWEEN malfunctions when comparing a string containing a newline

    Links: [bugreport]
    Date found: 31/03/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT, c1 INT UNIQUE);
    INSERT INTO t0(c1) VALUES(1);
    SELECT * FROM t0 WHERE t0.c1 BETWEEN 0 AND ("\n2"); -- expected: {NULL, 1}, actual: {}
    
    Test case LOC: 3


  • #10 BETWEEN malfunctions when comparing large numbers

    Links: [bugreport]
    Date found: 31/03/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT UNIQUE);
    INSERT INTO t0(c0) VALUES(0);
    SELECT * FROM t0 WHERE t0.c0 BETWEEN 18446744073561222871 AND 0; -- expected: {0}, actual: {}?
    
    Test case LOC: 3


  • #11 Incorrect result when comparing a floating-point number with an integer

    Links: [bugreport]
    Date found: 01/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0(c0) VALUES (0);
    SELECT * FROM t0 WHERE 0.9 > t0.c0; -- expected: {0}, actual: {}
    
    Test case LOC: 3


  • #12 Comparison on FLOAT column and large value malfunctions

    Links: [bugreport]
    Date found: 01/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 FLOAT UNIQUE);
    INSERT INTO t0(c0) VALUES (0);
    SELECT * FROM t0 WHERE t0.c0 BETWEEN 0 AND '1e500'; -- expected: {0}, actual: {}
    
    Test case LOC: 3


  • #13 BETWEEN query malfunctions for special character and TEXT index

    Links: [bugreport]
    Date found: 01/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 TEXT);
    INSERT INTO t0(c0) VALUES(0);
    CREATE INDEX i0 ON t0(c0(1));
    SELECT * FROM t0 WHERE t0.c0 NOT BETWEEN '֣a' AND NULL; -- expected: {0}, actual: {}
    
    Test case LOC: 4


MariaDB

    All our bug reports for MariaDB were verified quickly. However, only one of them was fixed, which is why we have stopped testing this DBMS.

  • #1 Incorrect result for expression with the <=> operator and IS NULL

    Links: [bugtracker]
    Date found: 11/11/2019
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0 VALUES (1);
    SELECT (c0 > (NULL <=> 0)) IS NULL FROM t0; -- expected: 0, actual: 1
    
    Test case LOC: 3
    Oracle: metamorphic


  • #2 Index causes incorrect result when comparing float-point number with INT

    Links: [bugtracker]
    Date found: 11/11/2019
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0 VALUES (1);
    CREATE INDEX i0 ON t0(c0);
    SELECT * FROM t0 WHERE 0.5 = c0; -- unexpected: row is fetched
    
    Test case LOC: 4
    Oracle: metamorphic


  • #3 GREATEST() and LEAST() malfunction for NULL

    Links: [bugtracker]
    Date found: 11/11/2019
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0 VALUES (1);
    SELECT * FROM t0 WHERE GREATEST(c0, NULL); -- unexpected: row is fetched
    
    Test case LOC: 3
    Oracle: metamorphic


  • #4 CREATE TABLE with generated column and RLIKE results in segfault

    Links: [bugtracker]
    Date found: 14/11/2019
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT AS(('' RLIKE '['))); -- segfault
    
    Test case LOC: 1
    Oracle: crash
    Tags: GENERATED_COLUMN

  • #5 NOT NULL and UNIQUE constraints cause SUM() to yield an incorrect result

    Links: [bugtracker]
    Date found: 18/11/2019
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT NOT NULL, c1 CHAR UNIQUE);
    INSERT INTO t0 VALUES (0, 1);
    INSERT INTO t0 VALUES (0, '');
    SELECT SUM(a.t) FROM (SELECT (c1 RLIKE c1) = (c0 IS NULL) as t FROM t0) as a; -- expected: 1, actual: 0
    
    Test case LOC: 4
    Oracle: metamorphic


CockroachDB

  • #1 Incorrect result for LIKE query

    Links: [bugreport]
    Date found: 18/01/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 STRING UNIQUE);
    INSERT INTO t0 (c0) VALUES ('\a');
    SELECT * FROM t0 WHERE c0 LIKE '\a'; -- unexpected: row is fetched
    
    Test case LOC: 3
    Oracle: metamorphic


  • #2 Internal error in expression that uses a CAST and COLLATE

    Links: [bugreport]
    Date found: 20/01/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT);
    SELECT * FROM t0 WHERE 1 > -(('1a' COLLATE en)::INT); -- internal error
    
    Test case LOC: 2
    Oracle: error
    Tags: INTERNAL_ERROR

  • #3 SHOW EXPERIMENTAL_FINGERPRINTS error for STRING columns and character escapes

    Links: [bugreport]
    Date found: 22/01/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 STRING);
    INSERT INTO t0(c0) VALUES ('\n');
    SHOW EXPERIMENTAL_FINGERPRINTS FROM TABLE t0; -- ERROR: hash-fingerprint: could not parse "
    " as type bytes: bytea encoded value ends with incomplete escape sequence
    
    Test case LOC: 4
    Oracle: error


  • #4 Incorrect result for IS NULL query on VIEW using SELECT DISTINCT

    Links: [bugreport] [fix]
    Date found: 23/01/2020
    Status: verified
    Highlight: After we reported this bug, the CockroachDB developers added additional random testing to detect similar bugs.
    Test case:
    CREATE TABLE t0(c0 INT UNIQUE);
    CREATE VIEW v0(c0) AS SELECT DISTINCT t0.c0 FROM t0;
    INSERT INTO t0 (c0) VALUES (NULL), (NULL);
    SELECT * FROM v0 WHERE v0.c0 IS NULL; -- expected: {NULL}, actual: {NULL, NULL}
    
    Test case LOC: 4
    Oracle: metamorphic


  • #5 Unexpected error for aggregate functions

    Links: [bugreport]
    Date found: 05/02/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT);
    SELECT MIN(1), MAX(NULL AND true) FROM t0; -- ERROR: no builtin aggregate for MAX on [{InternalType:{Family:UnknownFamily Width:0 Precision:0 ArrayDimensions:[] Locale:0x6fcee60 VisibleType:0 ArrayElemType:<nil> TupleContents:[] TupleLabels:[] Oid:705 ArrayContents:<nil> TimePrecisionIsSet:false IntervalDurationField:<nil>}}]
    
    Test case LOC: 2
    Oracle: error


  • #6 EXPERIMENTAL SCRUB TABLE results in an "overflow during Encode" error

    Links: [bugreport]
    Date found: 08/02/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INTERVAL, c1 BOOL CHECK (INTERVAL '9999 y' NOT BETWEEN c0 AND c0));
    CREATE INDEX ON t0(c0);
    EXPERIMENTAL SCRUB TABLE t0; -- ERROR: check-constraint: overflow during Encode
    
    Test case LOC: 3
    Oracle: error


  • #7 Syntax error for multi-valued comparison and COLLATE

    Links: [bugreport]
    Date found: 17/02/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 STRING COLLATE en);
    SELECT * FROM t0 WHERE t0.c0 < SOME ('' COLLATE en, CASE WHEN true THEN NULL END); -- ERROR: at or near ")": syntax error
    
    Test case LOC: 2
    Oracle: error


  • #8 SCRUB fails for table that has a FOREIGN KEY constraint on a rowid column

    Links: [bugreport]
    Date found: 21/03/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT UNIQUE, FOREIGN KEY (c0) REFERENCES t0(rowid));
    EXPERIMENTAL SCRUB table t1; -- scrub-fk: column "t.rowid" does not exist
    
    Test case LOC: 3
    Oracle: error


  • #9 Query with HAVING clause, DISTSQL=off, and vectorize=on results in an internal error

    Links: [bugreport]
    Date found: 24/03/2020
    Status: verified
    Test case:
    SET SESSION DISTSQL=off;
    SET vectorize=on;
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0(c0) VALUES(0);
    SELECT * FROM t0 GROUP BY t0.c0 HAVING MAX(CASE WHEN NULL THEN t0.c0::SMALLINT ELSE 0 END)::BOOL IS NULL; -- internal error: unexpected error from the vectorized runtime: interface conversion: coldata.column is []int64, not []int16
    
    Test case LOC: 5
    Oracle: error


  • #10 Unexpected syntax error for expression involving ARRAY[NULL]

    Links: [bugreport]
    Date found: 02/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT);
    SELECT COUNT(CASE WHEN false THEN ARRAY[NULL] END) FROM t0; -- at or near "unknown": syntax error
    
    Test case LOC: 2
    Oracle: error


  • #11 CAST to INT2 yields an incorrect/inconsistent result

    Links: [bugreport]
    Date found: 03/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0 VALUES(-1292691042);
    SELECT t0.c0::SMALLINT FROM t0; -- expected: {6558}, actual: {-1292691042}
    
    Test case LOC: 3


  • #12 SCRUB on a temporary table that has a hash-sharded index results in an error

    Links: [bugreport]
    Date found: 04/04/2020
    Status: verified
    Test case:
    SET experimental_enable_temp_tables = 'on';
    CREATE TEMP TABLE t0(c0 INT);
    CREATE INDEX ON t0(c0) USING HASH WITH BUCKET_COUNT=1;
    EXPERIMENTAL SCRUB table t0; -- ERROR: check-constraint: cannot access temporary tables of other sessions
    
    Test case LOC: 4
    Oracle: error


  • #13 Disconnecting from server results in crash with "unexpected leftover bytes"

    Links: [bugreport]
    Date found: 07/04/2020
    Status: verified
    Test case:
    
    
    Test case LOC: 0
    Oracle: crash


  • #14 SCRUB on a table with FLOAT PRIMARY KEY and INTERLEAVE IN PARENT index causes server to exit

    Links: [bugreport]
    Date found: 07/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 FLOAT PRIMARY KEY);
    CREATE INDEX ON t0(c0) INTERLEAVE IN PARENT t0(c0);
    INSERT INTO t0 VALUES(0);
    EXPERIMENTAL SCRUB table t0; -- server exits
    
    Test case LOC: 4
    Oracle: crash


  • #15 CREATE INDEX results in "invalid interleave backreference" and prevents database from being dropped

    Links: [bugreport]
    Date found: 07/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT AS (0) STORED);
    INSERT INTO t1(rowid) VALUES (1), (2);
    CREATE UNIQUE INDEX ON t1(c0) INTERLEAVE IN PARENT t0(c0);
    CREATE INDEX ON t0(c0); -- invalid interleave backreference table=t1 index=2: index-id "2" does not exist
    
    Test case LOC: 5
    Oracle: error


TiDB

  • #1 Incorrect result for query that uses an AND operator on floats

    Links: [bugreport]
    Date found: 26/03/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 BOOL);
    INSERT INTO t0 VALUES (0);
    SELECT * FROM t0 WHERE 1 AND 0.4; -- expected: {0}, actual: {}
    
    Test case LOC: 3


  • #2 NATURAL RIGHT JOIN results in an unexpected "Unknown column" error

    Links: [bugreport]
    Date found: 30/03/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    SELECT t0.c0 FROM t0 NATURAL RIGHT JOIN t1 WHERE t1.c0; -- Unknown column 't0.c0' in 'field list'
    
    Test case LOC: 3
    Oracle: error


  • #3 Query results in "baseBuiltinFunc.vecEvalString() should never be called" error

    Links: [bugreport]
    Date found: 30/03/2020
    Status: verified
    Test case:
    CREATE VIEW v0(c0) AS SELECT NULL;
    SELECT * FROM v0 WHERE (NOT (IF(v0.c0, NULL, NULL))); -- baseBuiltinFunc.vecEvalString() should never be called, please contact the TiDB team for help
    
    Test case LOC: 2
    Oracle: error


  • #4 OR clause on FLOAT/DOUBLE column unexpectedly evaluates to TRUE

    Links: [bugreport]
    Date found: 01/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 FLOAT);
    INSERT INTO t0(c0) VALUES (NULL);
    SELECT * FROM t0 WHERE NOT(0 OR t0.c0); -- expected: {}, actual: {NULL}
    
    Test case LOC: 3


  • #5 INL_MERGE_JOIN hint results in an error "Internal : Can't find a proper physical plan for this query"

    Links: [bugreport]
    Date found: 02/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    SELECT /*+ INL_MERGE_JOIN(t1) */ * FROM t0 NATURAL JOIN t1 WHERE t0.c0 IS NULL;
    
    Test case LOC: 3
    Oracle: error


  • #6 LEFT JOIN on a view results in "runtime error: slice bounds out of range [:264] with capacity 256"

    Links: [bugreport]
    Date found: 02/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0(c0) VALUES (1), (1), (1), (1), (1), (1);
    CREATE VIEW v0(c0) AS SELECT NULL FROM t0;
    SELECT * FROM t0 LEFT JOIN v0 ON TRUE WHERE v0.c0 IS NULL; -- runtime error: slice bounds out of range [:264] with capacity 256
    
    Test case LOC: 4
    Oracle: error


  • #7 Incorrect result when comparing a FLOAT/DOUBLE UNSIGNED with a negative number

    Links: [bugreport]
    Date found: 02/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 DOUBLE UNSIGNED UNIQUE);
    INSERT INTO t0(c0) VALUES (0);
    SELECT * FROM t0 WHERE t0.c0 = -1; -- expected: {}, actual: {0}
    
    Test case LOC: 3


  • #8 RIGHT JOIN with ELT() predicate returns an incorrect result

    Links: [bugreport]
    Date found: 15/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    INSERT INTO t0(c0) VALUES (NULL);
    SELECT * FROM t1 RIGHT JOIN t0 ON true WHERE (ELT(1^t0.c0, 0, NULL, 0)) IS NULL; -- expected: {NULL, NULL}, actual: {}
    
    Test case LOC: 4


  • #9 NATURAL LEFT JOIN results in incorrect result for <=> operator

    Links: [bugreport]
    Date found: 15/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    INSERT INTO t0 VALUES (0);
    INSERT INTO t1 VALUES (0);
    SELECT * FROM t1 NATURAL LEFT JOIN t0 WHERE NOT(t0.c0<=>t1.c0); -- expected: {}, actual: {0}
    
    Test case LOC: 5


  • #10 Incorrect result when using SPACE() in a predicate

    Links: [bugreport]
    Date found: 15/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0 VALUES (100000);
    SELECT * FROM t0 WHERE NOT SPACE(t0.c0); -- expected: {100000}, actual: {}
    
    Test case LOC: 3


  • #11 Incorrect result when using the empty string as a predicate in a RIGHT JOIN

    Links: [bugreport]
    Date found: 15/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 CHAR);
    CREATE TABLE t1(c0 CHAR UNIQUE);
    INSERT INTO t1(c0) VALUES ('');
    SELECT t0.c0 FROM t0 RIGHT JOIN t1 ON true WHERE t1.c0; -- expected: {}, actual: {NULL}
    
    Test case LOC: 4


  • #12 Incorrect result when fetching from a view

    Links: [bugreport]
    Date found: 15/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE VIEW v0(c0, c1) AS SELECT t0.c0, 1 FROM t0;
    INSERT INTO t0 VALUES (0);
    SELECT v0.c0 FROM v0, t0 WHERE v0.c1; -- expected: {0}, actual: {}
    
    Test case LOC: 4


  • #13 Server panic for predicate t0.c0=9223372036854775808 when using partitions

    Links: [bugreport]
    Date found: 15/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT) PARTITION BY HASH(c0) PARTITIONS 3;
    SELECT * FROM t0 WHERE t0.c0=9223372036854775808;
    
    Test case LOC: 2
    Oracle: error


  • #14 Incorrect result or run-time error after changing column type

    Links: [bugreport]
    Date found: 15/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT, c1 DECIMAL UNIQUE);
    CREATE TABLE t1(c0 INT);
    INSERT INTO t0(c1) VALUES (0), (1);
    INSERT INTO t1(c0) VALUES (0);
    ALTER TABLE t0 MODIFY c1 INT;
    SELECT t1.c0 FROM t1, t0 WHERE t0.c1; -- expected: {0}, actual: {0, 0}
    
    Test case LOC: 6


  • #15 Incorrect result for CAST to DATETIME

    Links: [bugreport]
    Date found: 15/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 DOUBLE);
    INSERT INTO t0(c0) VALUES (0);
    SELECT CAST(t0.c0 AS DATETIME) FROM t0; -- expected: {0000-00-00 00:00:00}, actual: {NULL}
    
    Test case LOC: 3


  • #16 Server panic for NATURAL LEFT JOIN on partitioned table

    Links: [bugreport]
    Date found: 15/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 NUMERIC PRIMARY KEY);
    CREATE TABLE t1(c0 INT) PARTITION BY HASH(NOT c0) PARTITIONS 2;
    SELECT * FROM t1 NATURAL LEFT JOIN t0; -- ERROR 2013 (HY000): Lost connection to MySQL server during query
    
    Test case LOC: 3
    Oracle: error


  • #17 Using the DEFAULT() function results in an ambiguous column error

    Links: [bugreport]
    Date found: 15/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT DEFAULT 1);
    SELECT t0.c0, t0.c0 FROM t0 ORDER BY DEFAULT(t0.c0); -- Column 'c0' in field list is ambiguous
    
    Test case LOC: 2
    Oracle: error


  • #18 Internal error message when using CASE in partitioned table

    Links: [bugreport]
    Date found: 15/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT) PARTITION BY HASH((CASE WHEN 0 THEN 0 ELSE c0 END )) PARTITIONS 1; -- ERROR 1105 (HY000): UnknownType: *ast.WhenClause
    
    Test case LOC: 1
    Oracle: error


  • #19 Inserting into a partitioned table results in an "Missing session variable when eval builtin" error

    Links: [bugreport]
    Date found: 15/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT) PARTITION BY HASH((c0<CURRENT_USER())) PARTITIONS 1;
    INSERT INTO t0 VALUES (0); -- Missing session variable when eval builtin
    
    Test case LOC: 2
    Oracle: error


  • #20 Incorrect result for LEFT JOIN and CASE operator

    Links: [bugreport]
    Date found: 15/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    INSERT INTO t0 VALUES (0);
    INSERT INTO t1 VALUES (0);
    SELECT * FROM t1 LEFT JOIN t0 ON t0.c0 = t1.c0 WHERE (CASE t0.c0 WHEN 0 THEN t1.c0 ELSE 1 END); -- expected: {}, actual: {0|NULL}
    
    Test case LOC: 5


  • #21 Unexpected error "Data Too Long" when using a WHERE clause in an UPDATE

    Links: [bugreport]
    Date found: 19/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 DOUBLE);
    INSERT INTO t0 VALUES (1e30);
    UPDATE t0 SET c0=0 WHERE t0.c0 LIKE 0; -- Data Too Long, field len 22, data len 31
    
    Test case LOC: 3
    Oracle: error


  • #22 Incorrect result for LEFT JOIN AND NULLIF

    Links: [bugreport]
    Date found: 20/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INTEGER);
    CREATE TABLE t1(c0 INTEGER);
    INSERT INTO t1 VALUES (0);
    INSERT INTO t0 VALUES (0);
    SELECT * FROM t1 LEFT JOIN t0 ON t0.c0=t1.c0 WHERE NOT NULLIF(t1.c0, t0.c0); --expected: {}, actual: {0, NULL}
    
    Test case LOC: 5


  • #23 Using an index twice in an index hint results in an incorrect result

    Links: [bugreport]
    Date found: 22/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT, c1 INT);
    CREATE INDEX i0 ON t0(c0, c1);
    INSERT INTO t0 VALUES (0, 0);
    SELECT /*+ USE_INDEX(t0, i0, i0)*/t0.c0 FROM t0 WHERE t0.c1; -- expected: {}, actual: {0}
    
    Test case LOC: 4


  • #24 UNIQUE constraint on DECIMAL/floating-point columns causes incorrect result for NULL in AND

    Links: [bugreport]
    Date found: 22/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 DOUBLE UNIQUE);
    INSERT INTO t0(c0) VALUES (NULL);
    SELECT t0.c0 FROM t0 WHERE NOT (t0.c0 AND 1); -- expected: {}, actual: {NULL}
    
    Test case LOC: 3


  • #25 UNIQUE constraint on boolean column results in an incorrect result in a comparison

    Links: [bugreport]
    Date found: 22/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c1 BOOL UNIQUE);
    INSERT INTO t0(c1) VALUES (-128);
    SELECT t0.c1 FROM t0 WHERE t0.c1=-129; -- expected: {}, actual: {-128}
    
    Test case LOC: 3


  • #26 INL_HASH_JOIN hint causes an incorrect result for a table with a generated column

    Links: [bugreport]
    Date found: 22/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT AS (0) VIRTUAL, c1 INT);
    CREATE TABLE t1(c0 INT);
    INSERT INTO t1(c0) VALUES (0);
    SELECT /*+ INL_HASH_JOIN(t1, t0)*/t1.c0 FROM t1 NATURAL LEFT JOIN t0 WHERE NOT t1.c0; -- expected: {0}, actual: {}
    
    Test case LOC: 4


  • #27 CREATE TABLE with generated column unexpectedly causes a syntax error

    Links: [bugreport]
    Date found: 22/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 BINARY AS (CAST(0 AS BINARY))); -- ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 30 near "binary)"
    
    Test case LOC: 1
    Oracle: error


  • #28 CREATE TABLE with generated column and escaped backslash causes a syntax error

    Links: [bugreport]
    Date found: 22/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 TEXT AS ('\')); -- ERROR 1064 (42000): You have an error in your SQL syntax
    
    Test case LOC: 1
    Oracle: error


  • #29 INSERT INTO with ON DUPLICATE clause results in an unexpected "Miss column" error

    Links: [bugreport]
    Date found: 22/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT UNIQUE, c1 INT AS (c0) VIRTUAL NOT NULL);
    INSERT INTO t0(c0) VALUES (1);
    INSERT INTO t0(c0) VALUES (1) ON DUPLICATE KEY UPDATE c0=0;
    
    Test case LOC: 3
    Oracle: error


  • #30 INSERT INTO with ON DUPLICATE clause results in an unexpected "key not exist" error

    Links: [bugreport]
    Date found: 22/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT AS ('a') UNIQUE, c1 INT);
    INSERT IGNORE INTO t0(c1) VALUES (0);
    DELETE FROM t0;
    INSERT IGNORE INTO t0(c1) VALUES (0) ON DUPLICATE KEY UPDATE c1=t0.c0; -- Error: key not exist
    
    Test case LOC: 4
    Oracle: error


  • #31 INSERT IGNORE allows NULL value in a NOT NULL generated column

    Links: [bugreport]
    Date found: 22/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INTEGER AS (NULL) NOT NULL, c1 INT);
    CREATE INDEX i0 ON t0(c0, c1);
    INSERT IGNORE INTO t0(c1) VALUES (0);
    SELECT * FROM t0 WHERE t0.c0 IS NULL; -- expected: {NULL|0}, actual: {}
    
    Test case LOC: 4


  • #32 Inf value in FLOAT column causes JDBC driver error

    Links: [bugreport]
    Date found: 22/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 FLOAT);
    INSERT INTO t0 VALUES (1e100);
    SELECT t0.c0 FROM t0; -- +Inf
    
    Test case LOC: 3
    Oracle: error


  • #33 SELECT with ORDER BY results in an "inconsistent index" error

    Links: [bugreport]
    Date found: 22/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT, c1 INT AS ('a') UNIQUE);
    INSERT IGNORE INTO t0(c0) VALUES (0);
    DELETE FROM t0;
    SELECT * FROM t0 ORDER BY t0.c1; -- inconsistent index c1 handle count 1 isn't equal to value count 0
    
    Test case LOC: 4
    Oracle: error


  • #34 Value in generated column depends on a WHERE clause

    Links: [bugreport]
    Date found: 23/04/2020
    Status: verified
    Test case:
    CREATE TABLE t0(c0 INT AS (c1) UNIQUE, c1 TEXT);
    INSERT INTO t0(c1) VALUES (0.5);
    SELECT t0.c0 FROM t0 WHERE t0.c1 + 0.5; -- expected: {1}, actual: {0} 
    
    Test case LOC: 3


  • #35 Fetching from a view with an escaped backslash results in an unexpected syntax error

    Links: [bugreport]
    Date found: 23/04/2020
    Status: verified
    Test case:
    CREATE VIEW v0(c0) AS SELECT '\\';
    SELECT * FROM v0; -- ERROR 1105 (HY000): line 1 column 10
    
    Test case LOC: 2
    Oracle: error


TDEngine

  • #1 Inserting the "+" and "-" strings fails

    Links: [bugtracker]
    Date found: 02/10/2019
    Status: verified
    Test case:
    CREATE TABLE t0(c0 TIMESTAMP, c1 BINARY(1));
    INSERT INTO t0(c0, c1) VALUES (0, "-");
    
    Test case LOC: 2
    Oracle: error


Unconfirmed/Open bug reports

PostgreSQL

  • #1 ALTER TABLE results in "could not find cast from 3904 to 3831"

    Links: [email]
    Date found: 16/11/2019
    Status: open
    Test case:
    CREATE TABLE t0(c0 int4range UNIQUE, FOREIGN KEY (c0) REFERENCES t0(c0));
    ALTER TABLE t0 ALTER c0 SET DATA TYPE int4range; -- ERROR:  could not find cast from 3904 to 3831
    
    Test case LOC: 2
    Oracle: error


TDEngine

  • #1 The "<>" and "=" operators do not work for NCHAR columns

    Links: [bugtracker]
    Date found: 03/10/2019
    Status: open
    Test case:
    CREATE TABLE t0(c0 TIMESTAMP, c1 NCHAR(1));
    INSERT INTO t0(c0, c1) VALUES(0, "a");
    SELECT * FROM t0 WHERE c1 = "a";
    
    Test case LOC: 3
    Oracle: error


  • #2 Unexpected result when using arithmetic expressions in WHERE clause

    Links: [bugtracker]
    Date found: 03/10/2019
    Status: open
    Test case:
    CREATE TABLE t0(c0 TIMESTAMP, c1 INT);
    INSERT INTO t0 VALUES(0, 1);
    SELECT * FROM t0 WHERE c1=(c1*1);
    
    Test case LOC: 3
    Oracle: contains


Closed/Duplicate bug reports

SQLite3

    The SQLite3 developers were most responsive and very appreciative of our bug reports. They fixed the bugs we reported at an impressive speed, which is why we concentrated on testing this DBMS. For accessing the SQLite mailing list links, you need to be registered and logged in to the http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users.

  • #1 String interpreted as a column name when creating an index

    Links: [email]
    Date found: 28/5/2019
    Status: closed (not a bug)
    Test case:
    CREATE TABLE test (c0);
    CREATE INDEX index_1 ON test('asdf'); -- Error: no such column: asdf
    
    Test case LOC: 2
    Oracle: error
    Tags: INDEX

  • #2 PRAGMA case_sensitive_like conflicts with LIKE operator when creating an index

    Links: [bugtracker] [email]
    Date found: 28/5/2019
    Status: closed (duplicate)
    Test case:
    PRAGMA case_sensitive_like=false;
    CREATE TABLE test (c0);
    CREATE INDEX IF NOT EXISTS index_1 ON test(c0 LIKE 'a'); -- Error: non-deterministic functions prohibited in index expressions
    
    Test case LOC: 3
    Oracle: error (create index)
    Tags: INDEX , LIKE

  • #3 REAL PRIMARY KEY and floating point comparison does not work

    Links: [mail]
    Date found: 5/5/2019
    Status: closed (duplicate)
    Test case:
    CREATE TABLE t1 (c0, c1 REAL, PRIMARY KEY (c1, c0));
    INSERT INTO t1(c1) VALUES (0X7ffffffffffffff);
    SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t1);
    
    Test case LOC: 3
    Oracle: contains


  • #4 Mixing main and temp databases in foreign keys is not supported

    Links: [mail]
    Date found: 13/5/2019
    Status: closed (not a bug)
    Test case:
    PRAGMA foreign_keys=true;
    CREATE TABLE t0 (c0 PRIMARY KEY);
    CREATE TEMP TABLE t1 (c0, FOREIGN KEY(c0) REFERENCES t0(c0));
    INSERT INTO t1(c0) VALUES (1); -- no such table: temp.t0
    
    Test case LOC: 4
    Oracle: error


  • #5 Issue with DISTINCT and COLLATE

    Links: [bugtracker]
    Date found: 29/07/2019
    Status: closed (not a bug)
    Test case:
    CREATE TABLE t0(c0 COLLATE RTRIM);
    INSERT INTO t0(c0) VALUES (' ');
    SELECT DISTINCT(t0.c0) != '' FROM t0; -- expected: 1, actual: 0
    
    Test case LOC: 3
    Oracle: contains


  • #6 Unexpected error in DELETE with existing trigger

    Links: [bugtracker]
    Date found: 14/08/2019
    Status: closed (not a bug)
    Test case:
    CREATE TABLE t0(c0);
    CREATE TRIGGER tr0 AFTER DELETE ON t0 WHEN c0 BEGIN DELETE FROM t0; END;
    DELETE FROM t0; -- unexpected: no such column: c0
    
    Test case LOC: 3
    Oracle: error


  • #7 Short-circuit evaluation issue

    Links: [bugtracker]
    Date found: 28/08/2019
    Status: closed (not a bug)
    Test case:
    CREATE TABLE t0 (c0);
    INSERT INTO t0(c0) VALUES (-9223372036854775808);
    SELECT FALSE AND ABS(t0.c0) FROM t0; -- unexpected: integer overflow
    
    Test case LOC: 3
    Oracle: metamorphic


  • #8 DISTINCT malfunctions for VIEW

    Links: [bugtracker]
    Date found: 10/09/2019
    Status: closed (not a bug)
    Test case:
    CREATE TABLE t0(c0);
    INSERT INTO t0(c0) VALUES (0.0), (0);
    CREATE VIEW v0(c0) AS SELECT DISTINCT c0 FROM t0;
    SELECT * FROM v0; -- expected: 0.0, 0, actual: 0.0
    
    Test case LOC: 4
    Oracle: metamorphic


  • #9 INSERT into table with two triggers does not terminate

    Links: [bugtracker]
    Date found: 21/10/2019
    Status: closed (not a bug)
    Test case:
    CREATE TABLE t0(c0, c1, PRIMARY KEY (c0, c1));
    INSERT INTO t0(c0) VALUES (0), (1), (2), (3), (4), (5);
    CREATE TRIGGER tr1 BEFORE DELETE ON t0 FOR EACH ROW BEGIN
    	DELETE FROM t0 WHERE t0.c1;
    	INSERT INTO t0(c0) VALUES (6), (7), (8), (9), (10);
    END;
    CREATE TRIGGER tr0 BEFORE INSERT ON t0 BEGIN
    	DELETE FROM t0;
    	DELETE FROM t0;
    	DELETE FROM t0;
    END;
    INSERT INTO t0(c1) VALUES (0), (1), (2); -- unexpected: does not terminate
    
    Test case LOC: 12
    Oracle: hang


  • #10 UNLIKELY in query causes row to not be fetched

    Links: [bugtracker]
    Date found: 5/11/2019
    Status: closed (not a bug)
    Test case:
    CREATE TABLE t0(c0, c1, c2, PRIMARY KEY(c2)) WITHOUT ROWID;
    CREATE INDEX i0 ON t0(CAST(c1 AS INT));
    CREATE VIEW v0 AS SELECT 0, c0 FROM t0 GROUP BY 1 HAVING c2;
    INSERT INTO t0(c2) VALUES('');
    INSERT INTO t0(c1, c2) VALUES(1, 1);
    SELECT * FROM v0 WHERE UNLIKELY(1); -- unexpected: no row is fetched
    
    Test case LOC: 6
    Oracle: metamorphic


  • #11 Inconsistent handling of subqueries in index expressions

    Links: [bugreport]
    Date found: 30/12/2019
    Status: closed (not a bug)
    Test case:
    CREATE TABLE t0(c0);
    CREATE INDEX i0 ON t0((0 AND (SELECT 1))); -- unexpected: no error
    ALTER TABLE t0 RENAME COLUMN c0 TO c1; -- error in index i0: subqueries prohibited in index expressions
    
    Test case LOC: 3
    Oracle: error


  • #12 DBSTAT query computes incorrect result for stat.aggregate = 1 condition

    Links: [bugreport]
    Date found: 04/01/2020
    Status: closed (not a bug)
    Test case:
    CREATE VIRTUAL TABLE stat USING dbstat;
    SELECT * FROM stat WHERE stat.aggregate = 1; -- unexpected: fetches one record
    
    Test case LOC: 2
    Oracle: metamorphic
    Tags: DBSTAT

PostgreSQL

  • #1 VACUUM FULL results in deadlock

    Links: [mail]
    Date found: 29/06/2019
    Status: closed (not a bug)
    Test case:
    VACUUM FULL -- unexpected: ERROR: deadlock detected when executed with multiple threads
    
    Test case LOC: 1
    Oracle: error (VACUUM)
    Tags: MULTITHREADED

  • #2 ALTER TABLE SET WITH OIDS fails after failed CONCURRENTLY index creation

    Links: [mail]
    Date found: 02/06/2019
    Status: closed (not a bug)
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0(c0) VALUES(0), (0);
    CREATE UNIQUE INDEX CONCURRENTLY i0 ON t0(c0);
    ALTER TABLE t0 SET WITH OIDS; -- expected: no error, actual: ERROR:
    could not create unique index "i0" DETAIL:  Key (c0)=(0) is duplicated.
    
    Test case LOC: 5
    Oracle: error (ALTER TABLE)
    Tags: INDEX

  • #3 VACUUM FULL results in ERROR: integer out of range

    Links: [mail]
    Date found: 07/07/2019
    Status: closed (not a bug)
    Test case:
    -- thread 1:
    \c db1;
    CREATE TABLE t1(c0 int);
    INSERT INTO t1(c0) VALUES(2147483647);
    UPDATE t1 SET c0 = 0;
    CREATE INDEX i0 ON t1((1 + t1.c0));
    VACUUM FULL; -- unexpected: ERROR: integer out of range
    
    -- thread 2:
    DROP DATABASE db2;
    CREATE DATABASE db2;
    
    Test case LOC: 8
    Oracle: error (VACUUM FULL)
    Tags: INDEX , MULTITHREADED

  • #4 Issue with CHAR column and "column LIKE column" condition

    Links: [mail]
    Date found: 07/07/2019
    Status: closed (not a bug)
    Test case:
    CREATE TABLE t0(c0 CHAR(2));
    INSERT INTO t0(c0) VALUES('a');
    SELECT * FROM t0 WHERE c0 LIKE c0; -- expected: fetches the row, actual: does not fetch the row
    
    Test case LOC: 3
    Oracle: contains


  • #5 Generated column and string concatenation issue

    Links: [mail]
    Date found: 10/07/2019
    Status: closed (not a bug)
    Test case:
    CREATE TABLE t0(c0 TEXT GENERATED ALWAYS AS (('abc' || 1)) STORED); -- unexpected: generation expression is not immutable
    
    Test case LOC: 1
    Oracle: error


  • #6 SEGFAULT in 12beta2 release

    Links: Date found: 10/07/2019
    Status: closed (duplicate)
    Highlight: We received a response that this had already been fixed in commit 2322456.
    Test case:
    -- 16 threads create and drop databases, the other threads execute the following:
    CREATE TABLE t0(c1 integer);
    INSERT INTO t0(c1) VALUES(0), (0), (0), (0), (0);
    BEGIN;
    DELETE FROM t0;
    INSERT INTO t0(c1) VALUES (0);
    ANALYZE;
    
    Test case LOC: 6
    Oracle: segfault
    Tags: SECURITY MAILING LIST , MULTITHREADED

  • #7 Stack buffer overflow in 12beta2 release

    Links: Date found: 11/07/2019
    Status: closed (duplicate)
    Highlight: We received a response that this had already been fixed in commit 2322456.
    Test case:
    CREATE TABLE t0(c0 INTEGER, c1 BIGINT, c2 SERIAL);
    INSERT INTO t0(c1, c0) VALUES(-1709938800, 945157321), (9427841, -1121735885), (-462902431, -1516553180), (-1182718924, 567434112), (77957572, -1630604045);
    INSERT INTO t0(c1) VALUES(1396592526);
    INSERT INTO t0(c2) VALUES(690098393), (1277882261), (1624303238);
    CREATE STATISTICS s0 ON c1, c0 FROM t0;
    CREATE STATISTICS s1 ON c2, c1 FROM t0;
    INSERT INTO t0(c2, c1, c0) VALUES(1047328172, -928052494, -1495150353), (1594411273, -1849045190, -1504843935);
    INSERT INTO t0(c0, c1) VALUES(-2024782141, -1507193801), (307326616, 1000588716);
    INSERT INTO t0(c0) VALUES(-1390942911);
    ANALYZE;
    CREATE STATISTICS s2 ON c2, c1 FROM t0;
    ANALYZE;
    CREATE STATISTICS s3 ON c0, c1 FROM t0;
    ANALYZE;
    CREATE STATISTICS s4 ON c2, c0 FROM t0;
    UPDATE t0 SET c1 = -17924667, c0 = DEFAULT WHERE FALSE;
    CREATE STATISTICS s5 ON c0, c1 FROM t0;
    TRUNCATE TABLE t0;
    CREATE STATISTICS s6 ON c2, c0 FROM t0;
    INSERT INTO t0(c1) VALUES(-1891295280), (337846372), (-376532870), (-1428386312), (815718779);
    INSERT INTO t0(c1, c0, c2) VALUES(-1750298826, -1400767611, 1631979167), (197446074, -2025988029, 965481790);
    INSERT INTO t0(c0, c1, c2) VALUES(-343412265, 1761686185, 478065767), (-1200264761, 1389476944, -848006704);
    CREATE STATISTICS s7 ON c0, c1 FROM t0;
    ANALYZE;
    ANALYZE;
    BEGIN;
    ANALYZE;
    
    Test case LOC: 27
    Oracle: segfault
    Tags: SECURITY MAILING LIST

  • #8 SELECT with COLLATE results in segfault on trunk and 12 Beta 2

    Links: [email]
    Date found: 14/07/2019
    Status: closed (duplicate)
    Test case:
    CREATE TABLE t0(c0 BOOLEAN, c1 TEXT);
    CREATE STATISTICS s1 ON c0, c1 FROM t0;
    INSERT INTO t0(c0) VALUES (FALSE);
    VACUUM ANALYZE t0;
    SELECT * FROM t0 WHERE t0.c0 OR '' >= t0.c1 COLLATE "C"; -- unexpected: segfault
    
    Test case LOC: 5
    Oracle: segfault


  • #9 UPDATE causes segfault on trunk

    Links: [email]
    Date found: 15/07/2019
    Status: closed (duplicate)
    Test case:
    CREATE TABLE t0(c0 TEXT, c1 TEXT, PRIMARY KEY(c0, c1));
    CREATE TABLE t1(c0 TEXT, c1 TEXT, FOREIGN KEY (c0, c1) REFERENCES t0(c0, c1));
    CREATE STATISTICS s0 ON c0, c1 FROM t0;
    INSERT INTO t0(c1, c0) VALUES('a', 'a'), ('b', 'a'), ('c', 'a'), ('d', 'a'), ('e', 'a'), ('f', 'a');
    ANALYZE;
    UPDATE t0 SET c0 = 'b';
    
    Test case LOC: 6
    Oracle: segfault


  • #10 BETWEEN SYMMETRIC condition results in "row is too big: ..., maximum size 8160"

    Links: [email]
    Date found: 16/07/2019
    Status: closed (not a bug)
    Test case:
    CREATE TABLE t0(c0 TEXT);
    CREATE INDEX i0 ON t0(c0) WHERE ((FALSE BETWEEN SYMMETRIC TRUE AND (t0.c0 || t0.c0 IN (t0.c0, t0.c0, '1', t0.c0 || t0.c0, t0.c0 || t0.c0 || t0.c0))) BETWEEN SYMMETRIC TRUE AND TRUE) BETWEEN SYMMETRIC TRUE AND TRUE; -- ERROR:  row is too big: size 8440, maximum size 8160
    
    Test case LOC: 2
    Oracle: error


  • #11 ANALYZE on parent table results in an error "tuple already updated by self"

    Links: [bugtracker]
    Date found: 24/07/2019
    Status: closed (duplicate)
    Test case:
    CREATE TABLE t0(c0 boolean , c1 integer);
    CREATE TABLE t1(c0 boolean, c1 integer) INHERITS(t0);
    INSERT INTO t0(c1) VALUES (0);
    CREATE STATISTICS s0 ON c0, c1 FROM t0;
    ANALYZE t0; -- unexpected: ERROR:  tuple already updated by self
    
    Test case LOC: 5
    Oracle: error


  • #12 Attribute has wrong type in ALTER TABLE

    Links: [bugtracker]
    Date found: 24/07/2019
    Status: closed (duplicate)
    Test case:
    CREATE TABLE t0(c0 VARCHAR(10));
    INSERT INTO t0(c0) VALUES('');
    ALTER TABLE t0 ALTER c0 SET DATA TYPE TEXT, ADD EXCLUDE (('a' LIKE t0.c0) WITH =); -- unexpected: ERROR:  attribute 1 of type t0 has wrong type
    
    Test case LOC: 3
    Oracle: error


  • #13 ADD CHECK fails for parent table if column used in CHECK is fully-qualified

    Links: [email]
    Date found: 24/07/2019
    Status: closed (not a bug)
    Test case:
    CREATE TABLE t0(c0 boolean);
    CREATE TABLE t1(c0 boolean) INHERITS(t0);
    ALTER TABLE t0 ADD CHECK(t0.c0); -- unexpected: ERROR:  missing FROM-clause entry for table "t0"
    
    Test case LOC: 3
    Oracle: error


  • #14 ALTER TABLE fails when changing column type due to index with bit_ops opclass

    Links: [email]
    Date found: 20/11/2019
    Status: closed (not a bug)
    Test case:
    CREATE TABLE t0(c0 BIT VARYING(1));
    CREATE INDEX i0 ON t0(c0 bit_ops);
    ALTER TABLE t0 ALTER c0 TYPE TEXT; -- ERROR:  operator class "bit_ops" does not accept data type text
    
    Test case LOC: 3
    Oracle: error


MySQL

  • #1 DROP COLUMN error on INVISIBLE UNIQUE INDEX that refers to constant expression

    Links: [bugtracker]
    Date found: 20/06/2019
    Status: closed (not a bug)
    Test case:
    CREATE TABLE t0(c0 INT, c1 INT PRIMARY KEY);
    CREATE UNIQUE INDEX i0 ON t0((TRUE)) INVISIBLE;
    ALTER TABLE t0 DROP c1; -- unexpected: ERROR 3522 (HY000): A primary key index cannot be invisible
    
    Test case LOC: 3
    Oracle: error (ALTER TABLE)
    Tags: INDEX

  • #2 Applying NOT twice on an integer results in wrong result in WHERE condition

    Links: [bugtracker]
    Date found: 20/06/2019
    Status: closed (duplicate)
    Highlight: We found this bug on the latest public version of MySQL. The bug report was closed, since the bug had already been fixed internally.
    Test case:
    CREATE TABLE t0(c0 INT);
    INSERT INTO t0(c0) VALUES(1);
    SELECT * FROM t0 WHERE 123 != (NOT (NOT 123)); -- expected: row is fetched, actual: row is not fetched
    
    Test case LOC: 3
    Oracle: contains


  • #3 Index makes DELETE fail with "Truncated incorrect DOUBLE value"

    Links: [bugtracker]
    Date found: 26/06/2019
    Status: closed (not a bug)
    Test case:
    CREATE TABLE t0(c0 VARCHAR(5));
    CREATE INDEX i0 ON t0((t0.c0 > 0));
    INSERT IGNORE INTO t0(c0) VALUES("a");
    DELETE FROM t0; -- unexpected: ERROR 1292 (22007): Truncated incorrect DOUBLE value: 'a'
    
    Test case LOC: 4
    Oracle: error (DELETE)
    Tags: INDEX

  • #4 Non-unique functional index prevents PRIMARY KEY from being dropped

    Links: [bugtracker]
    Date found: 26/06/2019
    Status: closed (duplicate)
    Test case:
    CREATE TABLE t0(c3 INT PRIMARY KEY);
    CREATE INDEX i0 ON t0(("a" | 0));
    INSERT IGNORE INTO t0(c3) VALUES(1);
    DROP INDEX `PRIMARY` ON t0; -- unexpected: ERROR 1292 (22007): Truncated incorrect INTEGER value: 'a'
    
    Test case LOC: 4
    Oracle: error (DROP INDEX)
    Tags: INDEX

  • #5 CAST of STRING with newlines to SIGNED/UNSIGNED returns unexpected result

    Links: [bugtracker]
    Date found: 23/07/2019
    Status: closed (duplicate)
    Test case:
    SELECT CAST('\n1' AS UNSIGNED); -- expected: 1, actual: 0
    -- also see the examples below:
    -- SELECT CAST('\n1' AS SIGNED); -- expected: 1, actual: 0
    -- SELECT CAST('\t  1' AS SIGNED); -- 1
    -- SELECT CAST('\n1' AS REAL); -- 1
    -- SELECT CAST('\n1' AS FLOAT); -- 1
    -- SELECT CAST('\n1' AS DECIMAL); -- 1
    
    Test case LOC: 1
    Oracle: error


  • #6 DISABLE KEYS, DELAY_KEY_WRITE results in "Data truncated for functional index"

    Links: [bugtracker]
    Date found: 23/07/2019
    Status: closed (duplicate)
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE INDEX i0 ON t0(('a' = t0.c0));
    INSERT IGNORE INTO t0(c0) VALUES(1);
    ALTER TABLE t0 DISABLE KEYS, DELAY_KEY_WRITE 0; -- ERROR 3751 (01000): Data truncated for functional index 'i0'
    
    Test case LOC: 4
    Oracle: error


  • #7 Incorrect result for query that uses an AND operator on floats

    Links: [bugreport]
    Date found: 31/03/2020
    Status: closed (not a bug)
    Test case:
    CREATE TABLE t0(c0 BOOL);
    INSERT INTO t0 VALUES (0);
    SELECT * FROM t0 WHERE 1 AND 0.4; -- expected: {0}, actual: {}
    
    Test case LOC: 3


  • #8 The IN operator malfunctions for floating-poing numbers

    Links: [bugreport]
    Date found: 01/04/2020
    Status: closed (not a bug)
    Test case:
    CREATE TABLE t0(c0 FLOAT UNIQUE);
    INSERT INTO t0(c0) VALUES (296088496), (0), (2080822651);
    SELECT * FROM t0 WHERE t0.c0 NOT IN (622120376, -1.421821436E9, 296088496); -- expected: {0, 296089000, 2080820000}, actual: {0, 296089000}
    
    Test case LOC: 3


  • #9 BETWEEN computes incorrect result when comparing DECIMAL with a string

    Links: [bugreport]
    Date found: 04/04/2020
    Status: closed (not a bug)
    Test case:
    CREATE TABLE t0(c0 DECIMAL UNIQUE);
    INSERT INTO t0(c0) VALUES(0);
    SELECT * FROM t0 WHERE '' BETWEEN t0.c0 AND t0.c0; -- expected: {0}, actual: {}
    
    Test case LOC: 3


MariaDB

    All our bug reports for MariaDB were verified quickly. However, only one of them was fixed, which is why we have stopped testing this DBMS.

  • #1 CREATE UNIQUE INDEX USING HASH malfunctions for engine=Aria table

    Links: [bugtracker]
    Date found: 14/11/2019
    Status: closed (duplicate)
    Test case:
    CREATE TABLE t0(c0 INT) engine=Aria;
    CREATE UNIQUE INDEX i0 USING HASH ON t0(c0); -- Key/Index cannot be defined on a virtual generated column
    
    Test case LOC: 2
    Oracle: error


CockroachDB

  • #1 Internal error for NATURAL JOIN on INT and INT4 column for VECTORIZE=experimental_on

    Links: [bugreport] [fix]
    Date found: 11/02/2020
    Status: closed (duplicate)
    Test case:
    SET SESSION VECTORIZE=experimental_on;
    CREATE TABLE t0(c0 INT UNIQUE);
    CREATE TABLE t1(c0 INT4 UNIQUE);
    INSERT INTO t0(c0) VALUES(0);
    INSERT INTO t1(c0) VALUES(0);
    SELECT * FROM t0 NATURAL JOIN t1; -- ERROR: internal error: unexpected error from the vectorized runtime: interface conversion: coldata.column is []int64, not []int32
    
    Test case LOC: 6
    Oracle: error
    Tags: INTERNAL_ERROR

TiDB

  • #1 A NOT NULL predicate unexpectedly evaluates to TRUE

    Links: [bugreport]
    Date found: 15/04/2020
    Status: closed (duplicate)
    Test case:
    CREATE TABLE t1(c0 INT);
    INSERT INTO t1(c0) VALUES (NULL);
    SELECT t1.c0 FROM t1 WHERE NOT t1.c0; -- expected: {}, actual: {NULL}
    
    Test case LOC: 3


DuckDB

    The DuckDB developers fixed our bugs at an impressive speed, which allowed us to extensively test this DBMS.

  • #1 Query with JOIN and WHERE condition unexpectedly fetches a value not present in the table

    Links: [bugreport]
    Date found: 12/04/2020
    Status: closed (duplicate)
    Test case:
    CREATE TABLE t0(c0 INT);
    CREATE TABLE t1(c0 INT);
    INSERT INTO t0 VALUES (0);
    INSERT INTO t1 VALUES (1), (1);
    SELECT t0.c0 FROM t0 JOIN t1 ON t0.c0=(t1.c0 IS NULL) WHERE t0.c0 NOT IN (t1.c0); -- expected: {0, 0}, actual: {1, 1}
    
    Test case LOC: 5


  • #2 Subtracting a large integer from a DATE results in a "double free or corruption"

    Links: [bugreport]
    Date found: 25/04/2020
    Status: closed (duplicate)
    Test case:
    SELECT - 41756167 + '1969-12-11 032657' ::DATE; -- double free or corruption
    
    Test case LOC: 1
    Oracle: crash