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

[GitHub] [shardingsphere] hhniao opened a new issue, #24395: sharding proxy information_schema not work, it is bug?

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

   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   ## first question. select * from tables; return empty set
   `shardingsphere-proxy  | [ERROR] 2023-03-01 03:37:34.590 [Connection-3-ThreadExecutor] o.a.s.p.f.c.CommandExecutorTask - Exception occur: 
   shardingsphere-proxy  | java.lang.NullPointerException: null
   shardingsphere-proxy  | 	at java.base/java.util.Objects.requireNonNull(Objects.java:208)
   shardingsphere-proxy  | 	at java.base/java.util.Optional.of(Optional.java:113)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.sqlfederation.advanced.resultset.SQLFederationResultSetMetaData.findTableName(SQLFederationResultSetMetaData.java:180)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.sqlfederation.advanced.resultset.SQLFederationResultSetMetaData.getTableName(SQLFederationResultSetMetaData.java:137)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.driver.jdbc.metadata.JDBCQueryResultMetaData.getTableName(JDBCQueryResultMetaData.java:42)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.proxy.backend.response.header.query.impl.MySQLQueryHeaderBuilder.build(MySQLQueryHeaderBuilder.java:40)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.proxy.backend.response.header.query.QueryHeaderBuilderEngine.build(QueryHeaderBuilderEngine.java:55)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.processExecuteFederation(DatabaseCommunicationEngine.java:226)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.execute(DatabaseCommunicationEngine.java:168)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:92)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:110)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:77)
   shardingsphere-proxy  | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
   shardingsphere-proxy  | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
   shardingsphere-proxy  | 	at java.base/java.lang.Thread.run(Thread.java:833)
   `
   
   ## second question.  select * from columns; 30000 - Unknown exception: Index 20 out of bounds for length 20
   shardingsphere-proxy  | [ERROR] 2023-03-01 03:40:27.603 [Connection-4-ThreadExecutor] o.a.s.p.f.c.CommandExecutorTask - Exception occur: 
   shardingsphere-proxy  | java.lang.IndexOutOfBoundsException: Index 20 out of bounds for length 20
   shardingsphere-proxy  | 	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
   shardingsphere-proxy  | 	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
   shardingsphere-proxy  | 	at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
   shardingsphere-proxy  | 	at java.base/java.util.Objects.checkIndex(Objects.java:359)
   shardingsphere-proxy  | 	at java.base/java.util.ArrayList.get(ArrayList.java:427)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.sqlfederation.advanced.resultset.SQLFederationResultSetMetaData.getColumnName(SQLFederationResultSetMetaData.java:111)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.driver.jdbc.metadata.JDBCQueryResultMetaData.getColumnName(JDBCQueryResultMetaData.java:47)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.proxy.backend.response.header.query.QueryHeaderBuilderEngine.build(QueryHeaderBuilderEngine.java:51)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.processExecuteFederation(DatabaseCommunicationEngine.java:226)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.execute(DatabaseCommunicationEngine.java:168)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:92)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:110)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:77)
   shardingsphere-proxy  | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
   shardingsphere-proxy  | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
   shardingsphere-proxy  | 	at java.base/java.lang.Thread.run(Thread.java:833)
   
   ### Which version of ShardingSphere did you use?
   maybe 5.3.1? i dont know. 
   im use this docker image `apache/shardingsphere-proxy:latest`
   docker compose file from here `examples/docker/shardingsphere-proxy/sharding`
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   ### SQL command
   mysql> show databases;
   +--------------------+
   | schema_name        |
   +--------------------+
   | information_schema |
   | mysql              |
   | performance_schema |
   | sharding_db        |
   | shardingsphere     |
   | sql_hint           |
   | sys                |
   +--------------------+
   7 rows in set (0.01 sec)
   
   mysql> use information_schema;
   Database changed
   mysql> show tables;
   +------------------------------+------------+
   | Tables_in_information_schema | Table_type |
   +------------------------------+------------+
   | TABLES                       | BASE TABLE |
   | SCHEMATA                     | BASE TABLE |
   | COLUMNS                      | BASE TABLE |
   | ENGINES                      | BASE TABLE |
   | ROUTINES                     | BASE TABLE |
   | PARAMETERS                   | BASE TABLE |
   | VIEWS                        | BASE TABLE |
   +------------------------------+------------+
   7 rows in set (0.02 sec)
   
   mysql> select * from tables;
   Empty set
   
   mysql> select * from columns;
   30000 - Unknown exception: Index 20 out of bounds for length 20
   mysql> select * from columns;
   30000 - Unknown exception: Index 20 out of bounds for length 20
   mysql> 
   ### error logs
   shardingsphere-proxy  | [ERROR] 2023-03-01 03:27:18.777 [Connection-1-ThreadExecutor] o.a.s.p.f.c.CommandExecutorTask - Exception occur: 
   shardingsphere-proxy  | java.lang.IndexOutOfBoundsException: Index 20 out of bounds for length 20
   shardingsphere-proxy  | 	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
   shardingsphere-proxy  | 	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
   shardingsphere-proxy  | 	at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
   shardingsphere-proxy  | 	at java.base/java.util.Objects.checkIndex(Objects.java:359)
   shardingsphere-proxy  | 	at java.base/java.util.ArrayList.get(ArrayList.java:427)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.sqlfederation.advanced.resultset.SQLFederationResultSetMetaData.getColumnName(SQLFederationResultSetMetaData.java:111)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.driver.jdbc.metadata.JDBCQueryResultMetaData.getColumnName(JDBCQueryResultMetaData.java:47)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.proxy.backend.response.header.query.QueryHeaderBuilderEngine.build(QueryHeaderBuilderEngine.java:51)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.processExecuteFederation(DatabaseCommunicationEngine.java:226)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.execute(DatabaseCommunicationEngine.java:168)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:92)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:110)
   shardingsphere-proxy  | 	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:77)
   shardingsphere-proxy  | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
   shardingsphere-proxy  | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
   shardingsphere-proxy  | 	at java.base/java.lang.Thread.run(Thread.java:833)
   
   ### Reason analyze (If you can)
   
   ### 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


[GitHub] [shardingsphere] FlyingZC commented on issue #24395: sharding proxy information_schema not work, it is bug?

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

   The information schema is still in the experimental stage. @tuichenchuxin hi, please have a lool.


-- 
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] hhniao commented on issue #24395: sharding proxy information_schema not work, it is bug?

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

   im use it for laravel.
   it is not work, when i execute command `php artisan migrate`
   this sql will be execute. 
   `select * from information_schema.tables where table_schema = 'sharding_db' and table_name = 'migrations' and table_type = 'BASE TABLE'`
   create table migrations, when last sql empty result.


-- 
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] hhniao commented on issue #24395: sharding proxy information_schema not work, it is bug?

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

   @tuichenchuxin sorry, i dont know java. 
   When I saw this [#11994](https://github.com/apache/shardingsphere/issues/11994) I thought it had been solved


-- 
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] tuichenchuxin commented on issue #24395: sharding proxy information_schema not work, it is bug?

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

   Thanks @FlyingZC .
   information schema is still in the experimental stage. @hhniao you may get more details by this https://github.com/apache/shardingsphere/issues/24378
   Empty results are acceptable, but exceptions should not be raised.


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