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.

Our work on testing database systems has been featured in an ETH News Article [English] [German].

Other related posts:

Unique fixed bugs

SQLite

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

    Links: [bugtracker] [email] [fix]
    Date found: 28/5/2019
    Status: fixed
    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: PQS


  • #2 PRAGMA case_sensitive_like can corrupt some databases

    Links: [bugtracker] [email] [fix]
    Date found: 28/5/2019
    Status: fixed (in documentation)
    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


  • #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


  • #4 Multi-row insert circumvents index check

    Links: [bugtracker] [email] [fix]
    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


  • #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: PQS


  • #6 UPSERT documentation issue

    Links: [email]
    Date found: 2/5/2019
    Status: fixed (in documentation)
    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


  • #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


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

    Links: [email] [fix]
    Date found: 3/5/2019
    Status: fixed
    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


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

    Links: [bugtracker] [email] [fix]
    Date found: 4/5/2019
    Status: fixed
    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: PQS


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

    Links: [email] [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


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

    Links: [email] [fix1] [fix2]
    Date found: 7/5/2019
    Status: fixed
    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), (0, 2);
    SELECT * FROM t0; -- returns no row
    
    Test case LOC: 4
    Oracle: PQS


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

    Links: [bugtracker] [email] [fix]
    Date found: 7/5/2019
    Status: fixed
    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: PQS


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

    Links: [email] [fix]
    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: PQS


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

    Links: [email] [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: PQS


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

    Links: [bugtracker] [email] [fix]
    Date found: 9/5/2019
    Status: fixed
    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


  • #16 Incorrect handling of Infinity by the ROUND function

    Links: [email] [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: PQS


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

    Links: [bugtracker] [email] [fix]
    Date found: 11/5/2019
    Status: fixed
    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: PQS


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

    Links: [bugtracker] [email] [fix]
    Date found: 13/5/2019
    Status: fixed
    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: PQS


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

    Links: [email] [fix]
    Date found: 14/5/2019
    Status: fixed
    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: PQS


  • #20 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: PQS


  • #21 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)
    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


  • #22 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: crash


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

    Links: [bugtracker] [fix1] [fix2]
    Date found: 19/5/2019
    Status: fixed
    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: PQS


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

    Links: [bugtracker] [fix]
    Date found: 19/5/2019
    Status: fixed
    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: PQS


  • #25 "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


  • #26 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: PQS


  • #27 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: PQS


  • #28 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: PQS


  • #29 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


  • #30 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: PQS


  • #31 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


  • #32 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: PQS


  • #33 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: PQS


  • #34 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


  • #35 -'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: PQS


  • #36 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: PQS


  • #37 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: PQS


  • #38 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: PQS


  • #39 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: PQS


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

    Links: [bugtracker] [fix]
    Date found: 12/06/2019
    Status: fixed
    Test case:
    SELECT CAST('-0.0' AS NUMERIC); -- expected: 0, unexpected: 0.0
    
    Test case LOC: 1
    Oracle: PQS


  • #41 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: PQS


  • #42 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: PQS


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

    Links: [bugtracker] [fix]
    Date found: 14/06/2019
    Status: fixed
    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: PQS


  • #44 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: PQS


  • #45 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


  • #46 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: PQS


  • #47 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: PQS


  • #48 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: PQS


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

    Links: [bugtracker] [fix]
    Date found: 03/08/2019
    Status: fixed
    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: PQS


  • #50 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: PQS


  • #51 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 v0.c1 < v0.c0 FROM v0;
    
    Test case LOC: 4
    Oracle: PQS


  • #52 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: PQS


  • #53 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: PQS


  • #54 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: PQS


  • #55 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: crash


  • #56 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: PQS


  • #57 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: PQS


  • #58 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: PQS


  • #59 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: PQS


  • #60 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: PQS


  • #61 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: PQS


  • #62 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: PQS


  • #63 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: NoREC


  • #64 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: NoREC


  • #65 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: NoREC


  • #66 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: NoREC


  • #67 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


  • #68 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: NoREC


  • #69 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') UNION ALL SELECT c0 IN ('2070934912552030444') FROM t0; -- unexpected: row is fetched
    
    Test case LOC: 3
    Oracle: NoREC


  • #70 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: NoREC


  • #71 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: NoREC


  • #72 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 v2.c1 BETWEEN v2.c0 AND v2.c1 as count FROM v2; -- expected: 1, actual: 0
    
    Test case LOC: 4
    Oracle: NoREC


  • #73 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 * FROM v0 WHERE v0.c1 >= v0.c0; -- unexpected: no row is fetched
    
    Test case LOC: 4
    Oracle: NoREC


  • #74 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: NoREC


  • #75 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: NoREC


  • #76 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: NoREC


  • #77 FTS integrity-check malfunctions

    Links: [bugtracker] [fix]
    Date found: 07/10/2019
    Status: fixed
    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


  • #78 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 vt0(vt0, rank) VALUES('pgsz', '38');
    UPDATE vt0 SET a = 399905135; -- unexpected: database disk image is malformed
    INSERT INTO vt0(vt0) VALUES('integrity-check');
    
    Test case LOC: 6
    Oracle: error


  • #79 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


  • #80 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


  • #81 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


  • #82 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: NoREC


  • #83 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: NoREC


  • #84 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


  • #85 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


  • #86 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


  • #87 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


  • #88 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


  • #89 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: NoREC


  • #90 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: NoREC


  • #91 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: NoREC


  • #92 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: NoREC


  • #93 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


  • #94 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


  • #95 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: NoREC


  • #96 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


  • #97 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


  • #98 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


  • #99 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


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

    Links: [bugtracker] [fix]
    Date found: 29/10/2019
    Status: fixed
    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


  • #101 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


  • #102 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


  • #103 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


  • #104 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: NoREC


  • #105 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: NoREC


  • #106 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


  • #107 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: NoREC


  • #108 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


  • #109 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: NoREC


  • #110 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


  • #111 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


  • #112 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


  • #113 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: NoREC


  • #114 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: NoREC


  • #115 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: NoREC


  • #116 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: NoREC


  • #117 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 rt0.c0 = CAST(rt1.c0 AS TEXT) FROM rt1, rt0;
    
    Test case LOC: 5
    Oracle: NoREC


  • #118 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: NoREC


  • #119 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: NoREC


  • #120 Incorrect result for predicate on rtree table

    Links: [bugreport] [docs fix] [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 1 FROM rt0 WHERE rt0.c1 > '-1' UNION ALL SELECT rt0.c1 > '-1' FROM rt0;
    
    Test case LOC: 3
    Oracle: NoREC


  • #121 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: NoREC


  • #122 CREATE VIRTUAL TABLE causes segfault

    Links: [fix]
    Date found: 06/12/2019
    Status: fixed
    Test case:
    CREATE VIRTUAL TABLE vt0 USING rtree;
    
    Test case LOC: 1
    Oracle: crash


  • #123 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


  • #124 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


  • #125 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


  • #126 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


  • #127 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


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

    Links: [bugreport] [fix]
    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


  • #129 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: crash


  • #130 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: NoREC


  • #131 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


  • #132 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


  • #133 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: NoREC


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

    Links: [bugreport] [fix]
    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


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

    Links: [bugreport] [fix]
    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


  • #136 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


  • #137 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


  • #138 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


  • #139 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


  • #140 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


  • #141 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


  • #142 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


  • #143 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


  • #144 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


  • #145 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


  • #146 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


  • #147 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


  • #148 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


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

    Links: [bugreport] [fix]
    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


  • #150 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


  • #151 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


  • #152 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)
    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


  • #153 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


  • #154 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


  • #155 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


  • #156 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


  • #157 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


  • #158 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


  • #159 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


  • #160 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


  • #161 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


  • #162 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


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

    Links: [bugreport] [fix]
    Date found: 28/12/2019
    Status: fixed
    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


  • #164 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


  • #165 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


  • #166 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


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

    Links: [bugreport] [fix]
    Date found: 30/12/2019
    Status: fixed
    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


  • #168 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


  • #169 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


  • #170 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: NoREC


  • #171 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: NoREC


  • #172 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: NoREC


  • #173 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: NoREC


  • #174 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
    Oracle: TLP (aggregate)


  • #175 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
    Oracle: TLP (aggregate)


  • #176 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
    Oracle: TLP (aggregate)


  • #177 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: TLP (DISTINCT)


  • #178 Incorrect result for IN expression with right-hand IS TRUE sub-expression

    Links: [bugreports] [fix]
    Date found: 24/08/2020
    Status: fixed
    Test case:
    SELECT (1 IN (2 IS TRUE)); -- expected: {1}, actual: {0}
    
    Test case LOC: 1
    Oracle: PQS


  • #179 Unexpected result for % and '1E1'

    Links: [bugreport] [fix]
    Date found: 27/08/2020
    Status: fixed (in documentation)
    Test case:
    SELECT 1 % '1E1'; -- expected: {1.0}, actual: {0.0}
    
    Test case LOC: 1
    Oracle: PQS


PostgreSQL

  • #1 GROUP BY and inheritance issue

    Links: [email] [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: PQS


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

    Links: [email] [email 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


  • #3 ERROR: found unexpected null value in index

    Links: [email] [fix]
    Date found: 10/07/2019
    Status: fixed
    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


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

    Links: [email]
    Date found: 10/07/2019
    Status: fixed
    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 Multiple inheritance and ALTER TABLE issue

    Links: [email]
    Date found: 27/07/2019
    Status: fixed
    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


  • #7 INSERT INTO causes segfault on trunk

    Links: Date found: 24/09/2019
    Status: fixed
    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: crash


  • #8 REINDEX CONCURRENTLY unexpectedly fails

    Links: [email]
    Date found: 13/11/2019
    Status: fixed
    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


  • #9 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


  • #10 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


  • #11 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


  • #12 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


  • #13 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


  • #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: PQS


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

    Links: [bugtracker]
    Date found: 22/06/2019
    Status: fixed
    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: PQS


  • #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: PQS


  • #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


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

    Links: Date found: 23/06/2019
    Status: fixed
    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: crash


  • #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: PQS


  • #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: PQS


  • #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: PQS


  • #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: PQS


  • #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: PQS


  • #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: PQS


  • #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: PQS


  • #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


  • #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: PQS


  • #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: PQS


  • #17 Query with GREATEST function malfunctions

    Links: [email]
    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: PQS


  • #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
    Oracle: TLP (WHERE)


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

    Links: [bugreport]
    Date found: 01/04/2020
    Status: fixed
    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
    Oracle: TLP (WHERE)


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: NoREC


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: NoREC


  • #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 Internal error in expression that uses a CAST and COLLATE

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


  • #4 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


  • #5 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


  • #6 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


  • #7 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: NoREC


  • #8 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


  • #9 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: NoREC


  • #10 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: NoREC


  • #11 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


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

    Links: [bugreport] [fix]
    Date found: 23/01/2020
    Status: fixed
    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: NoREC


  • #13 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


  • #14 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


  • #15 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


  • #16 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: NoREC


  • #17 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


  • #18 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


  • #19 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


  • #20 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


  • #21 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


  • #22 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


  • #23 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


  • #24 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


  • #25 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


  • #26 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


  • #27 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


  • #28 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


  • #29 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


  • #30 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


  • #31 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: PQS


  • #32 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


  • #33 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


  • #34 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
    Oracle: TLP (aggregate)


  • #35 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


  • #36 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


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

    Links: [bugreport] [fix]
    Date found: 21/03/2020
    Status: fixed
    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


  • #38 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


  • #39 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


  • #40 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


  • #41 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


  • #42 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
    Oracle: TLP (HAVING)


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

    Links: [bugreport]
    Date found: 24/03/2020
    Status: fixed
    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


  • #44 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


  • #45 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


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

    Links: [bugreport]
    Date found: 02/04/2020
    Status: fixed
    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


  • #47 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


  • #48 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


  • #49 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
    Oracle: TLP (WHERE)


  • #50 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
    Oracle: TLP (aggregate)


  • #51 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


  • #52 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


  • #53 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


  • #54 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
    Oracle: TLP (WHERE)


  • #55 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


  • #56 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
    Oracle: TLP (WHERE)


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
    Oracle: TLP (WHERE)


  • #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
    Oracle: TLP (WHERE)


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

    Links: [bugreport] [fix]
    Date found: 26/03/2020
    Status: fixed
    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
    Oracle: TLP (WHERE)


  • #4 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


  • #5 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


  • #6 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


  • #7 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
    Oracle: TLP (WHERE)


  • #8 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


  • #9 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: TLP (GROUP BY)


  • #10 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
    Oracle: TLP (WHERE)


  • #11 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


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

    Links: [bugreport] [fix]
    Date found: 30/03/2020
    Status: fixed
    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


  • #13 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
    Oracle: TLP (WHERE)


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

    Links: [bugreport] [fix]
    Date found: 30/03/2020
    Status: fixed
    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


  • #15 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


  • #16 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


  • #17 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
    Oracle: TLP (WHERE)


  • #18 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
    Oracle: TLP (WHERE)


  • #19 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
    Oracle: TLP (WHERE)


  • #20 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


  • #21 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


  • #22 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


  • #23 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
    Oracle: TLP (WHERE)


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

    Links: [bugreport] [fix]
    Date found: 02/04/2020
    Status: fixed
    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


  • #25 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


  • #26 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
    Oracle: TLP (WHERE)


  • #27 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
    Oracle: TLP (WHERE)


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

    Links: [bugreport] [fix]
    Date found: 02/04/2020
    Status: fixed
    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


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

    Links: [bugreport]
    Date found: 02/04/2020
    Status: fixed
    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
    Oracle: TLP (WHERE)


  • #30 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


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

    Links: [bugreport] [fix]
    Date found: 15/04/2020
    Status: fixed
    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
    Oracle: TLP (WHERE)


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

    Links: [bugreport] [fix]
    Date found: 15/04/2020
    Status: fixed
    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
    Oracle: TLP (WHERE)


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

    Links: [bugreport]
    Date found: 15/04/2020
    Status: fixed
    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
    Oracle: TLP (WHERE)


  • #34 Incorrect result when fetching from a view

    Links: [bugreport]
    Date found: 15/04/2020
    Status: fixed
    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
    Oracle: TLP (WHERE)


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

    Links: [bugreport] [fix]
    Date found: 15/04/2020
    Status: fixed
    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


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

    Links: [bugreport] [fix]
    Date found: 15/04/2020
    Status: fixed
    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
    Oracle: TLP (WHERE)


  • #37 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


  • #38 Incorrect result for CAST to DATETIME

    Links: [bugreport] [fix]
    Date found: 15/04/2020
    Status: fixed
    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
    Oracle: TLP (WHERE)


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

    Links: [bugreport] [fix]
    Date found: 15/04/2020
    Status: fixed
    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


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

    Links: [bugreport] [fix]
    Date found: 15/04/2020
    Status: fixed
    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


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

    Links: [bugreport] [fix]
    Date found: 15/04/2020
    Status: fixed
    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


  • #42 Incorrect result for LEFT JOIN and CASE operator

    Links: [bugreport]
    Date found: 15/04/2020
    Status: fixed
    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
    Oracle: TLP (WHERE)


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

    Links: [bugreport] [fix]
    Date found: 19/04/2020
    Status: fixed
    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


  • #44 Incorrect result for LEFT JOIN AND NULLIF

    Links: [bugreport]
    Date found: 20/04/2020
    Status: fixed
    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
    Oracle: TLP (WHERE)


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

    Links: [bugreport]
    Date found: 22/04/2020
    Status: fixed
    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
    Oracle: TLP (WHERE)


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

    Links: [bugreport] [fix]
    Date found: 22/04/2020
    Status: fixed
    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
    Oracle: TLP (WHERE)


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

    Links: [bugreport]
    Date found: 22/04/2020
    Status: fixed
    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
    Oracle: TLP (WHERE)


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

    Links: [bugreport] [fix]
    Date found: 22/04/2020
    Status: fixed
    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


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

    Links: [bugreport]
    Date found: 22/04/2020
    Status: fixed
    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


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

    Links: [bugreport]
    Date found: 22/04/2020
    Status: fixed
    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


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

    Links: [bugreport]
    Date found: 22/04/2020
    Status: fixed
    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


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

    Links: [bugreport] [fix]
    Date found: 22/04/2020
    Status: fixed
    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
    Oracle: TLP (WHERE)


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

    Links: [bugreport] [fix]
    Date found: 22/04/2020
    Status: fixed
    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


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

    Links: [bugreport]
    Date found: 23/04/2020
    Status: fixed
    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
    Oracle: TLP (WHERE)


  • #55 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
    Oracle: TLP (WHERE)


  • #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
    Oracle: TLP (WHERE)


  • #3 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


  • #4 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
    Oracle: TLP (WHERE)


  • #5 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


  • #6 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


  • #7 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


  • #8 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


  • #9 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


  • #10 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
    Oracle: TLP (WHERE)


  • #11 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


  • #12 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


  • #13 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


  • #14 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
    Oracle: TLP (WHERE)


  • #15 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


  • #16 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
    Oracle: TLP (WHERE)


  • #17 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
    Oracle: TLP (WHERE)


  • #18 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


  • #19 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
    Oracle: TLP (WHERE)


  • #20 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


  • #21 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
    Oracle: TLP (WHERE)


  • #22 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
    Oracle: TLP (WHERE)


  • #23 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
    Oracle: TLP (WHERE)


  • #24 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
    Oracle: TLP (WHERE)


  • #25 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


  • #26 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
    Oracle: TLP (WHERE)


  • #27 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


  • #28 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


  • #29 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


  • #30 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
    Oracle: TLP (HAVING)


  • #31 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
    Oracle: TLP (HAVING)


  • #32 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


  • #33 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
    Oracle: TLP (WHERE)


  • #34 [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


  • #35 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
    Oracle: TLP (aggregate)


  • #36 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
    Oracle: TLP (aggregate)


  • #37 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


  • #38 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


  • #39 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


  • #40 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


  • #41 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
    Oracle: TLP (aggregate)


  • #42 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


  • #43 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


  • #44 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
    Oracle: TLP (WHERE)


  • #45 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


  • #46 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
    Oracle: TLP (WHERE)


  • #47 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


  • #48 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: TLP (DISTINCT)


  • #49 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
    Oracle: TLP (WHERE)


  • #50 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
    Oracle: TLP (WHERE)


  • #51 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
    Oracle: TLP (WHERE)


  • #52 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


  • #53 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


  • #54 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
    Oracle: TLP (WHERE)


  • #55 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


  • #56 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
    Oracle: TLP (WHERE)


  • #57 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


  • #58 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


  • #59 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


  • #60 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: TLP (GROUP BY)


  • #61 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


  • #62 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
    Oracle: TLP (aggregate)


  • #63 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


  • #64 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


  • #65 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


  • #66 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


  • #67 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


  • #68 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


  • #69 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


  • #70 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


  • #71 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


  • #72 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


  • #73 Buffer overflow in duckdb::ART::IteratorNext

    Links: [bugreport] [fix]
    Date found: 24/09/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 VARCHAR UNIQUE);
    INSERT INTO t0 VALUES('19691214 051350'), (1), ('19700118'), (0), ('1969-1214 102704'), ('1969-12-14'), ('1969-12-14 114142'), ('1969-12-30 040325'), ('1969-12-18 044750'), ('1969-12-14 100915');
    SELECT * FROM t0 WHERE '19691' > c0;
    
    Test case LOC: 3
    Oracle: crash


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


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

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


H2

  • #1 Query with an expression "NOT NOT - C0" causes a NullPointerException

    Links: [bugreport] [fix]
    Date found: 12/08/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 INT);
    SELECT * FROM t0 WHERE NOT NOT - C0; -- General error: "java.lang.NullPointerException" [50000-200] HY000/50000
    
    Test case LOC: 2
    Oracle: error


  • #2 Incorrect result for query and NOT (c0 != -1 AND c0) predicate

    Links: [bugreport] [fix]
    Date found: 12/08/2020
    Status: fixed
    Test case:
    CREATE TABLE T0(c0 BOOL);
    INSERT INTO T0(c0) VALUES (true);
    SELECT * FROM t0 WHERE NOT (c0 != 2 AND c0) -- expected: {}, actual: {TRUE}
    
    Test case LOC: 3
    Oracle: TLP (WHERE)


  • #3 Unexpected result for query that compares an integer with a string

    Links: [bugreport] [fix]
    Date found: 14/08/2020
    Status: fixed
    Test case:
    CREATE TABLE T0(c0 VARCHAR UNIQUE);
    INSERT INTO T0(C0) VALUES (-1), (-2);
    SELECT * FROM T0 WHERE c0 >= -1; -- expected: {-1, -2}, actual: {-2}
    
    Test case LOC: 3
    Oracle: TLP (WHERE)


  • #4 Query with CASE operator unexpectedly results in "Column must be in the GROUP BY list" error

    Links: [bugreport] [fix]
    Date found: 14/08/2020
    Status: fixed
    Test case:
    CREATE TABLE T0(c0 INT);
    CREATE TABLE T1(c0 BOOL);
    INSERT INTO T0 VALUES (0);
    SELECT * FROM T0, T1 WHERE (CASE T1.c0 WHEN T1.c0 THEN T1.c0 END); -- Column "T1.C0" must be in the GROUP BY list
    
    Test case LOC: 4
    Oracle: error


  • #5 Query on view that uses the BETWEEN operator results in an unexpected syntax error

    Links: [bugreport] [fix]
    Date found: 15/08/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c1 INT);
    CREATE VIEW v0(c0) AS SELECT * FROM t0 WHERE false BETWEEN (t0.C1 IS NULL) AND true;
    SELECT * FROM v0; -- View "PUBLIC.V0" is invalid: "Syntax error in SQL statement [...]
    
    Test case LOC: 3
    Oracle: error


  • #6 Query with % operator results in a ClassCastException

    Links: [bugreport] [fix]
    Date found: 18/08/2020
    Status: fixed
    Test case:
    CREATE TABLE T0(c0 DOUBLE);
    INSERT INTO T0(c0) VALUES (0);
    SELECT * FROM T0 WHERE c0 % 0.1; -- General error: "java.lang.ClassCastException: class org.h2.value.ValueDecfloat cannot be cast to class org.h2.value.ValueNumeric (org.h2.value.ValueDecfloat and org.h2.value.ValueNumeric are in unnamed module of loader 'app')";
    
    Test case LOC: 3
    Oracle: error


  • #7 Table with a generated column cycle results in a NullPointerException

    Links: [bugreport] [fix]
    Date found: 18/08/2020
    Status: fixed
    Test case:
    CREATE TABLE t0(c0 BOOL AS (NOT c1), c1 BOOL AS (c0)); -- General error: "java.lang.NullPointerException"
    
    Test case LOC: 1
    Oracle: error


  • #8 Query on view with BINARY column results in an unexpected syntax error

    Links: [bugreport] [fix]
    Date found: 18/08/2020
    Status: fixed
    Test case:
    CREATE TABLE T0(c0 BINARY);
    CREATE VIEW V0(c0) AS SELECT T0.C0 FROM T0 WHERE (CASE NULL WHEN (NOT T0.C0) THEN 1 END);
    SELECT * FROM V0;
    
    Test case LOC: 3
    Oracle: error


  • #9 Restore YEAR data type for MySQL compatibility mode

    Links: [bugreport] [fix]
    Date found: 19/08/2020
    Status: fixed
    Test case:
    SELECT CAST(1 AS YEAR); -- Syntax error in SQL statement
    
    Test case LOC: 1
    Oracle: error


  • #10 Calling math functions with a string argument results in a NullPointerException

    Links: [bugreport] [fix]
    Date found: 19/08/2020
    Status: fixed
    Test case:
    SELECT CEIL('a'); -- NullPointerException
    
    Test case LOC: 1
    Oracle: error


  • #11 MERGE INTO causes an unexpected syntax error

    Links: [bugreport] [fix]
    Date found: 19/08/2020
    Status: fixed
    Test case:
    CREATE TABLE T0(c0 INT AS (1), c1 INT);
    MERGE INTO T0(C0) KEY(C1) VALUES (1); -- Syntax error in SQL statement "UPDATE ""PUBLIC"".""T0"" SET  WHERE[*] ""C1""=?"
    
    Test case LOC: 2
    Oracle: error


  • #12 ROUND() function runs very long

    Links: [bugreport] [fix]
    Date found: 19/08/2020
    Status: fixed
    Test case:
    SELECT ROUND(1, 10000000);
    
    Test case LOC: 1
    Oracle: crash


  • #13 INSERT() with NULL arguments for the original string and string to be added results in NPE

    Links: [bugreport] [fix]
    Date found: 19/08/2020
    Status: fixed
    Test case:
    SELECT INSERT(NULL, 0, 0, NULL); -- NullPointerException
    
    Test case LOC: 1
    Oracle: error


  • #14 Querying a view that uses the POSITION() function results in an unexpected syntax error

    Links: [bugreport] [fix]
    Date found: 19/08/2020
    Status: fixed
    Test case:
    CREATE TABLE T0(c0 INT);
    CREATE VIEW v0(c0) AS SELECT * FROM T0 WHERE POSITION((C0 > 0), 0);
    SELECT * FROM V0; -- Syntax error in SQL statement
    
    Test case LOC: 3
    Oracle: error


  • #15 Call to STRINGDECODE results in StringIndexOutOfBoundsException

    Links: [bugreport] [fix]
    Date found: 20/08/2020
    Status: fixed
    Test case:
    SELECT STRINGDECODE(X'5c38'); -- StringIndexOutOfBoundsException
    
    Test case LOC: 1
    Oracle: error


  • #16 Querying view that uses LTRIM/RTRIM results in a syntax error

    Links: [bugreport] [fix]
    Date found: 20/08/2020
    Status: fixed
    Test case:
    CREATE TABLE T0(c0 VARCHAR);
    CREATE VIEW v0(c0) AS SELECT RTRIM(c0) FROM T0;
    SELECT * FROM V0; -- Syntax error in SQL statement
    
    Test case LOC: 3
    Oracle: error


  • #17 CREATE TABLE with a BINARY column and large size specification results in a NegativeArraySizeException

    Links: [bugreport] [fix]
    Date found: 25/08/2020
    Status: fixed
    Test case:
    CREATE TABLE T0(c0 BINARY(1500000000));
    INSERT INTO T0(c0) VALUES (0);
    DELETE FROM T0; -- General error: "java.lang.NegativeArraySizeException: -1294959092"
    
    Test case LOC: 3
    Oracle: error


Unique confirmed bugs

PostgreSQL

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

    Links: [email]
    Date found: 4/07/2019
    Status: verified
    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


  • #2 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


  • #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


  • #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


  • #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


  • #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: PQS


  • #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


  • #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


  • #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
    Oracle: TLP (WHERE)


  • #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
    Oracle: TLP (WHERE)


  • #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
    Oracle: TLP (WHERE)


  • #11 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
    Oracle: TLP (WHERE)


  • #12 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
    Oracle: TLP (WHERE)


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: NoREC


  • #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: NoREC


  • #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: NoREC


  • #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


  • #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: NoREC


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: NoREC


  • #2 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


  • #3 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


  • #4 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


  • #5 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


  • #6 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


  • #7 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
    Oracle: TLP (aggregate)


  • #8 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


  • #9 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


  • #10 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


  • #11 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


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: PQS


H2

  • #1 MERGE INTO fails with an error "Timeout trying to lock table"

    Links: [bugreport]
    Date found: 19/08/2020
    Status: open
    Test case:
    CREATE TABLE T0(c0 BOOL, PRIMARY KEY(c0));
    MERGE INTO T0(C0) VALUES (TRUE);
    MERGE INTO T0(C0) VALUES (2); -- Timeout trying to lock table {0};
    
    Test case LOC: 3
    Oracle: error


Closed/Duplicate bug reports

SQLite

  • #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


  • #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


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

    Links: [email] [fix]
    Date found: 2/5/2019
    Status: closed (duplicate)
    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


  • #4 GLOB and minus in index and real column

    Links: [email] [fix]
    Date found: 3/5/2019
    Status: closed (duplicate)
    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


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

    Links: [email]
    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: PQS


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

    Links: [email]
    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


  • #7 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: PQS


  • #8 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


  • #9 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: NoREC


  • #10 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: NoREC


  • #11 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


  • #12 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: NoREC


  • #13 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


  • #14 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: NoREC


PostgreSQL

  • #1 VACUUM FULL results in deadlock

    Links: [email]
    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


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

    Links: [email]
    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


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

    Links: [email]
    Date found: 02/07/2019
    Status: closed (duplicate)
    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


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

    Links: [email]
    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


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

    Links: [email]
    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: PQS


  • #6 Generated column and string concatenation issue

    Links: [email]
    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


  • #7 SEGFAULT in 12beta2 release

    Links: Date found: 10/07/2019
    Status: closed (duplicate)
    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: crash


  • #8 Stack buffer overflow in 12beta2 release

    Links: Date found: 11/07/2019
    Status: closed (duplicate)
    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: crash


  • #9 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: crash


  • #10 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: crash


  • #11 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


  • #12 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


  • #13 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


  • #14 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


  • #15 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


  • #2 Applying NOT twice on an integer results in wrong result in WHERE condition

    Links: [bugtracker]
    Date found: 20/06/2019
    Status: closed (duplicate)
    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: PQS


  • #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


  • #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


  • #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
    Oracle: TLP (WHERE)


  • #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
    Oracle: TLP (WHERE)


  • #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
    Oracle: TLP (WHERE)


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


TiDB

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

    Links: [bugreport]
    Date found: 01/04/2020
    Status: closed (duplicate)
    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
    Oracle: TLP (WHERE)


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

    Links: [bugreport]
    Date found: 15/04/2020
    Status: closed (duplicate)
    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
    Oracle: TLP (WHERE)


  • #3 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
    Oracle: TLP (WHERE)


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

    Links: [bugreport]
    Date found: 15/04/2020
    Status: closed (duplicate)
    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


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

    Links: [bugreport]
    Date found: 22/04/2020
    Status: closed (duplicate)
    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
    Oracle: TLP (WHERE)


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

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


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

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


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
    Oracle: TLP (WHERE)


  • #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


H2

  • #1 Expression NOT(c0 AND c0) unexpectedly evaluates to FALSE

    Links: [bugreport]
    Date found: 12/08/2020
    Status: closed (duplicate)
    Test case:
    CREATE TABLE T0(c0 VARCHAR);
    INSERT INTO T0(C0) VALUES ('f');
    SELECT * FROM T0 WHERE NOT(C0 AND C0); -- expected: {'f'}, actual: {}
    
    Test case LOC: 3
    Oracle: TLP (WHERE)