linghengqian opened a new issue, #6346: URL: https://github.com/apache/incubator-seata/issues/6346
<!-- Please do not use this issue template to report security vulnerabilities but refer to our [security policy](https://github.com/seata/seata/security/policy). --> - [x] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate. ### Ⅰ. Issue Description - Quick Start documentation uses `ext` field not mentioned in MySQL configuration template. Refer to https://seata.apache.org/docs/user/quickstart/#step-2-create-undo_log-table . Also, I don't quite understand why English documentation needs Chinese comments here. ```sql -- 注意此处0.3.0+ 增加唯一索引 ux_undo_log CREATE TABLE `undo_log` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `branch_id` bigint(20) NOT NULL, `xid` varchar(100) NOT NULL, `context` varchar(128) NOT NULL, `rollback_info` longblob NOT NULL, `log_status` int(11) NOT NULL, `log_created` datetime NOT NULL, `log_modified` datetime NOT NULL, `ext` varchar(100) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; ``` - The explanation for this property is missing on the https://github.com/apache/incubator-seata/blob/v2.0.0/script/client/at/db/mysql.sql side. ```sql -- for AT mode you must to init this sql for you business database. the seata server not need it. CREATE TABLE IF NOT EXISTS `undo_log` ( `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); ``` - The documentation doesn't seem to mention `ALTER TABLE` SQL. - An early investigation is at https://github.com/apache/shardingsphere/pull/30138 . ### Ⅱ. Describe what happened - Null. ### Ⅲ. Describe what you expected to happen - Possible documentation updates or template updates. ### Ⅳ. How to reproduce it (as minimally and precisely as possible) 1. Open https://seata.apache.org/docs/user/quickstart/#step-2-create-undo_log-table . 2. Open https://github.com/apache/incubator-seata/blob/v2.0.0/script/client/at/db/mysql.sql . 3. Open https://github.com/apache/incubator-seata/blob/2.x/script/client/at/db/mysql.sql . Minimal yet complete reproducer code (or URL to code): - Null. ### Ⅴ. Anything else we need to know? - Null. ### Ⅵ. Environment: - JDK version(e.g. `java -version`): ```shell openjdk version "21.0.2" 2024-01-16 OpenJDK Runtime Environment GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30) OpenJDK 64-Bit Server VM GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30, mixed mode, sharing) ``` - Seata client/server version: `2.0.0` - Database version: MySQL Server 8.3.0 - OS(e.g. `uname -a`): `Linux DESKTOP-J7M76VH 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux` - Others: Null -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
