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

bug: after altering operation, NULL values is evlauated to be TRUE in StoneDB #1945

Open
2 of 3 tasks
ZhengLin-Li opened this issue Jul 18, 2023 · 0 comments
Open
2 of 3 tasks
Assignees
Labels
A-bug Something isn't working

Comments

@ZhengLin-Li
Copy link

ZhengLin-Li commented Jul 18, 2023

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Describe the problem

SQLancer found that, after altering operation, NULL values is evlauated to be TRUE in StoneDB.

However, accroding to link: In MySQL, 0 or NULL means false and anything else means true. The default truth value from a boolean operation is 1.

Result in StoneDB:

image

Result in MySQL 5.7:

image

Expected behavior

No response

How To Reproduce

CREATE TABLE t0(c0 DATE);
INSERT INTO t0(c0) VALUES (DATE '1970-01-04'), (DEFAULT);
ALTER TABLE t0 CHANGE c0 c0 TEXT ;
SELECT * FROM t0 WHERE t0.c0 IS TRUE;
SELECT t0.c0 IS TRUE FROM t0;

Environment

Docker image v:1.0.4

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

  • Yes, I will!
@ZhengLin-Li ZhengLin-Li added the A-bug Something isn't working label Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants