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

a specific subquery sql cause an unexpected error #4773

Closed
XuHuaiyu opened this issue Oct 15, 2017 · 1 comment
Closed

a specific subquery sql cause an unexpected error #4773

XuHuaiyu opened this issue Oct 15, 2017 · 1 comment
Labels
type/bug The issue is confirmed as a bug.

Comments

@XuHuaiyu
Copy link
Contributor

  1. What did you do?
CREATE TABLE t1 (a INT) ENGINE=INNODB;
INSERT INTO t1 VALUES (0);
CREATE TABLE t2 (d BINARY(2), PRIMARY KEY (d(1)), UNIQUE KEY (d)) ENGINE=INNODB;

SELECT 1 FROM t1, t2 WHERE 1 = (SELECT t2.d FROM t2 WHERE t1.a >= 1) and t2.d = 1;
ERROR 1052 (23000): Column 'd' in field list is ambiguous
  1. What version of TiDB are you using (tidb-server -V)?
+-----------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                          |
+-----------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: 0.9.0
Git Commit Hash: 83ace4f748018857a365b64aed59bb3cf6116bd0
Git Branch: master
UTC Build Time: 2017-10-15 01:58:48 |
+-----------------------------------------------------------------------------------------------------------------------------------------+
@ngaut ngaut added the type/bug The issue is confirmed as a bug. label Oct 15, 2017
@winoros
Copy link
Member

winoros commented Oct 16, 2017

fixed by #4770

@winoros winoros closed this as completed Oct 16, 2017
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

3 participants