From 83b60c8c40991b9d097a146809183424254ee33c Mon Sep 17 00:00:00 2001 From: travelliu Date: Mon, 16 May 2022 10:47:32 +0800 Subject: [PATCH] feat(mtk): release v2.3.2 --- product/en/docs-mtk/v2.0/mtk-config.md | 40 ++++++++++++++ .../docs-mtk/v2.0/mtk-mysql-to-openGauss.md | 17 ++++++ .../docs-mtk/v2.0/mtk-oracle-to-openGauss.md | 8 +-- product/en/docs-mtk/v2.0/release-notes.md | 51 +++++++++++++++++ product/zh/docs-mtk/v2.0/mtk-config.md | 42 +++++++++++++- .../docs-mtk/v2.0/mtk-mysql-to-openGauss.md | 17 ++++++ .../docs-mtk/v2.0/mtk-oracle-to-openGauss.md | 8 +-- product/zh/docs-mtk/v2.0/release-notes.md | 55 +++++++++++++++++++ 8 files changed, 229 insertions(+), 9 deletions(-) diff --git a/product/en/docs-mtk/v2.0/mtk-config.md b/product/en/docs-mtk/v2.0/mtk-config.md index dcdceae6..09bcf945 100644 --- a/product/en/docs-mtk/v2.0/mtk-config.md +++ b/product/en/docs-mtk/v2.0/mtk-config.md @@ -784,6 +784,46 @@ openGauss database version greater than or equal to 2.1.0 can be configured as ` openGauss databases smaller than 2.1.0 can only be configured as `schema` +### tableOptions + +map[string]string + +Supported after `v2.3.2` version + +Configure the Add table attributes when creating a table option. For the time being, only openGauss/MogDB is supported. + +- openGauss/MogDB `create table xxx() with (xx)`; + +Parameters are not case-sensitive + +Default value: Empty + +Examples: + +```json +"tableOptions": { + "*": "orientation=row, compression=no", + "Schema1.*": "orientation=row, compression=no", + "Schema1.TABLE_1": "orientation=row, compression=no" +} +``` + +- "*", // Migrate all tables in the object +- "Schema1.*" // Migrate all tables under Schema1 in the object +- "Schema1.TABLE_1" // only Schema1.TABLE_1 table add option + +Option special value remove + +`compression=remove` The compression attribute is removed + +### indexOptions + +map[string]string + +Supported after `v2.3.2` version + +As with the tableOptions option configuration, it only takes effect for indexes. + ## limit ```json diff --git a/product/en/docs-mtk/v2.0/mtk-mysql-to-openGauss.md b/product/en/docs-mtk/v2.0/mtk-mysql-to-openGauss.md index f628044f..66267344 100644 --- a/product/en/docs-mtk/v2.0/mtk-mysql-to-openGauss.md +++ b/product/en/docs-mtk/v2.0/mtk-mysql-to-openGauss.md @@ -225,6 +225,23 @@ Therefore, the values **A**, **B**, and **PG** are commonly used. ### Constraint - The name is automatically changed in openGauss. +- **not supported** Foreign keys point to non-unique indexes of the parent table + + ```sql + CREATE TABLE `t1` ( + `id` int(11) NOT NULL, + `uuid` binary(16) NOT NULL COMMENT 'UUID', + PRIMARY KEY (`id`) USING BTREE, + KEY `uuid` (`uuid`) USING BTREE + ); + CREATE TABLE `t2` ( + `c1_uuid` binary(16) NOT NUL, + `c2_uuid` binary(16) NOT NULL, + PRIMARY KEY (`c1_uuid`,`c2_uuid`), + CONSTRAINT `FK_T1` FOREIGN KEY (`c2_uuid`) REFERENCES `t1` (`uuid`) ON DELETE RESTRICT ON UPDATE RESTRICT + ); + -- FK_T1 constraints are not migrated. The dependency it points to is a normal index + ``` ### Index diff --git a/product/en/docs-mtk/v2.0/mtk-oracle-to-openGauss.md b/product/en/docs-mtk/v2.0/mtk-oracle-to-openGauss.md index 5aeba789..0fd9ec77 100644 --- a/product/en/docs-mtk/v2.0/mtk-oracle-to-openGauss.md +++ b/product/en/docs-mtk/v2.0/mtk-oracle-to-openGauss.md @@ -176,14 +176,14 @@ If the current value is greater than 9223372036854775807, an error will occur. F | Oracle | openGauss | |-------------------------------------------|-----------------------------| -| SMALLINT(number(*,0)) | numeric(38) | -| INTEGER(number(*,0)) | numeric(38) | +| SMALLINT(number(*,0)) | bigint | +| INTEGER(number(*,0)) | bigint | +| NUMBER(8,5) | numeric(8,5) | +| NUMBER | numeric | | DECIMAL(8,5) | numeric(8,5) | | NUMERIC(8,5) | numeric(8,5) | | REAL(float(64)) | numeric | | FLOAT(20) | numeric | -| NUMBER(8,5) | numeric(8,5) | -| NUMBER | numeric(38) | | BINARY_FLOAT | numeric | | BINARY_DOUBLE | numeric | | CHAR(8) | character(8) | diff --git a/product/en/docs-mtk/v2.0/release-notes.md b/product/en/docs-mtk/v2.0/release-notes.md index 7f95aee1..dfc422b7 100644 --- a/product/en/docs-mtk/v2.0/release-notes.md +++ b/product/en/docs-mtk/v2.0/release-notes.md @@ -7,6 +7,57 @@ date: 2021-09-13 # Release Notes +## v2.3.2 + +2022-05-16 + +### MTK + +- [mtk_2.3.2_darwin_amd64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtk_2.3.2_darwin_amd64.tar.gz) +- [mtk_2.3.2_darwin_amd64_db2.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtk_2.3.2_darwin_amd64_db2.tar.gz) +- [mtk_2.3.2_darwin_arm64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtk_2.3.2_darwin_arm64.tar.gz) +- [mtk_2.3.2_linux_amd64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtk_2.3.2_linux_amd64.tar.gz) +- [mtk_2.3.2_linux_amd64_db2.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtk_2.3.2_linux_amd64_db2.tar.gz) +- [mtk_2.3.2_linux_arm64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtk_2.3.2_linux_arm64.tar.gz) +- [mtk_2.3.2_windows_amd64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtk_2.3.2_windows_amd64.tar.gz) +- [mtk_2.3.2_windows_amd64_db2.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtk_2.3.2_windows_amd64_db2.tar.gz) +- [mtk_checksums.txt](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtk_checksums.txt) + +### MTKD + +- [mtkd_2.3.2_linux_amd64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtkd_2.3.2_linux_amd64.tar.gz) +- [mtkd_2.3.2_linux_amd64_db2.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtkd_2.3.2_linux_amd64_db2.tar.gz) +- [mtkd_2.3.2_linux_arm64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtkd_2.3.2_linux_arm64.tar.gz) + +### Bug Fixes + +- **MySQL:** There is no keyword handling problem in the primary key syntax section of the table-building statement +- **openGauss:** convert DB2 `current user` 为 openGauss `session_user` + +### Features + +- **openGauss:** add parameter[indexOptions](mtk-config#indexoptions) support migration to openGauss add/modify/delete index creation options +- **openGauss:** add parameter[tableOptions](mtk-config#tableoptions) support migration to openGauss add/modify/delete table creation options + +## v2.3.1 + +2022-05-09 + +### Bug Fixes + +- **DB2:** Migration to MySQL auto-incr columns is not a primary key first column issue +- **MTKD:** Log default level issue +- **MySQL:** Migration Oracle Number(*,0) loss of specific precision issues +- **MySQL:** Migration MySQL connections take up too many issues +- **openGauss:** Migration Oracle Number(*,0) loss of specific accuracy issues +- **openGauss:** Query partition SQL statement issues + +### Features + +- **MySQL:** Supports migration triggers to openGauss/MogDB +- **Postgre:** Supports `GENERATED ALWAYS AS IDENTITY` +- **openGauss:** Supports openGauss 3.0 large sequence + ## v2.3.0 ### MTK diff --git a/product/zh/docs-mtk/v2.0/mtk-config.md b/product/zh/docs-mtk/v2.0/mtk-config.md index 3a55be1f..33eaea25 100644 --- a/product/zh/docs-mtk/v2.0/mtk-config.md +++ b/product/zh/docs-mtk/v2.0/mtk-config.md @@ -773,6 +773,46 @@ openGauss 数据库版本大于等于2.1.0可配置为 `package` 或 `schema` openGauss 数据库小于2.1.0 只能配置为 `schema` +### tableOptions + +map[string]string + +Supported after `v2.3.2` version + +配置在创建表的时候添加表属性选项.暂时只支持openGauss/MogDB. + +- openGauss/MogDB `create table xxx() with (xx)`; + +参数不区分大小写 + +默认值: 空 + +Examples: + +```json +"tableOptions": { + "*": "orientation=row, compression=no", + "Schema1.*": "orientation=row, compression=no", + "Schema1.Table": "orientation=row, compression=no" +} +``` + +- "*", // 迁移对象中所有表 +- "Schema1.*" // 迁移对象中Schema1下所有表 +- "Schema1.Table" // 迁移对象中Schema1下table表 + +选项特殊值 remove + +如`compression=remove` 会移除压缩属性 + +### indexOptions + +map[string]string + +Supported after `v2.3.2` version + +和tableOptions选项配置一样,只针对索引生效. + ## limit ```json @@ -780,7 +820,7 @@ openGauss 数据库小于2.1.0 只能配置为 `schema` "parallel": 2, "fetchSize": 1000, "batchSize": 1000, - "bufferSize": 4 + "bufferSize": 4, "cpBufferSize": 8, "oracleSelectParallel": 2, } diff --git a/product/zh/docs-mtk/v2.0/mtk-mysql-to-openGauss.md b/product/zh/docs-mtk/v2.0/mtk-mysql-to-openGauss.md index 52b8e7d4..a119e4ff 100644 --- a/product/zh/docs-mtk/v2.0/mtk-mysql-to-openGauss.md +++ b/product/zh/docs-mtk/v2.0/mtk-mysql-to-openGauss.md @@ -217,6 +217,23 @@ date: 2021-03-04 #### 约束 - 在openGauss/MogDB端会自动改名 +- 不支持子表的外键指向父表的非唯一索引 + + ```sql + CREATE TABLE `t1` ( + `id` int(11) NOT NULL, + `uuid` binary(16) NOT NULL COMMENT 'UUID', + PRIMARY KEY (`id`) USING BTREE, + KEY `uuid` (`uuid`) USING BTREE + ); + CREATE TABLE `t2` ( + `c1_uuid` binary(16) NOT NUL, + `c2_uuid` binary(16) NOT NULL, + PRIMARY KEY (`c1_uuid`,`c2_uuid`), + CONSTRAINT `FK_T1` FOREIGN KEY (`c2_uuid`) REFERENCES `t1` (`uuid`) ON DELETE RESTRICT ON UPDATE RESTRICT + ); + -- FK_T1 约束不会迁移. 它指向的依赖是普通索引 + ``` #### 索引 diff --git a/product/zh/docs-mtk/v2.0/mtk-oracle-to-openGauss.md b/product/zh/docs-mtk/v2.0/mtk-oracle-to-openGauss.md index 6f732fca..65dcd17a 100644 --- a/product/zh/docs-mtk/v2.0/mtk-oracle-to-openGauss.md +++ b/product/zh/docs-mtk/v2.0/mtk-oracle-to-openGauss.md @@ -159,14 +159,14 @@ MogDB=#select id,concat('"',col_char,'"') ,col_char from tab_char; | Oracle | openGauss | |-------------------------------------------|-----------------------------| -| SMALLINT(number(*,0)) | numeric(38) | -| INTEGER(number(*,0)) | numeric(38) | +| SMALLINT(number(*,0)) | bigint | +| INTEGER(number(*,0)) | bigint | +| NUMBER(8,5) | numeric(8,5) | +| NUMBER | numeric | | DECIMAL(8,5) | numeric(8,5) | | NUMERIC(8,5) | numeric(8,5) | | REAL(float(64)) | numeric | | FLOAT(20) | numeric | -| NUMBER(8,5) | numeric(8,5) | -| NUMBER | numeric(38) | | BINARY_FLOAT | numeric | | BINARY_DOUBLE | numeric | | CHAR(8) | character(8) | diff --git a/product/zh/docs-mtk/v2.0/release-notes.md b/product/zh/docs-mtk/v2.0/release-notes.md index 4a35ffb7..ff42f76c 100644 --- a/product/zh/docs-mtk/v2.0/release-notes.md +++ b/product/zh/docs-mtk/v2.0/release-notes.md @@ -7,6 +7,61 @@ date: 2021-09-17 # 发布记录 +## v2.3.2 + +2022-05-16 + +### MTK + +- [mtk_2.3.2_darwin_amd64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtk_2.3.2_darwin_amd64.tar.gz) +- [mtk_2.3.2_darwin_amd64_db2.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtk_2.3.2_darwin_amd64_db2.tar.gz) +- [mtk_2.3.2_darwin_arm64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtk_2.3.2_darwin_arm64.tar.gz) +- [mtk_2.3.2_linux_amd64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtk_2.3.2_linux_amd64.tar.gz) +- [mtk_2.3.2_linux_amd64_db2.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtk_2.3.2_linux_amd64_db2.tar.gz) +- [mtk_2.3.2_linux_arm64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtk_2.3.2_linux_arm64.tar.gz) +- [mtk_2.3.2_windows_amd64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtk_2.3.2_windows_amd64.tar.gz) +- [mtk_2.3.2_windows_amd64_db2.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtk_2.3.2_windows_amd64_db2.tar.gz) +- [mtk_checksums.txt](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtk_checksums.txt) + +### MTKD + +- [mtkd_2.3.2_linux_amd64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtkd_2.3.2_linux_amd64.tar.gz) +- [mtkd_2.3.2_linux_amd64_db2.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtkd_2.3.2_linux_amd64_db2.tar.gz) +- [mtkd_2.3.2_linux_arm64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.3.2/mtkd_2.3.2_linux_arm64.tar.gz) + +### Bug Fixes + +- **MySQL:** 建表语句主键语法部分没有进行关键字处理问题 +- **openGauss:** 转换 DB2 `current user` 为 openGauss `session_user` +- **Oracle:** 增强Number类型转换 + - number ->numeric + - integer(number(*,0)) ->bigint + - number(10,2) -> numeric(10,2) + +### Features + +- **openGauss:** 添加参数[indexOptions](mtk-config#indexoptions)支持迁移到openGauss添加/修改/删除索引创建选项 +- **openGauss:** 添加参数[tableOptions](mtk-config#tableoptions)支持迁移到openGauss添加/修改/删除表创建选项 + +## v2.3.1 + +2022-05-09 + +### Bug Fixes + +- **DB2:** 迁移到MySQL自增列不是主键第一列问题 +- **MTKD:** 日志默认级别问题 +- **MySQL:** 迁移Oracle Number(*,0)丢失具体精度问题 +- **MySQL:** 迁移MySQL连接数占用过多问题 +- **openGauss:** 迁移Oracle Number(*,0)丢失具体精度问题 +- **openGauss:** 查询分区SQL语句问题 + +### Features + +- **MySQL:** 支持迁移触发器到 openGauss/MogDB +- **Postgre:** 支持`GENERATED ALWAYS AS IDENTITY` +- **openGauss:** 支持openGauss 3.0 large sequence + ## v2.3.0 2022-04-19 -- Gitee