Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems encountered when using the right join elt function together #42377

Open
DBMSTesting opened this issue Mar 19, 2023 · 3 comments
Open

Comments

@DBMSTesting
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Table building statement:
CREATE TABLE t0(c0 BOOL ZEROFILL CHECK (CAST(c0 AS CHAR)) DEFAULT NULL ) AUTO_ID_CACHE 100 ;
CREATE TABLE t1 LIKE t0;
UPDATE t0 SET c0='';
set @@tidb_index_lookup_join_concurrency=24;
UPDATE t1 SET c0='T' WHERE ((960554197)<(1891121875));
ALTER TABLE t1 ORDER BY c0 DESC;
CREATE VIEW v0(c0) AS SELECT -6.17552593E8 FROM t0 WHERE ((NULL)REGEXP((CASE (('{')>=(CAST((NOT ('-519386198')) AS DATE))) WHEN (((((~ (NULL))) IS NOT NULL))NOT REGEXP(((t0.c0)LIKE(CAST(t0.c0 AS CHAR))))) THEN ELT('&tc>', true) ELSE FIELD(NULL, -2102583696) END ))) ORDER BY CAST(-1805859464 AS DECIMAL);
TRUNCATE t0;
ALTER TABLE t0 ADD PRIMARY KEY(c0);
UPDATE t1 SET c0=-1715911751;
set @@tidb_opt_join_reorder_threshold=0;
INSERT LOW_PRIORITY IGNORE INTO t0 VALUES ('');
ALTER TABLE t1 CHANGE c0 c0 BOOL NOT NULL ;
UPDATE t1 SET c0=702875037 WHERE t1.c0;
set @@tidb_index_lookup_join_concurrency=1;

Statement that triggers a bug:
SELECT v0.c0,t0.c0 FROM v0 RIGHT JOIN t0 ON t0.c0 WHERE ((ELT(t0.c0, 'e', NULL, ((v0.c0) IS NULL))) IS NULL);

2. What did you expect to see? (Required)

Return a piece of data [null,0]

3. What did you see instead (Required)

No data returned

4. What is your TiDB version? (Required)

6.6.0

@DBMSTesting DBMSTesting added the type/bug The issue is confirmed as a bug. label Mar 19, 2023
@hawkingrei
Copy link
Member

How do you find this bug? Are you using sqlancer ?

@DBMSTesting
Copy link
Author

How do you find this bug? Are you using sqlancer ?

Our job is to complete the writing of an Oracle by ourselves, and the selected test case generation tool is sqleaner. To put it simply, we use sqleaner to generate test cases, and then test them on our own Oracle

@DBMSTesting
Copy link
Author

How do you find this bug? Are you using sqlancer ?

Hello, has this error been detected? Could you please tell me whether the five questions I have reported are confirmed or repeated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants