Description:
crash on SELECT .. WHERE <UNIQUE column>=<value> OR NOT(<same column>=<same value>)
How to repeat:
# Testcase derived from the NIST tests
# schema1, basetab, dml024
# SCHEMA,USER: HU, TABLE: STAFF
SET SESSION STORAGE_ENGINE=jstar;
CREATE TABLE t1
(EMPNUM CHAR(3) NOT NULL UNIQUE,
EMPNAME CHAR(20),
GRADE DECIMAL(4),
CITY CHAR(15));
INSERT INTO t1 VALUES ('E1','Alice',12,'Deale');
SELECT EMPNUM,CITY
FROM t1
WHERE EMPNUM='E1' OR NOT(EMPNUM='E1');
2013: Lost connection to MySQL server during query
Attention:
The variants
WHERE EMPNUM='E1' OR EMPNUM='E2' without NOT
WHERE NOT(EMPNUM='E1') without first condition
WHERE EMPNUM='E1' without second condition
WHERE EMPNUM='E1' OR NOT(EMPNUM='E2') first value ('E1') <> second ('E2')
WHERE EMPNUM='E1' OR NOT(CITY='ABC') column CITY instead of EMPNUM
are harmless.
The crash disappears also when I remove the UNIQUE constraint.
So it looks like the combination <column> IS UNIQUE and
WHERE <column>=<value> OR NOT(<same column>=<same value>)
crashes the server.
Description: crash on SELECT .. WHERE <UNIQUE column>=<value> OR NOT(<same column>=<same value>) How to repeat: # Testcase derived from the NIST tests # schema1, basetab, dml024 # SCHEMA,USER: HU, TABLE: STAFF SET SESSION STORAGE_ENGINE=jstar; CREATE TABLE t1 (EMPNUM CHAR(3) NOT NULL UNIQUE, EMPNAME CHAR(20), GRADE DECIMAL(4), CITY CHAR(15)); INSERT INTO t1 VALUES ('E1','Alice',12,'Deale'); SELECT EMPNUM,CITY FROM t1 WHERE EMPNUM='E1' OR NOT(EMPNUM='E1'); 2013: Lost connection to MySQL server during query Attention: The variants WHERE EMPNUM='E1' OR EMPNUM='E2' without NOT WHERE NOT(EMPNUM='E1') without first condition WHERE EMPNUM='E1' without second condition WHERE EMPNUM='E1' OR NOT(EMPNUM='E2') first value ('E1') <> second ('E2') WHERE EMPNUM='E1' OR NOT(CITY='ABC') column CITY instead of EMPNUM are harmless. The crash disappears also when I remove the UNIQUE constraint. So it looks like the combination <column> IS UNIQUE and WHERE <column>=<value> OR NOT(<same column>=<same value>) crashes the server.