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/08/17 03:47:45 UTC

[GitHub] [shardingsphere] zhaopinglu opened a new issue #6890: ss-proxy failed to hand tables which have minor difference in table name when retrieving table metadata.

zhaopinglu opened a new issue #6890:
URL: https://github.com/apache/shardingsphere/issues/6890


   ## 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?
   ss-proxy-4.1.1
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ss-proxy-4.1.1
   
   ### Expected behavior
   ss-proxy start up successfully
   
   ### Actual behavior
   ss-proxy failed to start up. Process quit with the following error:
   [INFO ] 11:34:37.725 [main] ShardingSphere-metadata - Loading 1442 tables' meta data.
   Exception in thread "main" java.sql.SQLException: Column 'ID' not found.
           at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
           at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898)
           at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887)
           at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:861)
           at com.mysql.jdbc.ResultSetImpl.findColumn(ResultSetImpl.java:1078)
           at com.zaxxer.hikari.pool.HikariProxyResultSet.findColumn(HikariProxyResultSet.java)
           at org.apache.shardingsphere.sql.parser.binder.metadata.column.ColumnMetaDataLoader.load(ColumnMetaDataLoader.java:77)
           at org.apache.shardingsphere.sql.parser.binder.metadata.schema.SchemaMetaDataLoader.load(SchemaMetaDataLoader.java:84)
           at org.apache.shardingsphere.sql.parser.binder.metadata.schema.SchemaMetaDataLoader.load(SchemaMetaDataLoader.java:76)
           at org.apache.shardingsphere.shardingproxy.backend.schema.impl.MasterSlaveSchema.loadSchemaMetaData(MasterSlaveSchema.java:79)
           at org.apache.shardingsphere.shardingproxy.backend.schema.impl.MasterSlaveSchema.createMetaData(MasterSlaveSchema.java:72)
           at org.apache.shardingsphere.shardingproxy.backend.schema.impl.MasterSlaveSchema.<init>(MasterSlaveSchema.java:63)
           at org.apache.shardingsphere.shardingproxy.backend.schema.LogicSchemaFactory.newInstance(LogicSchemaFactory.java:59)
           at org.apache.shardingsphere.shardingproxy.backend.schema.LogicSchemas.initSchemas(LogicSchemas.java:102)
           at org.apache.shardingsphere.shardingproxy.backend.schema.LogicSchemas.init(LogicSchemas.java:91)
           at org.apache.shardingsphere.shardingproxy.backend.schema.LogicSchemas.init(LogicSchemas.java:75)
           at org.apache.shardingsphere.shardingproxy.Bootstrap.startWithoutRegistryCenter(Bootstrap.java:123)
           at org.apache.shardingsphere.shardingproxy.Bootstrap.main(Bootstrap.java:85)
   
   ### Reason analyze (If you can)
   ss-proxy failed to hand tables which have minor difference in table name when retrieving table metadata.
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   1. Create 2 tables as below:
   
   drop table if exists TEST_01;
   CREATE TABLE `TEST_01` (
     `ID` varchar(32) DEFAULT NULL
   ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
   
   drop table if exists TEST__1;
   CREATE TABLE `TEST__1` (
     `ID1` varchar(32) DEFAULT NULL
   ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
   
   
   2. Start up ss-proxy, the error will be triggered.
   ### 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.

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



[GitHub] [shardingsphere] kimmking closed issue #6890: ss-proxy failed to handle tables which have minor difference in table name when retrieving table metadata.

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


   


----------------------------------------------------------------
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] zhaopinglu commented on issue #6890: ss-proxy failed to handle tables which have minor difference in table name when retrieving table metadata.

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


   Thanks for response. I didn't do any special configuration for those test* tables. As I said they are 2 standalone tables without any relationship.


----------------------------------------------------------------
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] tristaZero commented on issue #6890: ss-proxy failed to handle tables which have minor difference in table name when retrieving table metadata.

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


   @wcsoft Could you give it a look using the master branch?


----------------------------------------------------------------
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] tristaZero commented on issue #6890: ss-proxy failed to handle tables which have minor difference in table name when retrieving table metadata.

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


   Hi @zhaopinglu Do you think it is possible to give it a deep debugging? Since we do not have the same test scenario with you, it is inefficient to look into this issue.
   If you have any progress, welcome to share them here. Therefore we can locate the problem soon. :-)
   
   Best,
   Trista


----------------------------------------------------------------
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] zhaopinglu commented on issue #6890: ss-proxy failed to handle tables which have minor difference in table name when retrieving table metadata.

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


   Please see the yaml files in the 1st post. 


----------------------------------------------------------------
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] wcsoft commented on issue #6890: ss-proxy failed to handle tables which have minor difference in table name when retrieving table metadata.

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


   @zhaopinglu 
   could you provide me your yaml files for ShardingProxy? Thx a lot.


----------------------------------------------------------------
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] tristaZero commented on issue #6890: ss-proxy failed to handle tables which have minor difference in table name when retrieving table metadata.

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


   Hi @zhaopinglu 
   Are both `TEST_01` and `TEST__1 `  actual tables for a `logic table`? If so, `TEST_01` and `TEST__1 ` are supposed to have the same table structure, aren't they?


----------------------------------------------------------------
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 #6890: ss-proxy failed to handle tables which have minor difference in table name when retrieving table metadata.

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


   


----------------------------------------------------------------
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] zhaopinglu commented on issue #6890: ss-proxy failed to handle tables which have minor difference in table name when retrieving table metadata.

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


   It's very easy to replicate this issue. Just create 2 tables then start up ss-proxy, you will see the error in log right away.
   
   1. Create 2 tables as below:
   drop table if exists TEST_01;
   CREATE TABLE TEST_01 (
   ID varchar(32) DEFAULT NULL
   ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
   
   drop table if exists TEST__1;
   CREATE TABLE TEST__1 (
   ID1 varchar(32) DEFAULT NULL
   ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
   
   2. Start up ss-proxy, the error will be triggered.
   
   Please let me know if you need any more information. 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] tristaZero commented on issue #6890: ss-proxy failed to handle tables which have minor difference in table name when retrieving table metadata.

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


   @wcsoft Ping for a test. 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] wcsoft commented on issue #6890: ss-proxy failed to handle tables which have minor difference in table name when retrieving table metadata.

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


   @zhaopinglu 
   
   Do you use logical table named "TEST**" within config of proxy? could you provide your yaml, thx a lot?


----------------------------------------------------------------
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 #6890: ss-proxy failed to handle tables which have minor difference in table name when retrieving table metadata.

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


   It has been fixed in master branch.


----------------------------------------------------------------
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 #6890: ss-proxy failed to handle tables which have minor difference in table name when retrieving table metadata.

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


   Can you show your config rule>?


----------------------------------------------------------------
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] zhaopinglu commented on issue #6890: ss-proxy failed to handle tables which have minor difference in table name when retrieving table metadata.

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


   TEST_01 and TEST__1 are 2 actual tables. They  don't have any relationship. I guess when matching table name, ss-proxy forgot to escape the "_" char which actually match any single char.


----------------------------------------------------------------
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 #6890: ss-proxy failed to handle tables which have minor difference in table name when retrieving table metadata.

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


   It has been fixed in master branch.


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