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 2022/10/10 06:37:57 UTC

[GitHub] [shardingsphere] a207005 opened a new issue, #18864: in my project need to select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='dbName' and TABLE_NAME='tableName'

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

   ShardingSphere  version5.1.2 ShardingSphere-JDBC
   how to config that i can use the INFORMATION_SCHEMA system database


-- 
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] GissilyWork commented on issue #18864: in my project need to select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='dbName' and TABLE_NAME='tableName'

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

   I have same issue like you with version 5.1.2.
   when the sql schema is uppercase something like 
      ```
   SELECT COUNT * FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = ? AND table_name = ?
   ```
   I would get a exception
      ```
   org.apache.shardingsphere.infra.exception.DatabaseNotExistedException: Database 'INFORMATION_SCHEMA' doesn't exist.
   ```
   if schema is lowercase like
      ```
   SELECT COUNT * FROM information_schema.TABLES WHERE table_schema = ? AND table_name = ?
   ```
   
   I would get another exception
      ```
   org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT COUNT * FROM information_schema.TABLES WHERE table_schema = ? AND table_name = ?
   ]; nested exception is java.sql.SQLSyntaxErrorException: Table 'data_demo.tables' doesn't exist
   ```
   Might ShardingSphere ignore other schemas which db user can access, and only append the schema in jdbc url?
   
   
   


-- 
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] closed issue #18864: in my project need to select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='dbName' and TABLE_NAME='tableName'

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #18864: in my project need to select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='dbName' and TABLE_NAME='tableName'
URL: https://github.com/apache/shardingsphere/issues/18864


-- 
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 #18864: in my project need to select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='dbName' and TABLE_NAME='tableName'

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #18864:
URL: https://github.com/apache/shardingsphere/issues/18864#issuecomment-1272349472

   Hello , this issue has not received a reply for several days.
   This issue is supposed to be closed.


-- 
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] rehuhu commented on issue #18864: in my project need to select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='dbName' and TABLE_NAME='tableName'

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

   me too,this is a bug not rather than a question


-- 
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] a207005 commented on issue #18864: in my project need to select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='dbName' and TABLE_NAME='tableName'

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

   show tables from db;
   show columns from db.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.

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

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


[GitHub] [shardingsphere] JeffYoungL commented on issue #18864: in my project need to select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='dbName' and TABLE_NAME='tableName'

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

   I have the same question with version 5.1.2.
   Looks like you need extract the real datasource from  ShardingSphereConnection from injected shardingDataSource:
   `
               ShardingSphereConnection shardingSphereConnection = (ShardingSphereConnection)shardingDataSource.getConnection();
               conn = shardingSphereConnection.getConnectionManager().getRandomConnection();
               ResultSet executeQuery = conn.createStatement().executeQuery(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


[GitHub] [shardingsphere] Zelexshow commented on issue #18864: in my project need to select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='dbName' and TABLE_NAME='tableName'

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

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

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

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