We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please answer these questions before submitting your issue. Thanks!
CREATE TABLE t1 (c1 INT UNSIGNED NOT NULL); INSERT INTO t1 VALUES (0); SELECT c1 > - '7' FROM t1;
SELECT returns 1
SELECT returns 0
Release Version: v7.0.0 Edition: Community Git Commit Hash: 7376954 Git Branch: heads/refs/tags/v7.0.0 UTC Build Time: 2023-03-29 13:32:13 GoVersion: go1.20.2 Race Enabled: false TiKV Min Version: 6.2.0-alpha Check Table Before Drop: false Store: tikv
The text was updated successfully, but these errors were encountered:
The root cause may be that -'7' is erroneously converted into 0.
mysql> EXPLAIN SELECT c1 > - '7' FROM t1; +-------------------------+---------+-----------+---------------+--------------------------------+ | id | estRows | task | access object | operator info | +-------------------------+---------+-----------+---------------+--------------------------------+ | Projection_3 | 1.00 | root | | 0->Column#3 | | └─TableReader_5 | 1.00 | root | | data:TableFullScan_4 | | └─TableFullScan_4 | 1.00 | cop[tikv] | table:t1 | keep order:false, stats:pseudo | +-------------------------+---------+-----------+---------------+--------------------------------+ 3 rows in set (0.00 sec)
Sorry, something went wrong.
in mysql8:
mysql> SELECT c1 > - '7' FROM t1; +------------+ | c1 > - '7' | +------------+ | 1 | +------------+ 1 row in set (0.00 sec)
No branches or pull requests
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
SELECT returns 1
3. What did you see instead (Required)
SELECT returns 0
4. What is your TiDB version? (Required)
Release Version: v7.0.0
Edition: Community
Git Commit Hash: 7376954
Git Branch: heads/refs/tags/v7.0.0
UTC Build Time: 2023-03-29 13:32:13
GoVersion: go1.20.2
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: tikv
The text was updated successfully, but these errors were encountered: