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

Incompatible Results for GREATEST Function #53694

Open
dwenking opened this issue May 30, 2024 · 0 comments
Open

Incompatible Results for GREATEST Function #53694

dwenking opened this issue May 30, 2024 · 0 comments
Labels
compatibility-mysql8 This is a compatibility issue with MySQL 8.0(but NOT 5.7) severity/minor sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@dwenking
Copy link

Bug Report

There is a compatibility issue between TiDB and MySQL 8 when using the GREATEST function.

1. Minimal reproduce step (Required)

Set up the table:

CREATE TABLE t0 (c_0 DOUBLE, c_1 TEXT, c_2 DOUBLE);
INSERT INTO t0 VALUES (8.127934079803597e+27, 633230464, 8.127934079803597e+27);

Execute the following query:

SELECT (GREATEST(t0.c_0, t0.c_1)) FROM t0;

Observed Results:

MySQL8 returns 8.127934079803597e27 and TiDB returns 8127934079803597000000000000

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

The query returns the same result in both MySQL 8 and TiDB.

3. What did you see instead (Required)

See part 1.

4. What is your TiDB version? (Required)

Release Version: v7.5.1
Edition: Community
Git Commit Hash: 7d16cc7
Git Branch: heads/refs/tags/v7.5.1
UTC Build Time: 2024-02-27 14:30:59
GoVersion: go1.21.6
Race Enabled: false
Check Table Before Drop: false
Store: tikv

@dwenking dwenking added the type/bug The issue is confirmed as a bug. label May 30, 2024
@jebter jebter added sig/execution SIG execution severity/minor compatibility-mysql8 This is a compatibility issue with MySQL 8.0(but NOT 5.7) labels May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility-mysql8 This is a compatibility issue with MySQL 8.0(but NOT 5.7) severity/minor sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

2 participants