Closed curry-oss closed 20 hours ago
Please answer these questions before submitting your issue. Thanks!
DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( id INT AUTO_INCREMENT PRIMARY KEY, col1 DOUBLE, INDEX idx_col1 (col1) ); INSERT INTO t1 (col1) VALUES (1.7976931348623157E308), (2.2250738585072014E-308), (-1.7976931348623157E308), (-2.2250738585072014E-308); ALTER TABLE t1 SET TIFLASH REPLICA 1; SELECT /*+ READ_FROM_STORAGE(TIKV[t1]) */ * FROM t1 WHERE col1 <> LOG(1 + col1) * EXP(ROUND(ABS(col1))) + SQRT(ROUND(col1)); SELECT /*+ READ_FROM_STORAGE(TIFLASH[t1]) */ * FROM t1 WHERE col1 <> LOG(1 + col1) * EXP(ROUND(ABS(col1))) + SQRT(ROUND(col1));
I believe that both TiKV and TiFlash should either throw the same errors or return the same accurate values.
mysql> SELECT /*+ READ_FROM_STORAGE(TIKV[t1]) */ * FROM t1 WHERE col1 <> LOG(1 + col1) * EXP(ROUND(ABS(col1))) + SQRT(ROUND(col1)); ERROR 1690 (22003): DOUBLE value is out of range in 'exp(179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)' mysql> SELECT /*+ READ_FROM_STORAGE(TIFLASH[t1]) */ * FROM t1 WHERE col1 <> LOG(1 + col1) * EXP(ROUND(ABS(col1))) + SQRT(ROUND(col1)); +----+--------------------------+ | id | col1 | +----+--------------------------+ | 1 | 1.7976931348623157e308 | | 2 | 2.2250738585072014e-308 | | 4 | -2.2250738585072014e-308 | +----+--------------------------+ 3 rows in set (0.05 sec)
TiDB v8.4.0
/label affects-8.4 /label affects-8.5
Duplicated with #9654
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
I believe that both TiKV and TiFlash should either throw the same errors or return the same accurate values.
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
TiDB v8.4.0