-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
affects-5.0This bug affects 5.0.x versions.This bug affects 5.0.x versions.affects-5.1This bug affects 5.1.x versions.This bug affects 5.1.x versions.affects-5.2This bug affects 5.2.x versions.This bug affects 5.2.x versions.affects-5.3This bug affects 5.3.x versions.This bug affects 5.3.x versions.severity/majorsig/executionSIG executionSIG executiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
drop table t1;
create table t1(c1 bigint unsigned, c2 bigint unsigned);
insert into t1 values(9223372036854775808, 9223372036854775809);
select greatest(c1, c2) from t1;
2. What did you expect to see? (Required)
mysql> select greatest(c1, c2) from t2;
+---------------------+
| greatest(c1, c2) |
+---------------------+
| 9223372036854775808 |
+---------------------+
1 row in set (0.01 sec)
3. What did you see instead (Required)
mysql> select greatest(c1, c2) from t1;
+----------------------+
| greatest(c1, c2) |
+----------------------+
| -9223372036854775807 |
+----------------------+
1 row in set (0.01 sec)
4. What is your TiDB version? (Required)
master
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
affects-5.0This bug affects 5.0.x versions.This bug affects 5.0.x versions.affects-5.1This bug affects 5.1.x versions.This bug affects 5.1.x versions.affects-5.2This bug affects 5.2.x versions.This bug affects 5.2.x versions.affects-5.3This bug affects 5.3.x versions.This bug affects 5.3.x versions.severity/majorsig/executionSIG executionSIG executiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.