-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
table name is not rewrited correctly in subquery #6228
Comments
you can try 4.1.1. |
4.1.1 also has this problem. I have tried 4.0.0, 4.0.1, 4.1.0, 4.1.1, only 4.0.0 is ok. |
I hope to use 4.1.1 because it has long sql optimize. But 4.1.1 still not work for alias table. |
@jingshanglu will track it. |
kimmking
changed the title
mysql alias table not work when I upgrade from 4.0.0 to 4.0.1
table name is not rewrited correctly in subquery
Jul 3, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a SQL
SELECT min(id) AS min_id, max(id) AS max_id from ( select id FROM msg WHERE id > #{minId} AND date = #{date} ORDER BY id limit #{step} ) a
In version 4.0.0, the actual in log is
SELECT min(id) AS min_id, max(id) AS max_id from ( select id FROM msg_10 WHERE id > ? AND date = ? ORDER BY id limit ? ) a ::: [-1, 2019-04-26 00:00:00.0, 1]
But when I upgrade to 4.0.1, the actual sql in log is
SELECT min(id) AS min_id, max(id) AS max_id from ( select id FROM msg WHERE id > ? AND date = ? ORDER BY id limit ? ) a ::: [-1, 2019-04-26 00:00:00.0, 1]
The text was updated successfully, but these errors were encountered: