-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
Display columns are confused by USING when selecting * from one table in a join #848
Comments
Hi @bart-schaefer, |
Sorry for the long delay, have been traveling. I was able to reproduce this on MySQL Community Edition 5.7.42 as well. The tables are defined as
And the query is
|
Thank you for the SQLs. |
This is kind of obscure ... when
table1
andtable2
share a key column named for exampleunique_id
, then given a SQL statement such asSELECT unique_id, table2.* FROM table1 JOIN table2 USING (unique_id)
only a single column named
unique_id
is returned by MySQL. That is, the columns fromtable2.*
skipunique_id
and return only the other possible columns.This causes Antares to miscount the number of return columns, and the data from
table2
is shifted over by one column, leaving mismatched column headings and a blank column at the far right. The more tables andUSING
clauses are involved, the worse the column mismatches become.This can be worked around by something like
SELECT table1.unique_id AS t1_id, table2.* FROM table1 JOIN table2 USING (unique_id)
Expected behavior
The actual column list returned by running the SELECT statement should be used to construct the displayed table, in the right order.
Application (please complete the following information):
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: