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

union result is not same as mysql #11590

Closed
H-ZeX opened this issue Aug 2, 2019 · 5 comments
Closed

union result is not same as mysql #11590

H-ZeX opened this issue Aug 2, 2019 · 5 comments
Labels
type/bug The issue is confirmed as a bug. type/compatibility

Comments

@H-ZeX
Copy link
Contributor

H-ZeX commented Aug 2, 2019

Bug Report

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
create table t(a int);
create table s(a int unsigned);

insert into t value(-1);
insert into s value(1);
  1. What did you expect to see?
select * from t union all select * from s;
+------+
| a    |
+------+
|   -1 |
|    1 |
+------+

select * from s union all select * from t;
+------+
| a    |
+------+
|   -1 |
|    1 |
+------+
  1. What did you see instead?
select * from t union all select * from s;
+------+
| a    |
+------+
|   -1 |
|    1 |
+------+

select * from s union all select * from t;
+------+
| a    |
+------+
|    0 |
|    1 |
+------+
  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
Release Version: v4.0.0-alpha-15-gd2b538718
Git Commit Hash: d2b5387183a591847f952aa4e3a3c4597c34dcba
Git Branch: HEAD
UTC Build Time: 2019-08-02 08:50:35
GoVersion: go version go1.12.6 linux/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false
mysqld  Ver 8.0.13 for linux-glibc2.12 on x86_64 (MySQL Community Server - GPL)
  1. relate issue
    union result is not differ from mysql #7075
@H-ZeX H-ZeX added the type/bug The issue is confirmed as a bug. label Aug 2, 2019
@zz-jason
Copy link
Member

zz-jason commented Aug 2, 2019

@SunRunAway PTAL

@SunRunAway
Copy link
Contributor

Hi, @H-ZeX
could you provide the version of your MySQL server?

@H-ZeX
Copy link
Contributor Author

H-ZeX commented Aug 2, 2019

Hi, @H-ZeX
could you provide the version of your MySQL server?

mysqld  Ver 8.0.13 for linux-glibc2.12 on x86_64 (MySQL Community Server - GPL)

@SunRunAway

@SunRunAway
Copy link
Contributor

TiDB aims to compatible with MySQL5.7 so it seems to be fixed in #7075

@SunRunAway
Copy link
Contributor

Hi, @H-ZeX
I'm closing this issue now, feel free to reopen it if I'm wrong.

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. type/compatibility
Projects
None yet
Development

No branches or pull requests

3 participants