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 2022/11/14 07:23:31 UTC

[GitHub] [shardingsphere] FlyingZC commented on pull request #22165: Fix alter transaction rule error

FlyingZC commented on PR #22165:
URL: https://github.com/apache/shardingsphere/pull/22165#issuecomment-1313206070

   Test cases:
   **1. alter transaction rule**
   ```sql
   ALTER TRANSACTION RULE
   (
       DEFAULT='XA',
       TYPE(NAME='Atomikos')
   );
   ```
   
   **2.add resource**
   ```sql
   CREATE DATABASE test;
   
   REGISTER STORAGE UNIT ds_0 (
       URL="jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false",
       USER="root",
       PASSWORD="x",
       PROPERTIES("maximumPoolSize"="10","idleTimeout"="30000")
   ), ds_1 (
       URL="jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false",
       USER="root",
       PASSWORD="x",
       PROPERTIES("maximumPoolSize"="10","idleTimeout"="30000")
   );
   
   REGISTER STORAGE UNIT ds_2 (
       URL="jdbc:mysql://127.0.0.1:3306/demo_ds_2?serverTimezone=UTC&useSSL=false",
       USER="root",
       PASSWORD="x",
       PROPERTIES("maximumPoolSize"="10","idleTimeout"="30000")
   );
   ```
   
   **3.add resource2**
   ```sql
   CREATE DATABASE test2;
   
   use test2;
   
   REGISTER STORAGE UNIT ds_0 (
       URL="jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false",
       USER="root",
       PASSWORD="x",
       PROPERTIES("maximumPoolSize"="10","idleTimeout"="30000")
   ), ds_1 (
       URL="jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false",
       USER="root",
       PASSWORD="x",
       PROPERTIES("maximumPoolSize"="10","idleTimeout"="30000")
   );
   
   REGISTER STORAGE UNIT ds_2 (
       URL="jdbc:mysql://127.0.0.1:3306/demo_ds_2?serverTimezone=UTC&useSSL=false",
       USER="root",
       PASSWORD="x",
       PROPERTIES("maximumPoolSize"="10","idleTimeout"="30000")
   );
   
   ```
   
   **4.close resource**
   ```sql
   drop database test2;
   ```


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