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/12/04 07:11:39 UTC

[GitHub] [shardingsphere] EarthXuan opened a new issue #13930: sharding-proxy insert data fail

EarthXuan opened a new issue #13930:
URL: https://github.com/apache/shardingsphere/issues/13930


   ## Question
   
   **For English only**, other languages will not accept.
   
   insert data will fail  when i use sharding-proxy to sharding database&table。I sincerely hope to get a reply。
   
   config-sharding.yaml:
   ![image](https://user-images.githubusercontent.com/19358477/144701126-7f91712e-18ab-4114-b7be-ce42c85a7f03.png)
   
   
   create table ddl:
   CREATE TABLE `test_sc` (
     `globalid` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
     `guid` bigint NOT NULL
   ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3
   
   error:
   Runtime exception: [Conversion = ' ']
   ![image](https://user-images.githubusercontent.com/19358477/144701162-0a0e6192-99da-4e5b-81af-96d2aaaa31ba.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] EarthXuan commented on issue #13930: sharding-proxy insert data fail

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


   > Ok, I will check it.
   
   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.

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

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



[GitHub] [shardingsphere] EarthXuan removed a comment on issue #13930: sharding-proxy insert data fail

Posted by GitBox <gi...@apache.org>.
EarthXuan removed a comment on issue #13930:
URL: https://github.com/apache/shardingsphere/issues/13930#issuecomment-985993072


   > Ok, I will check it.
   
   this is server.yaml:
   
   rules:
   - !AUTHORITY
       users:
         - root@%:root
         - sharding@:sharding
       provider:
         type: ALL_PRIVILEGES_PERMITTED
   - !TRANSACTION
       defaultType: XA
       providerType: Atomikos
   props:
     max-connections-size-per-query: 1
     kernel-executor-size: 16
     proxy-frontend-flush-threshold: 128
     proxy-opentracing-enabled: false
     proxy-hint-enabled: false
     sql-show: false
     check-table-metadata-enabled: false
     show-process-list-enabled: false
     proxy-backend-query-fetch-size: -1
     check-duplicate-table-enabled: false
     sql-comment-parse-enabled: false
     proxy-frontend-executor-size: 0
     proxy-backend-executor-suitable: OLAP
     proxy-frontend-max-connections: 0
     sql-federation-enabled: false
   


-- 
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] TeslaCN commented on issue #13930: sharding-proxy insert data fail

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


   @EarthXuan 
   Could you try change the `test_sc${guid % 2}` to `test_sc{guid % 2}` in `algorithm-expression`?


-- 
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] EarthXuan commented on issue #13930: sharding-proxy insert data fail

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


   > Ok, I will check it.
   
   this is server.yml
   ![Uploading image.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] EarthXuan commented on issue #13930: sharding-proxy insert data fail

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


   > @EarthXuan Do you use version 5.0.0?
   
   yes,docker pull apache/shardingsphere-proxy:latest.


-- 
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] TeslaCN edited a comment on issue #13930: sharding-proxy insert data fail

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


   @EarthXuan 
   Could you try changing the `test_sc${guid % 2}` to `test_sc{guid % 2}` in `algorithm-expression`?


