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

group_concat produces wrong result #19786

Closed
dyzsr opened this issue Sep 4, 2020 · 2 comments
Closed

group_concat produces wrong result #19786

dyzsr opened this issue Sep 4, 2020 · 2 comments
Labels
type/bug The issue is confirmed as a bug.

Comments

@dyzsr
Copy link
Contributor

dyzsr commented Sep 4, 2020

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)
@dyzsr dyzsr added the type/bug The issue is confirmed as a bug. label Sep 4, 2020
@dyzsr dyzsr closed this as completed Sep 4, 2020
@seiya-annie
Copy link

/info

@pingcap pingcap deleted a comment from ti-srebot Sep 5, 2020
@pingcap pingcap deleted a comment from ti-srebot Sep 5, 2020
@pingcap pingcap deleted a comment from ti-srebot Sep 5, 2020
@pingcap pingcap deleted a comment from ti-srebot Sep 5, 2020
@pingcap pingcap deleted a comment from ti-srebot Sep 5, 2020
@pingcap pingcap deleted a comment from ti-srebot Sep 5, 2020
@dyzsr
Copy link
Contributor Author

dyzsr commented Sep 7, 2020

This is not a correct issue.

  • group_concat without order by inside parentheses doesn't have to preserve the data order of concatenating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

2 participants