You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "xqianwang (via GitHub)" <gi...@apache.org> on 2023/07/10 13:32:00 UTC

[GitHub] [shardingsphere] xqianwang opened a new issue, #26893: Shardingsphere-Proxy failed to execute sql query for getting table and creating table if not exists.

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

   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response anymore and we cannot reproduce it on current information, we will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   5.3.2
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   ### Expected behavior
   Shardingsphere should be able to handle below query
   `SELECT
       TABLE_SCHEMA AS TABLE_CAT,
       NULL AS TABLE_SCHEM,
       TABLE_NAME,
       CASE
           WHEN TABLE_TYPE = 'BASE TABLE' THEN
               CASE
                   WHEN TABLE_SCHEMA = 'mysql' OR TABLE_SCHEMA = 'performance_schema' THEN 'SYSTEM TABLE'
                   ELSE 'TABLE'
               END
           WHEN TABLE_TYPE = 'TEMPORARY' THEN 'LOCAL_TEMPORARY'
           ELSE TABLE_TYPE
       END AS TABLE_TYPE,
       TABLE_COMMENT AS REMARKS,
       NULL AS TYPE_CAT,
       NULL AS TYPE_SCHEM,
       NULL AS TYPE_NAME,
       NULL AS SELF_REFERENCING_COL_NAME,
       NULL AS REF_GENERATION
   FROM
       INFORMATION_SCHEMA.TABLES
   WHERE
       TABLE_SCHEMA = 'credentialing'
       AND TABLE_NAME LIKE 'CREDENTIALING_CHANGE_LOG'
   HAVING
       TABLE_TYPE IN ('TABLE', NULL, NULL, NULL, NULL)
   ORDER BY
       TABLE_TYPE, TABLE_SCHEMA, TABLE_NAME;`
   ### Actual behavior
   Throws error:
   `Caused by: java.sql.SQLException: Unknown exception: At line 0, column 0: Expression 'TABLE_TYPE' is not being grouped
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
   	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
   	at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:970)
   	at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1020)
   	at com.mysql.cj.jdbc.DatabaseMetaDataUsingInfoSchema.executeMetadataQuery(DatabaseMetaDataUsingInfoSchema.java:70)
   	at com.mysql.cj.jdbc.DatabaseMetaDataUsingInfoSchema.getTables(DatabaseMetaDataUsingInfoSchema.java:847)
   	at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.getTables(InformationExtractorJdbcDatabaseMetaDataImpl.java:329)`
   ### Reason analyze (If you can)
   not sure
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   ### Example codes for reproduce this issue (such as a github link).
   


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


Re: [I] Shardingsphere-Proxy failed to execute sql query for getting table and creating table if not exists. [shardingsphere]

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

   What is 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


Re: [I] Shardingsphere-Proxy failed to execute sql query for getting table and creating table if not exists. [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #26893: Shardingsphere-Proxy failed to execute sql query for getting table and creating table if not exists.
URL: https://github.com/apache/shardingsphere/issues/26893


-- 
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] Shardingsphere-Proxy failed to execute sql query for getting table and creating table if not exists. [shardingsphere]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #26893:
URL: https://github.com/apache/shardingsphere/issues/26893#issuecomment-2259120377

   There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.


-- 
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] Shardingsphere-Proxy failed to execute sql query for getting table and creating table if not exists. [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #26893: Shardingsphere-Proxy failed to execute sql query for getting table and creating table if not exists.
URL: https://github.com/apache/shardingsphere/issues/26893


-- 
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] github-actions[bot] commented on issue #26893: Shardingsphere-Proxy failed to execute sql query for getting table and creating table if not exists.

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #26893:
URL: https://github.com/apache/shardingsphere/issues/26893#issuecomment-1672071026

   There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.


-- 
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] Shardingsphere-Proxy failed to execute sql query for getting table and creating table if not exists. [shardingsphere]

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

   This exception is thrown from MySQL driver, please check your SQL


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