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 2021/08/11 05:08:54 UTC

[GitHub] [shardingsphere] JiekerTime opened a new issue #11757: 【important】The Proxy has the wrong meta information

JiekerTime opened a new issue #11757:
URL: https://github.com/apache/shardingsphere/issues/11757


   ### Which version of ShardingSphere did you use?
   5.0.0-RC1-SNAPSHOT
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   ### Expected behavior
   ![image](https://user-images.githubusercontent.com/76552510/128972346-9df127d2-2cb8-4d0e-ba3f-4298e85aaec4.png)
   
   ### Actual behavior
   Prints out the meta information of all forms in the database:
   ![image](https://user-images.githubusercontent.com/76552510/128972373-f20d81a2-6cd4-4b79-b3a5-d6b4f921485c.png)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   Create the test code as follows.:
   ```
   public class MetaDataTest {
   
       private DataSource createDataSource() {
           HikariConfig result = new HikariConfig();
           result.setDriverClassName("com.mysql.jdbc.Driver");
           result.setJdbcUrl("jdbc:mysql://localhost:3307/db?useServerPrepStmts=true&serverTimezone=UTC&useSSL=false&useLocalSessionState=true&characterEncoding=utf-8");
           result.setUsername("root");
           result.setPassword("root");
           result.setMaximumPoolSize(2);
           result.setTransactionIsolation("TRANSACTION_READ_COMMITTED");
           result.setConnectionInitSql("SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''))");
           return new HikariDataSource(result);
       }
   
       @Test
       public void metadataTest() {
           List<DataSetColumn> result = new LinkedList<>();
           try (Connection connection = createDataSource().getConnection()) {
               DatabaseMetaData metaData = connection.getMetaData();
               try (ResultSet resultSet = metaData.getColumns(null, null, "t_order", null)) {
                   while (resultSet.next()) {
                       DataSetColumn each = new DataSetColumn();
                       System.out.println("COLUMN_NAME: " + resultSet.getString("COLUMN_NAME"));
                       each.setName(resultSet.getString("COLUMN_NAME"));
                       System.out.println("TYPE_NAME: " + resultSet.getString("TYPE_NAME").toLowerCase());
                       each.setType(resultSet.getString("TYPE_NAME").toLowerCase());
                       result.add(each);
                       System.out.println("--------");
                   }
               }
           } catch (SQLException e) {
               e.printStackTrace();
           }
           System.out.println(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] JiekerTime commented on issue #11757: 【important】The Proxy has the wrong meta information

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


   > @JiekerTime Can you provide the create table statement of t_order?
   
   In fact you can change the table structure as you like, if you want to reproduce it, you can refer to [init.sql](https://github.com/apache/shardingsphere/blob/master/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/db/init-sql/mysql/init.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] strongduanmu commented on issue #11757: 【important】The Proxy has the wrong meta information

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


   @JiekerTime Thank you for your feedback, I reproduced this problem. I will try to solve it.
   
   ![image](https://user-images.githubusercontent.com/10829171/129825052-27313b74-a541-4341-b9e6-56d47500f244.png)
   


-- 
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 #11757: 【important】The Proxy has the wrong meta information

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


   @JiekerTime Can you provide the create table statement of t_order?


-- 
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] tristaZero closed issue #11757: 【important】The Proxy has the wrong meta information

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


   


-- 
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 edited a comment on issue #11757: 【important】The Proxy has the wrong meta information

Posted by GitBox <gi...@apache.org>.
strongduanmu edited a comment on issue #11757:
URL: https://github.com/apache/shardingsphere/issues/11757#issuecomment-900756010


   @JiekerTime Thank you for your feedback, I reproduced this problem. I will try to solve it.
   
   ![image](https://user-images.githubusercontent.com/10829171/129825052-27313b74-a541-4341-b9e6-56d47500f244.png)
   
   After executing `SHOW FULL TABLES FROM `sharding_db` LIKE't_order%'`, all the tables are obtained, which eventually leads to incorrect results.
   
   ```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] strongduanmu edited a comment on issue #11757: 【important】The Proxy has the wrong meta information

Posted by GitBox <gi...@apache.org>.
strongduanmu edited a comment on issue #11757:
URL: https://github.com/apache/shardingsphere/issues/11757#issuecomment-900756010


   @JiekerTime Thank you for your feedback, I reproduced this problem. I will try to solve it.
   
   ![image](https://user-images.githubusercontent.com/10829171/129825052-27313b74-a541-4341-b9e6-56d47500f244.png)
   
   After executing `SHOW FULL TABLES FROM `sharding_db` LIKE't_order%'`, all the tables are returned, which eventually leads to incorrect results.
   
   ```sql
   mysql> SHOW FULL TABLES FROM `sharding_db` LIKE 't_order';
   +-----------------------+
   | Tables_in_sharding_db |
   +-----------------------+
   | t_single              |
   | t_order               |
   | test                  |
   +-----------------------+
   3 rows in set (0.00 sec)
   ```


-- 
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 #11757: 【important】The Proxy has the wrong meta information

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


   > @strongduanmu Could you look at this one?
   
   @tristaZero I will investigate this issue.


-- 
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 #11757: 【important】The Proxy has the wrong meta information

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


   @JiekerTime Thank you for your feedback, I reproduced this problem. I will try to solve it.
   
   ![image](https://user-images.githubusercontent.com/10829171/129825052-27313b74-a541-4341-b9e6-56d47500f244.png)
   


-- 
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 edited a comment on issue #11757: 【important】The Proxy has the wrong meta information

Posted by GitBox <gi...@apache.org>.
strongduanmu edited a comment on issue #11757:
URL: https://github.com/apache/shardingsphere/issues/11757#issuecomment-900756010






-- 
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] JiekerTime commented on issue #11757: 【important】The Proxy has the wrong meta information

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


   > @JiekerTime Thank you for your feedback, I reproduced this problem. I will try to solve it.
   > 
   > ![image](https://user-images.githubusercontent.com/10829171/129825052-27313b74-a541-4341-b9e6-56d47500f244.png)
   > 
   > After executing `SHOW FULL TABLES FROM `sharding_db` LIKE't_order%'`, all the tables are returned, which eventually leads to incorrect results.
   > 
   > ```sql
   > mysql> SHOW FULL TABLES FROM `sharding_db` LIKE 't_order';
   > +-----------------------+
   > | Tables_in_sharding_db |
   > +-----------------------+
   > | t_single              |
   > | t_order               |
   > | test                  |
   > +-----------------------+
   > 3 rows in set (0.00 sec)
   > ```
   
   Looking forward to your fix!  


-- 
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] tristaZero commented on issue #11757: 【important】The Proxy has the wrong meta information

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


   @strongduanmu Could you look at this one?


-- 
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 edited a comment on issue #11757: 【important】The Proxy has the wrong meta information

Posted by GitBox <gi...@apache.org>.
strongduanmu edited a comment on issue #11757:
URL: https://github.com/apache/shardingsphere/issues/11757#issuecomment-900756010


   @JiekerTime Thank you for your feedback, I reproduced this problem. I will try to solve it.
   
   ![image](https://user-images.githubusercontent.com/10829171/129825052-27313b74-a541-4341-b9e6-56d47500f244.png)
   
   After executing `SHOW FULL TABLES FROM `sharding_db` LIKE't_order%'`, all the tables are obtained, which eventually leads to incorrect results.
   
   ```sql
   mysql> SHOW FULL TABLES FROM `sharding_db` LIKE 't_order';
   +-----------------------+
   | Tables_in_sharding_db |
   +-----------------------+
   | t_single              |
   | t_order               |
   | test                  |
   +-----------------------+
   3 rows in set (0.00 sec)
   ```


-- 
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] JiekerTime commented on issue #11757: 【important】The Proxy has the wrong meta information

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


   > @JiekerTime Thank you for your feedback, I reproduced this problem. I will try to solve it.
   > 
   > ![image](https://user-images.githubusercontent.com/10829171/129825052-27313b74-a541-4341-b9e6-56d47500f244.png)
   > 
   > After executing `SHOW FULL TABLES FROM `sharding_db` LIKE't_order%'`, all the tables are returned, which eventually leads to incorrect results.
   > 
   > ```sql
   > mysql> SHOW FULL TABLES FROM `sharding_db` LIKE 't_order';
   > +-----------------------+
   > | Tables_in_sharding_db |
   > +-----------------------+
   > | t_single              |
   > | t_order               |
   > | test                  |
   > +-----------------------+
   > 3 rows in set (0.00 sec)
   > ```
   
   Looking forward to your fix!  


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