stoneatom / stonedb

StoneDB is an Open-Source MySQL HTAP and MySQL-Native DataBase for OLTP, Real-Time Analytics, a counterpart of MySQLHeatWave. (https://stonedb.io)
https://stonedb.io/
GNU General Public License v2.0
857 stars 140 forks source link

bug: query result wrong: INSERT, DELETE, UNION ALL #1956

Open ZhengLin-Li opened 11 months ago

ZhengLin-Li commented 11 months ago

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

Describe the problem

The query result does not meet expectation

StoneDB V1.0.4 Result

image

Expected behavior

MySQL 5.7 Result

image

How To Reproduce

CREATE TABLE t0(c0 INT, c1 CHAR) ;
INSERT INTO t0(c1) VALUE (1);
DELETE  FROM t0;

SELECT * FROM t0 WHERE t0.c1 IS TRUE UNION ALL SELECT * FROM t0 WHERE (t0.c1 IS NOT TRUE);

Environment

Docker v1.0.4

Are you interested in submitting a PR to solve the problem?