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

   ## Question
   I used SELECT UUID_SHORT() to generate UUID in MyBatis. It should have been 
the same data source to generate the id, but I switched the data source at this 
time.
   
   
   
![图片](https://user-images.githubusercontent.com/72535046/163302808-0294a9c8-c862-4e33-bbd5-52f15215df85.png)
   
   
   Creating a new SqlSession
   Registering transaction synchronization for SqlSession 
[org.apache.ibatis.session.defaults.DefaultSqlSession@39f5eba4]
   JDBC Connection 
[org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection@5f662dd]
 will be managed by Spring
   ==>  Preparing: SELECT UUID_SHORT() 
   ==> Parameters: 
   2022-04-14 10:33:03.387  INFO 11536 --- [           main] ShardingSphere-SQL 
                      : Logic SQL: SELECT UUID_SHORT()
   2022-04-14 10:33:03.388  INFO 11536 --- [           main] ShardingSphere-SQL 
                      : SQLStatement: 
MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, 
window=Optional.empty)
   2022-04-14 10:33:03.389  INFO 11536 --- [           main] ShardingSphere-SQL 
                      : Actual SQL: ds-1 ::: SELECT UUID_SHORT()
   <==    Columns: UUID_SHORT()
   <==        Row: 16384652781207687349
   <==      Total: 1
   ==>  Preparing: insert into tb_commodity_cat (id, account_id, parent_id, 
cat_name, sort_order, create_time, update_time, comment, creator, 
last_modified_by) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 
   ==> Parameters: 16384652781207687349(String), 302390790179528704(String), 
0(String), 芙蓉王1(String), 1(Integer), 2022-04-14 10:33:02.602(Timestamp), 
2022-04-14 10:33:02.602(Timestamp), 测试(String), null, xxx(String)
   2022-04-14 10:33:03.711  INFO 11536 --- [           main] ShardingSphere-SQL 
                      : Logic SQL: insert into 
        
       tb_commodity_cat
      
        (id, account_id, parent_id, cat_name, sort_order, create_time, 
         update_time, comment, creator, last_modified_by)
       values (?, ?, ?, ?, ?, ?,
         ?, ?, ?, ?)
   2022-04-14 10:33:03.712  INFO 11536 --- [           main] ShardingSphere-SQL 
                      : SQLStatement: 
MySQLInsertStatement(setAssignment=Optional.empty, 
onDuplicateKeyColumns=Optional.empty)
   2022-04-14 10:33:03.712  INFO 11536 --- [           main] ShardingSphere-SQL 
                      : Actual SQL: ds-2 ::: insert into 
        
       tb_commodity_cat
      
        (id, account_id, parent_id, cat_name, sort_order, create_time, 
         update_time, comment, creator, last_modified_by)
       values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ::: [16384652781207687349, 
302390790179528704, 0, 芙蓉王1, 1, 2022-04-14 10:33:02.602, 2022-04-14 
10:33:02.602, 测试, null, xxx]
   <==    Updates: 1
   Releasing transactional SqlSession 
[org.apache.ibatis.session.defaults.DefaultSqlSession@39f5eba4]``


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

Reply via email to