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

TPCH q8 return different result when running with TiFlash and TiKV #7022

Closed
windtalker opened this issue Mar 10, 2023 · 0 comments · Fixed by #7035
Closed

TPCH q8 return different result when running with TiFlash and TiKV #7022

windtalker opened this issue Mar 10, 2023 · 0 comments · Fixed by #7035
Labels
affects-5.3 affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. severity/critical type/bug The issue is confirmed as a bug.

Comments

@windtalker
Copy link
Contributor

windtalker commented Mar 10, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. load tpch 10
  2. running tpch q8 with tiflash enabled
  3. running tpch q8 with tiflash disabled

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

running with tiflash and running with tikv should return the same result

3. What did you see instead (Required)

MySQL [test]> source /tmp/8.sql
+--------+---------------+-----------------+------------+
| o_year | c1            | c2              | mkt_share  |
+--------+---------------+-----------------+------------+
|   1995 | 86174753.6705 | 2184536777.5059 | 0.03944760 |
|   1996 | 85697154.4007 | 2216626585.7168 | 0.03866106 |
+--------+---------------+-----------------+------------+
2 rows in set (5.57 sec)

MySQL [test]> set tidb_isolation_read_engines='tikv';
Query OK, 0 rows affected (0.00 sec)

MySQL [test]> source /tmp/8.sql
+--------+---------------+-----------------+------------+
| o_year | c1            | c2              | mkt_share  |
+--------+---------------+-----------------+------------+
|   1995 | 86174753.6705 | 2184536777.5059 | 0.03944761 |
|   1996 | 85697154.4007 | 2216626585.7168 | 0.03866107 |
+--------+---------------+-----------------+------------+
2 rows in set (21.54 sec)

MySQL [test]> select 86174753.6705/2184536777.5059;
+-------------------------------+
| 86174753.6705/2184536777.5059 |
+-------------------------------+
|                    0.03944761 |
+-------------------------------+
1 row in set (0.01 sec)

And looks like the result of tikv is the right answer.

4. What is your TiFlash version? (Required)

master, v6.5

5. Investigate

In v6.1.3 the result is the same, but in v6.1.3 the final divide is calulated in TiDB, and in v6.5 and master, the final divide is pushed to TiFlash, I think it is related to this issue: #6462

@windtalker windtalker added type/bug The issue is confirmed as a bug. severity/critical labels Mar 10, 2023
@LittleFall LittleFall added affects-5.3 affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. and removed may-affects-4.0 may-affects-5.0 may-affects-5.1 may-affects-5.2 may-affects-5.3 may-affects-5.4 may-affects-6.1 may-affects-6.5 labels Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.3 affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. severity/critical type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants