Skip to content

group_concat produces wrong result #19786

@dyzsr

Description

@dyzsr

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Load group_concat.sql in group_concat.sql.zip, then execute

select group_concat(a) from t;

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

mysql 8.0

mysql> select group_concat(a) from t;
+-----------------+
| group_concat(a) |
+-----------------+
| 1,1,1,2,2,2     |
+-----------------+
1 row in set (0.00 sec)

3. What did you see instead (Required)

mysql> select group_concat(a) from t;
+-----------------+
| group_concat(a) |
+-----------------+
| 2,2,2,1,1,1     |
+-----------------+
1 row in set (0.00 sec)

4. What is your TiDB version? (Required)

mysql> select tidb_version();
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                                                             |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v4.0.5
Edition: Community
Git Commit Hash: 9c1c21270001a0084dcb5d842c50e1fbea5d1fa8
Git Branch: heads/v4.0.5
UTC Build Time: 2020-08-31 10:07:42
GoVersion: go1.13.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugThe issue is confirmed as a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions