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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]