You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/07/01 04:10:12 UTC

[GitHub] [shardingsphere] nkuflk opened a new issue #6228: mysql alias table not work when I upgrade from 4.0.0 to 4.0.1

nkuflk opened a new issue #6228:
URL: https://github.com/apache/shardingsphere/issues/6228


   I have a SQL
   `       
   SELECT min(id) AS min_id, max(id) AS max_id
           from (
               select id
               FROM msg
               WHERE id &gt; #{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]
   `


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] nkuflk commented on issue #6228: mysql alias table not work when I upgrade from 4.0.0 to 4.0.1

Posted by GitBox <gi...@apache.org>.
nkuflk commented on issue #6228:
URL: https://github.com/apache/shardingsphere/issues/6228#issuecomment-652755034


   I hope to use 4.1.1 because it has long sql optimize. But 4.1.1 still not work for alias table.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking closed issue #6228: table name is not rewrited correctly in subquery

Posted by GitBox <gi...@apache.org>.
kimmking closed issue #6228:
URL: https://github.com/apache/shardingsphere/issues/6228


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] nkuflk commented on issue #6228: table name is not rewrited correctly in subquery

Posted by GitBox <gi...@apache.org>.
nkuflk commented on issue #6228:
URL: https://github.com/apache/shardingsphere/issues/6228#issuecomment-653702440


   > @nkuflk Now the pr #6259 fix it,but plz use alias in whereClause and projections, Alias not applicable in subquery is not supported.
   
   Thanks


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking commented on issue #6228: mysql alias table not work when I upgrade from 4.0.0 to 4.0.1

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #6228:
URL: https://github.com/apache/shardingsphere/issues/6228#issuecomment-653008793


   @jingshanglu will track it.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] jingshanglu commented on issue #6228: table name is not rewrited correctly in subquery

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on issue #6228:
URL: https://github.com/apache/shardingsphere/issues/6228#issuecomment-653465604


   @nkuflk Now the pr #6259 fix it,but plz use alias in whereClause and projections, Alias not applicable in subquery is not supported.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking commented on issue #6228: mysql alias table not work when I upgrade from 4.0.0 to 4.0.1

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #6228:
URL: https://github.com/apache/shardingsphere/issues/6228#issuecomment-652312443


   you can try 4.1.1.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] nkuflk commented on issue #6228: mysql alias table not work when I upgrade from 4.0.0 to 4.0.1

Posted by GitBox <gi...@apache.org>.
nkuflk commented on issue #6228:
URL: https://github.com/apache/shardingsphere/issues/6228#issuecomment-652754645


   > 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 review the SQLParseEngine in shardingsphere-sql-parser, it has a big upgrade in 4.0.1, maybe the upgrade has some problem.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] jingshanglu commented on issue #6228: table name is not rewrited correctly in subquery

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on issue #6228:
URL: https://github.com/apache/shardingsphere/issues/6228#issuecomment-653420167


   @kimmking @nkuflk Ok, i'll check it.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org