-- 
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] EarthXuan commented on issue #13930: sharding-proxy insert data fail

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


   > > Hi @EarthXuan , I tested it according to your scenario and found no problems.
   > > ```sql
   > > mysql> CREATE TABLE test_sc (
   > >     -> globalid varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
   > >     -> guid bigint NOT NULL
   > >     -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
   > > Query OK, 0 rows affected (0.22 sec)
   > > 
   > > mysql> show tables;
   > > +-----------------------+------------+
   > > | Tables_in_sharding_db | Table_type |
   > > +-----------------------+------------+
   > > | test_sc               | BASE TABLE |
   > > | t_single              | BASE TABLE |
   > > +-----------------------+------------+
   > > 2 rows in set (0.00 sec)
   > > 
   > > mysql> insert into test_sc(globalid,guid) values ('1',2);
   > > Query OK, 1 row affected (0.18 sec)
   > > 
   > > mysql> desc test_sc;
   > > +----------+--------------+------+-----+---------+-------+
   > > | Field    | Type         | Null | Key | Default | Extra |
   > > +----------+--------------+------+-----+---------+-------+
   > > | globalid | varchar(256) | NO   |     | NULL    |       |
   > > | guid     | bigint(20)   | NO   |     | NULL    |       |
   > > +----------+--------------+------+-----+---------+-------+
   > > 2 rows in set (0.02 sec)
   > > 
   > > mysql> select * from test_sc;
   > > +----------+------+
   > > | globalid | guid |
   > > +----------+------+
   > > | 1        |    2 |
   > > +----------+------+
   > > 1 row in set (0.05 sec)
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > ### Proxy Logs
   > > ```
   > > ShardingSphere-SQL - Logic SQL: insert into test_sc(globalid,guid) values ('1',2)
   > > ShardingSphere-SQL - SQLStatement: MySQLInsertStatement(setAssignment=Optional.empty, onDuplicateKeyColumns=Optional.empty)
   > > ShardingSphere-SQL - Actual SQL: ds_0 ::: insert into test_sc_0(globalid,guid) values ('1', 2)
   > > ShardingSphere-SQL - Logic SQL: desc test_sc
   > > ShardingSphere-SQL - SQLStatement: MySQLExplainStatement(table=Optional[SimpleTableSegment(tableName=TableNameSegment(startIndex=5, stopIndex=11, identifier=IdentifierValue(value=test_sc, quoteCharacter=NONE)), owner=Optional.empty, alias=Optional.empty)])
   > > ShardingSphere-SQL - Actual SQL: ds_0 ::: desc test_sc_0
   > > ShardingSphere-SQL - Logic SQL: select * from test_sc
   > > ShardingSphere-SQL - SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
   > > ShardingSphere-SQL - Actual SQL: ds_0 ::: select * from test_sc_0
   > > ShardingSphere-SQL - Actual SQL: ds_0 ::: select * from test_sc_1
   > > ShardingSphere-SQL - Actual SQL: ds_1 ::: select * from test_sc_0
   > > ShardingSphere-SQL - Actual SQL: ds_1 ::: select * from test_sc_1
   > > ```
   > 
   > which version of MySQL do you use? i use 8.x
   
   do u install by docker?  
   and can you show me 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



[GitHub] [shardingsphere] EarthXuan commented on issue #13930: sharding-proxy insert data fail

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






-- 
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] EarthXuan commented on issue #13930: sharding-proxy insert data fail

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


   > > [proxy-config.zip](https://github.com/apache/shardingsphere/files/7655256/proxy-config.zip)
   > 
   > thanks~
   
   it works when i use your configuration.
   but i wonder why my configuration does'nt work.
   
   this is my configuration:
   
   ```
   
   schemaName: sharding_db
   dataSources:
     ds_0:
       url: jdbc:mysql://192.168.56.102:3307/platform?serverTimezone=UTC&useSSL=false
       username: root
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
     ds_1:
       url: jdbc:mysql://192.168.56.102:3308/platform?serverTimezone=UTC&useSSL=false
       username: root
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
   
   rules:
   - !SHARDING
     tables:
       test_sc:
         actualDataNodes: ds_${0..1}.test_sc${0..1}
         tableStrategy:
           standard:
             shardingColumn: guid
             shardingAlgorithmName: test_sc_inline
     bindingTables:
       - test_sc
     defaultDatabaseStrategy:
       standard:
         shardingColumn: guid
         shardingAlgorithmName: database_inline
     defaultTableStrategy:
       none:
     shardingAlgorithms:
       database_inline:
         type: INLINE
         props:
           algorithm-expression: ds_{guid % 2}
       test_sc_inline:
         type: INLINE
         props:
           algorithm-expression: test_sc${guid % 2}
   
   ```


-- 
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] EarthXuan commented on issue #13930: sharding-proxy insert data fail

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


   > ```sql
   > insert into test_sc(globalid,guid) values ('1',2);
   > ```
   
   okok~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.

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

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



[GitHub] [shardingsphere] RaigorJiang commented on issue #13930: sharding-proxy insert data fail

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


   @EarthXuan 
   If the problem is solved, please close 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] EarthXuan removed a comment on issue #13930: sharding-proxy insert data fail

Posted by GitBox <gi...@apache.org>.
EarthXuan removed a comment on issue #13930:
URL: https://github.com/apache/shardingsphere/issues/13930#issuecomment-986173264


   > ```sql
   > insert into test_sc(globalid,guid) values ('1',2);
   > ```
   
   okok~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.

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

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



[GitHub] [shardingsphere] RaigorJiang commented on issue #13930: sharding-proxy insert data fail

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


   Ok, I will check it.


-- 
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] EarthXuan removed a comment on issue #13930: sharding-proxy insert data fail

Posted by GitBox <gi...@apache.org>.
EarthXuan removed a comment on issue #13930:
URL: https://github.com/apache/shardingsphere/issues/13930#issuecomment-985992965


   > Ok, I will check it.
   
   this is server.yml
   ![Uploading image.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] RaigorJiang commented on issue #13930: sharding-proxy insert data fail

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


   Hi @EarthXuan 
   What is your logic 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] EarthXuan commented on issue #13930: sharding-proxy insert data fail

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


   > @EarthXuan Could you try changing the `test_sc${guid % 2}` to `test_sc{guid % 2}` in `algorithm-expression`?
   
   oh,thanks~ i wrote it wrong!


-- 
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] EarthXuan closed issue #13930: sharding-proxy insert data fail

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


   


-- 
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] RaigorJiang commented on issue #13930: sharding-proxy insert data fail

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


   > do u install by docker?
   and can you show me your configuration?
   
   Yes, the same docker image with you.
   But my version of MySQL is 5.7, let me try 8.0.


-- 
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] RaigorJiang commented on issue #13930: sharding-proxy insert data fail

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


   [proxy-config.zip](https://github.com/apache/shardingsphere/files/7655256/proxy-config.zip)
   


-- 
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] EarthXuan commented on issue #13930: sharding-proxy insert data fail

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


   > Hi @EarthXuan
   > What is your logic SQL?
   
   insert into test_sc(globalid,guid) values ('1',2);


-- 
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] EarthXuan commented on issue #13930: sharding-proxy insert data fail

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


   > Ok, I will check it.
   
   this is server.yaml:
   
   rules:
   - !AUTHORITY
       users:
         - root@%:root
         - sharding@:sharding
       provider:
         type: ALL_PRIVILEGES_PERMITTED
   - !TRANSACTION
       defaultType: XA
       providerType: Atomikos
   props:
     max-connections-size-per-query: 1
     kernel-executor-size: 16
     proxy-frontend-flush-threshold: 128
     proxy-opentracing-enabled: false
     proxy-hint-enabled: false
     sql-show: false
     check-table-metadata-enabled: false
     show-process-list-enabled: false
     proxy-backend-query-fetch-size: -1
     check-duplicate-table-enabled: false
     sql-comment-parse-enabled: false
     proxy-frontend-executor-size: 0
     proxy-backend-executor-suitable: OLAP
     proxy-frontend-max-connections: 0
     sql-federation-enabled: false
   


-- 
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] EarthXuan commented on issue #13930: sharding-proxy insert data fail

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


   
   
   
   > Ok, I will check it.
   
   this is server.yaml:
   
   ![无标题](https://user-images.githubusercontent.com/19358477/144703636-55cc98e8-eb16-4f85-aa5d-6edb5e5377ff.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] EarthXuan commented on issue #13930: sharding-proxy insert data fail

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


   > Hi @EarthXuan , I tested it according to your scenario and found no problems.
   > 
   > ```sql
   > mysql> CREATE TABLE test_sc (
   >     -> globalid varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
   >     -> guid bigint NOT NULL
   >     -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
   > Query OK, 0 rows affected (0.22 sec)
   > 
   > mysql> show tables;
   > +-----------------------+------------+
   > | Tables_in_sharding_db | Table_type |
   > +-----------------------+------------+
   > | test_sc               | BASE TABLE |
   > | t_single              | BASE TABLE |
   > +-----------------------+------------+
   > 2 rows in set (0.00 sec)
   > 
   > mysql> insert into test_sc(globalid,guid) values ('1',2);
   > Query OK, 1 row affected (0.18 sec)
   > 
   > mysql> desc test_sc;
   > +----------+--------------+------+-----+---------+-------+
   > | Field    | Type         | Null | Key | Default | Extra |
   > +----------+--------------+------+-----+---------+-------+
   > | globalid | varchar(256) | NO   |     | NULL    |       |
   > | guid     | bigint(20)   | NO   |     | NULL    |       |
   > +----------+--------------+------+-----+---------+-------+
   > 2 rows in set (0.02 sec)
   > 
   > mysql> select * from test_sc;
   > +----------+------+
   > | globalid | guid |
   > +----------+------+
   > | 1        |    2 |
   > +----------+------+
   > 1 row in set (0.05 sec)
   > ```
   > 
   > ### Proxy Logs
   > ```
   > ShardingSphere-SQL - Logic SQL: insert into test_sc(globalid,guid) values ('1',2)
   > ShardingSphere-SQL - SQLStatement: MySQLInsertStatement(setAssignment=Optional.empty, onDuplicateKeyColumns=Optional.empty)
   > ShardingSphere-SQL - Actual SQL: ds_0 ::: insert into test_sc_0(globalid,guid) values ('1', 2)
   > ShardingSphere-SQL - Logic SQL: desc test_sc
   > ShardingSphere-SQL - SQLStatement: MySQLExplainStatement(table=Optional[SimpleTableSegment(tableName=TableNameSegment(startIndex=5, stopIndex=11, identifier=IdentifierValue(value=test_sc, quoteCharacter=NONE)), owner=Optional.empty, alias=Optional.empty)])
   > ShardingSphere-SQL - Actual SQL: ds_0 ::: desc test_sc_0
   > ShardingSphere-SQL - Logic SQL: select * from test_sc
   > ShardingSphere-SQL - SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
   > ShardingSphere-SQL - Actual SQL: ds_0 ::: select * from test_sc_0
   > ShardingSphere-SQL - Actual SQL: ds_0 ::: select * from test_sc_1
   > ShardingSphere-SQL - Actual SQL: ds_1 ::: select * from test_sc_0
   > ShardingSphere-SQL - Actual SQL: ds_1 ::: select * from test_sc_1
   > ```
   
   which version of MySQL do you use? i use 8.x


-- 
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] RaigorJiang commented on issue #13930: sharding-proxy insert data fail

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


   Hi @EarthXuan ,
   I tested it according to your scenario and found no problems.
   
   ```sql
   mysql> CREATE TABLE test_sc (
       -> globalid varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
       -> guid bigint NOT NULL
       -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
   Query OK, 0 rows affected (0.22 sec)
   
   mysql> show tables;
   +-----------------------+------------+
   | Tables_in_sharding_db | Table_type |
   +-----------------------+------------+
   | test_sc               | BASE TABLE |
   | t_single              | BASE TABLE |
   +-----------------------+------------+
   2 rows in set (0.00 sec)
   
   mysql> insert into test_sc(globalid,guid) values ('1',2);
   Query OK, 1 row affected (0.18 sec)
   
   mysql> desc test_sc;
   +----------+--------------+------+-----+---------+-------+
   | Field    | Type         | Null | Key | Default | Extra |
   +----------+--------------+------+-----+---------+-------+
   | globalid | varchar(256) | NO   |     | NULL    |       |
   | guid     | bigint(20)   | NO   |     | NULL    |       |
   +----------+--------------+------+-----+---------+-------+
   2 rows in set (0.02 sec)
   
   mysql> select * from test_sc;
   +----------+------+
   | globalid | guid |
   +----------+------+
   | 1        |    2 |
   +----------+------+
   1 row in set (0.05 sec)
   ```
   
   ### Proxy Logs
   ```
   ShardingSphere-SQL - Logic SQL: insert into test_sc(globalid,guid) values ('1',2)
   ShardingSphere-SQL - SQLStatement: MySQLInsertStatement(setAssignment=Optional.empty, onDuplicateKeyColumns=Optional.empty)
   ShardingSphere-SQL - Actual SQL: ds_0 ::: insert into test_sc_0(globalid,guid) values ('1', 2)
   ShardingSphere-SQL - Logic SQL: desc test_sc
   ShardingSphere-SQL - SQLStatement: MySQLExplainStatement(table=Optional[SimpleTableSegment(tableName=TableNameSegment(startIndex=5, stopIndex=11, identifier=IdentifierValue(value=test_sc, quoteCharacter=NONE)), owner=Optional.empty, alias=Optional.empty)])
   ShardingSphere-SQL - Actual SQL: ds_0 ::: desc test_sc_0
   ShardingSphere-SQL - Logic SQL: select * from test_sc
   ShardingSphere-SQL - SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
   ShardingSphere-SQL - Actual SQL: ds_0 ::: select * from test_sc_0
   ShardingSphere-SQL - Actual SQL: ds_0 ::: select * from test_sc_1
   ShardingSphere-SQL - Actual SQL: ds_1 ::: select * from test_sc_0
   ShardingSphere-SQL - Actual SQL: ds_1 ::: select * from test_sc_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



[GitHub] [shardingsphere] EarthXuan removed a comment on issue #13930: sharding-proxy insert data fail

Posted by GitBox <gi...@apache.org>.
EarthXuan removed a comment on issue #13930:
URL: https://github.com/apache/shardingsphere/issues/13930#issuecomment-986169371


   > ```sql
   > desc test_sc;
   > ```
   
   it works when i use your configuration.
   but i  wonder why my configuration does'nt work.
   
   this is my configuration:
   `schemaName: sharding_db
   dataSources:
     ds_0:
       url: jdbc:mysql://192.168.56.102:3307/platform?serverTimezone=UTC&useSSL=false
       username: root
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
     ds_1:
       url: jdbc:mysql://192.168.56.102:3308/platform?serverTimezone=UTC&useSSL=false
       username: root
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
   
   rules:
   - !SHARDING
     tables:
       test_sc:
         actualDataNodes: ds_${0..1}.test_sc${0..1}
         tableStrategy:
           standard:
             shardingColumn: guid
             shardingAlgorithmName: test_sc_inline
     bindingTables:
       - test_sc
     defaultDatabaseStrategy:
       standard:
         shardingColumn: guid
         shardingAlgorithmName: database_inline
     defaultTableStrategy:
       none:
     shardingAlgorithms:
       database_inline:
         type: INLINE
         props:
           algorithm-expression: ds_{guid % 2}
       test_sc_inline:
         type: INLINE
         props:
           algorithm-expression: test_sc${guid % 2}
   `


-- 
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] EarthXuan commented on issue #13930: sharding-proxy insert data fail

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


   > ```sql
   > desc test_sc;
   > ```
   
   it works when i use your configuration.
   but i  wonder why my configuration does'nt work.
   
   this is my configuration:
   `schemaName: sharding_db
   dataSources:
     ds_0:
       url: jdbc:mysql://192.168.56.102:3307/platform?serverTimezone=UTC&useSSL=false
       username: root
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
     ds_1:
       url: jdbc:mysql://192.168.56.102:3308/platform?serverTimezone=UTC&useSSL=false
       username: root
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
   
   rules:
   - !SHARDING
     tables:
       test_sc:
         actualDataNodes: ds_${0..1}.test_sc${0..1}
         tableStrategy:
           standard:
             shardingColumn: guid
             shardingAlgorithmName: test_sc_inline
     bindingTables:
       - test_sc
     defaultDatabaseStrategy:
       standard:
         shardingColumn: guid
         shardingAlgorithmName: database_inline
     defaultTableStrategy:
       none:
     shardingAlgorithms:
       database_inline:
         type: INLINE
         props:
           algorithm-expression: ds_{guid % 2}
       test_sc_inline:
         type: INLINE
         props:
           algorithm-expression: test_sc${guid % 2}
   `


-- 
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] RaigorJiang commented on issue #13930: sharding-proxy insert data fail

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


   Haha  thanks @TeslaCN .


-- 
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] EarthXuan commented on issue #13930: sharding-proxy insert data fail

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


   > @EarthXuan If the problem is solved, please close this issue.
   
   okok~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.

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

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



[GitHub] [shardingsphere] RaigorJiang commented on issue #13930: sharding-proxy insert data fail

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


   @EarthXuan Do you use version 5.0.0?


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