stonedb
stonedb copied to clipboard
bug: INSERT INTO t1 SELECT * FROM t2 WHERE x IS NULL; condition is null, the StonedB engine reported an error
Describe the problem
CREATE TABLE t1 (
ID_with_null int NULL,
ID_better int NOT NULL,
INDEX idx1 (ID_with_null),
INDEX idx2 (ID_better)
)engine=stonedb;
INSERT INTO t2 VALUES (1,1), (2,1), (null,3), (null,3), (null,3), (null,3);
INSERT INTO t1 SELECT * FROM t2 WHERE ID_with_null IS NULL;
##The error results are as follows
ERROR 1030 (HY000): Got error 124 from storage engine
Expected behavior
##Insert the success
INSERT INTO t1 SELECT * FROM t2 WHERE ID_with_null IS NULL;
##note:
1、The problem is that the where condition is null, so we need to analyze NULL;
2、The test was successful on InnoDB
How To Reproduce
CREATE TABLE t1 ( ID_with_null int NULL, ID_better int NOT NULL, INDEX idx1 (ID_with_null), INDEX idx2 (ID_better) )engine=stonedb; INSERT INTO t2 VALUES (1,1), (2,1), (null,3), (null,3), (null,3), (null,3);
INSERT INTO t1 SELECT * FROM t2 WHERE ID_with_null IS NULL;
Environment
- StoneDB for mysql5.7 (release)
- Ubuntu 20.04.4
Are you interested in submitting a PR to solve the problem?
- [ ] Yes, I will!