You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "irwinai (via GitHub)" <gi...@apache.org> on 2023/03/14 02:55:03 UTC

[GitHub] [shardingsphere] irwinai opened a new issue, #24584: select x.* with join with error:No such column; nested exception is java.sql.SQLException: No such column

irwinai opened a new issue, #24584:
URL: https://github.com/apache/shardingsphere/issues/24584

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   5.1.1
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   
   ### Expected behavior
   query success
   
   ### Actual behavior
   query with exception
   
   ### Reason analyze (If you can)
   I dont know
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   make query like this select xx.* with join 
   ```sql
     select t.*
           from t_order t
           join (select * from t_order) t2 on t.user_id=t2.user_id
   ```
   then you can get the query with exception 
   ```java
   Caused by: java.sql.SQLException: No such column
   	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getSqlException(ExceptionMapper.java:277)
   	at org.mariadb.jdbc.MariaDbResultSetMetaData.getColumnInformation(MariaDbResultSetMetaData.java:389)
   	at org.mariadb.jdbc.MariaDbResultSetMetaData.getColumnLabel(MariaDbResultSetMetaData.java:186)
   	at org.apache.shardingsphere.driver.jdbc.core.resultset.ShardingSphereResultSetMetaData.getColumnLabel(ShardingSphereResultSetMetaData.java:106)
   	at org.apache.ibatis.executor.resultset.ResultSetWrapper.<init>(ResultSetWrapper.java:60)
   	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getFirstResultSet(DefaultResultSetHandler.java:251)
   	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSets(DefaultResultSetHandler.java:188)
   	at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:65)
   	at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)
   	at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)
   	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)
   	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
   	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
   	at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:108)
   	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)
   	at com.sun.proxy.$Proxy243.query(Unknown Source)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)
   	... 38 more
   ```
   
   ### Example codes for reproduce this issue (such as a github link).
   ```sql
    select t.*
           from t_order t
           join (select * from t_order) t2 on t.user_id=t2.user_id
   ```


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

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


[GitHub] [shardingsphere] irwinai commented on issue #24584: select x.* with join with error:No such column; nested exception is java.sql.SQLException: No such column

Posted by "irwinai (via GitHub)" <gi...@apache.org>.
irwinai commented on issue #24584:
URL: https://github.com/apache/shardingsphere/issues/24584#issuecomment-1469608610

   > Hi @irwinai, can you provide your configuration?
   
   updated


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


Re: [I] select x.* with join with error:No such column; nested exception is java.sql.SQLException: No such column [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #24584: select x.* with join with error:No such column; nested exception is java.sql.SQLException: No such column
URL: https://github.com/apache/shardingsphere/issues/24584


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


Re: [I] select x.* with join with error:No such column; nested exception is java.sql.SQLException: No such column [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on issue #24584:
URL: https://github.com/apache/shardingsphere/issues/24584#issuecomment-2230905291

   The SQL parser is improved in each version, please test the latest version.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] strongduanmu commented on issue #24584: select x.* with join with error:No such column; nested exception is java.sql.SQLException: No such column

Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on issue #24584:
URL: https://github.com/apache/shardingsphere/issues/24584#issuecomment-1467411575

   Hi @irwinai,  can you provide your configuration?


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] irwinai commented on issue #24584: select x.* with join with error:No such column; nested exception is java.sql.SQLException: No such column

Posted by "irwinai (via GitHub)" <gi...@apache.org>.
irwinai commented on issue #24584:
URL: https://github.com/apache/shardingsphere/issues/24584#issuecomment-1469497836

   > Hi @irwinai, can you provide your configuration?
   
   what configuration??


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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