From 8485715e9abd1723e8babb547d2724e1f6a2aeb9 Mon Sep 17 00:00:00 2001 From: Gilles Darold Date: Thu, 1 Apr 2021 22:23:03 +0200 Subject: [PATCH] Update changelog and version to 21.1 --- changelog | 204 +++++++++++++++++++++++++ lib/Ora2Pg.pm | 2 +- lib/Ora2Pg/GEOM.pm | 2 +- lib/Ora2Pg/MySQL.pm | 2 +- lib/Ora2Pg/PLSQL.pm | 2 +- packaging/README | 10 +- packaging/debian/ora2pg/DEBIAN/control | 2 +- packaging/slackbuild/Ora2Pg.SlackBuild | 2 +- packaging/slackbuild/Ora2Pg.info | 4 +- scripts/ora2pg | 2 +- scripts/ora2pg_scanner | 2 +- 11 files changed, 219 insertions(+), 15 deletions(-) diff --git a/changelog b/changelog index 9f26b595..2ae44f2d 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,207 @@ +2021 04 01 - v21.1 + +This release fix several issues reported since past six months and +as usual adds some new features and improvements. + + * Now that Orafce 3.15.0 has a definition for the REGEXP_* function, + makes the translation optional to USE_ORAFCE directive. + * Add set application name in connection to Oracle/MySql/PostgreSQL. + * Add translation of REGEXP_COUNT() and change assessment cost. + * Rewrite the way REGEXP_LIKE() is translated into regexp_match to + support modifiers. This rewrite also fix default behavior between + Oracle and PostgreSQL. + * Replace DBMS_LOB.GETLENGTH() by PostgreSQL octet_length() function. + * Add types correspondences for VARCHAR2 and NVARCHAR2 in DATA_TYPE + configuration directive. + * Add autodetection and support of geometry type, srid and dimension + for ArcGis geometries. + * Add conversion of default value in function parameters. + * Add -u | --unit option to ora2pg_scanner to be able to set the + migration cost unit value globally. + * Replace DBMS_LOB.SUBSTR() by SUBSTR() + * Remove TO_CLOB() it is useless, manual cast could be necessary. + * Replace IS JSON validation clause in CHECK constraints by + (CASE WHEN $1::json IS NULL THEN true ELSE true END) + When the code is invalid an error is fired. + * DISTINCT and UNIQUE are synonym on Oracle + +Backward compatibility changes: + + - Force a column to be bigint if this is an identity column. Thanks + to MigOps.com for the patch. + - Fix EMPTY_LOB_NULL, enable/disable was inverted, keeping default + to enabled. Take care that in old ora2pg.conf it is disabled so it + will break backward compatibility with old configuration. + - Replace NO_LOB_LOCATOR with USE_LOB_LOCATOR and NO_BLOB_EXPORT + with ENABLE_BLOB_EXPORT to avoid confusion with double negative + variable. Backward compatibility is preserved with a warning. + - SRID for SDO_GEOMETRY export is now taken from the value not forced + from the metadata table. + +Here is the full list of changes and acknowledgements: + + - Take Geometry SRID from the data and fallback to SRID defined in + metadata when not found. Thanks to Sebastian Albert for the report. + - Fix case where Ora2Pg temporary substitution of '' by placeholder + was not restored. Thanks to MigOps.com for the patch. + - Fix identity column export on unsupported Oracle 18c options. + Thanks to MigOps.com for the patch. + - Fix export of columns indexes created with single quote. + Thanks to MigOps.com for the patch. + - Fix replacement of keyword PROCEDURE by FUNCTION in constraints + constants definition. Thanks to marie-joechahine for the report. + - Replace IS JSON validation clause in CHECK constraints. Thanks to + marie-joechahine for the report and MigOps.com for the patch. + - Add support to ON OVERFLOW clause in LISTAGG replacement. + Thanks to MigOps.com for the patch. + - Fix incorrect handling of HAVING+GROUP BY rewriting. + Thanks to MigOps.com for the patch. + - Add replacement of TO_NCHAR by a cast to varchar. Thanks to + MigOps.com for the patch. + - Fix replacement of NOTFOUND when there is extra space or new line + in the WHEN EXIT clause. Thanks to MigOps.com for the patch. + - Fix a regression in NO_VIEW_ORDERING, it was not taken in account + anymore. Thanks to RonJojn2 for the report. + - Replace DATA_TYPE with DTD_IDENTIFIER in MySQL catalog queries for + version prior 5.5.0. Thanks to zejeanmi for the report. + - Fix import script to import sequences before tables. Thanks to + MigOps.com for the patch. + - Fix detail report of custom type in migration assessment. Thanks + to MigOps.com for the patch. + - Fix duplicate schema prefixed to SYNONYM. Thanks to dlc75 for the + reports. + - Replace NO_LOB_LOCATOR with USE_LOB_LOCATOR and NO_BLOB_EXPORT with + ENABLE_BLOB_EXPORT to avoid confusion with double negative variable. + Thanks to Rob Johnson for the report. + - Fix some missing replacements of NVL and rewrite !=-1 into != -1. + Thanks to MigOps.com for the patch. + - Fix ROWNUM followed by + or - operator and when no aliases are + provided. Thanks to MigOps.com for the patch. + - Add DBSFWUSER to the list of user/schema exclusion. Thanks to + MigOps.com for the patch. + - Fix regexp to not append subquery aliases on JOIN clause. Thanks + to Rui Pereira for the report. + - Handle PRESERVE_CASE and EXPORT_SCHEMA in sequence name. Thanks + to marie-joechahine for the report. + - Add CREATE SCHEMA statement to sequence export when EXPORT_SCHEMA + is enabled. Thanks to marie-joechahine for the report. + - Fix duplicate index name on subpartition. Thanks to Philippe + Beaudoin for the report. + - Exclude sequences used for IDENTITY column (ISEQ$$_). Thanks to + marie-joechahine for the report. + - Fix parsing from file of CREATE SEQUENCE. Thanks to Rui Pereira + for the report. + - In export_all.sh script use the database owner provided if it is a + superuser instead of postgres user. Thanks to jjune235 for the + feature request. + - Fix parsing of triggers when there is a CASE inside the code. + Thanks to Rui Pereira for the report. + - Add set application name in connection to Oracle/MySql/PostgreSQL. + Thanks to Yoni Sade for the patch. + - Fix double column alias when replacing ROWNUM. Thanks to Rui + Pereira for the report. + - Add translation of the REGEXP_COUNT function and change assessment + cost. + - Rewrite the way REGEXP_LIKE is translated into regexp_match to + support modifiers. This rewrite also fix default behavior between + Oracle and PostgreSQL. Thanks to otterrisk for the report. + - Add IS JSON to assessment. Thanks to marie-joe Chahine for the + report. + - Fix multi-columns RANGE partitioning. Thanks to Philippe Beaudoin + for the report. + - Improve reordering columns. Sort by fieldsize first, if same size + then it sorts by original position. Thanks to Sebastien Caunes for + the patch. + - Append partition's column to the primary key of the table as it + must be part of the PK on PostgreSQL. Thanks to xinjirufen for the + report. + - Fix partition export where PRESERVE_CASE was applied to Oracle + side. Thanks to schleb1309 for the report. + - Fix trigger export with column restriction. Thanks to Sebastien + Caunes for the report. + - Update installation information. + - Fix table reordering following data type. Thanks to Sebastien + Caunes for the patch. + - Fix incorrect variable name corresponding to DATA_EXPORT_ORDER + making this directive inefficient. Thanks to Ron Johnson for the + report. + - Fix translation of check constraint when read from file + - Fix EMPTY_LOB_NULL, enable/disable as inverted, keep default to + enabled. Take care that in old ora2pg.conf it is disabled so it + will break backward compatibility with old configuration. + - Fix false positive detection of input filename is the same as + output file. + - Rename variables SCHEMA_ONLY, DATA_ONLY and CONSTRAINTS_ONLY in + script import_all.sh to conform to their real use. Thanks to + Sebastien Caunes for the report. + - Fix comment detection breaking the package header parsing and + global variable detection. + - Fix ROWNUM detection for replacement by LIMIT + - Fix escaping of psql command in configuration file comment and + set default value for PG_VERSION to 12. + - Replace precision by exactness in documentation. Thanks to + Sebastien Caunes for the report. + - Prevent reducing DATA_LIMIT when NO_BLOB_EXPORT is enabled. + Thanks to Thomas Reiss for the report. + - Fix geometry type detection. + - Add autodetection of geometry type, srid and dimension for + ArcGis geometries. Thanks to changmao01 for the feature request. + - Fix call to ST_GeomFromText when no SRID is found. + - Fix case where OVERRIDE SYSTEM VALUE clause could be added if PG + version is < 10. Thanks to changmao01 for the report. + - Fix unwanted call to internal GEOM library for ArcGis geometries. + Thanks to changmao01 for the report. + - Exclude schema SDE (ArGis) from export. Thanks to changmao01 for + the report. + - prevent looking twice to same custom data type definition. + - Fix previous patch to catch SDO_GEOMETRY on lowercase regexp. + - Limit detection of geometry data type to SDO_GEOMETRY. + - Fix column name replacement in view definition. Thanks to Amit + Sanghvi for the report. + - Fix REPLACE_COLS parsing to allow space in column name. Thanks + to Amit Sanghvi for the report. + - Fix translation from file of triggers with WHEN clause. Thanks + to Rui Pereira for the report. + - Fix column name kept lowercase in the MOD() clause when -J is + used. Thanks to Code-UV for the report. + - Keep case of PG_SCHEMA definition when used in TEST action. + - Fix data export for columns with custom data type. Thanks to + Aymen Zaiter for the report. + - Fix missing bracket with || operator in CREATE INDEX. Thanks to + traxverlis for the report. + - Fix export of single row unique function base index. Example: + CREATE UNIQUE INDEX single_row_idx ON single_row ((1)); + Thanks to unrandom123 for the report. + - Update documentation about schemas used in TEST action. + - Disable materialized view export with MySQL export it is not + supported. Thanks to naveenjul29 for the report. + - Fix table alias detection in Oracle (+) join rewrite. + - Fix an infinite loop in Oracle (+) join rewrite when there is no + table aliases and the table is prefixed by its schema. Thanks to + Olivier Picavet for the report. + - Fix MODIFY_STRUCT when column name need to be escaped. Thanks to + helmichamsi10 for the report. + - Fix empty PARTITION BY () clause. Thanks to Aymen Zaiter. + - Fix export of global variable from package description when there + is no package body. Thanks to naveenjul29 for the report. + - Add package description export when dumping package source, + previously only the package body was dump. This will allow to + check global variables export. + - Whilst working on the Reproducible Builds effort (https//reproducible-builds.org/) + it appears that ora2pg could not be built reproducibly. Thanks to + Chris Lamb for the patch. + - Fix case of NUMBER(*,10) declaration. Oracle has a precision of 1 to 38 + for numeric. Even if PostgreSQL allow a precision of 1000 use 38 to + replace junk parameter. Thanks to xinjirufen for the report. + - Add conversion of default value in function parameters, like syssdate + rewriting for example. Thanks to unrandom123 for the report. + - Fix a regression in data encoding when exporting data introduced in + commit fa8e9de. Thanks to gp4git for the report. + - Add debug information about the environment variables used before + connecting to Oracle. + - Fix case of duplicate between unique index and unique constraint with + multiple columns. Thanks to gp4git. + 2020 10 12 - v21.0 This release fix several issues reported since last release and adds diff --git a/lib/Ora2Pg.pm b/lib/Ora2Pg.pm index 6a59f31d..5a2b0adb 100644 --- a/lib/Ora2Pg.pm +++ b/lib/Ora2Pg.pm @@ -42,7 +42,7 @@ use Benchmark; #set locale to LC_NUMERIC C setlocale(LC_NUMERIC,"C"); -$VERSION = '21.0'; +$VERSION = '21.1'; $PSQL = $ENV{PLSQL} || 'psql'; $| = 1; diff --git a/lib/Ora2Pg/GEOM.pm b/lib/Ora2Pg/GEOM.pm index 15172024..3be1487d 100644 --- a/lib/Ora2Pg/GEOM.pm +++ b/lib/Ora2Pg/GEOM.pm @@ -40,7 +40,7 @@ use vars qw($VERSION); use strict; -$VERSION = '21.0'; +$VERSION = '21.1'; # SDO_ETYPE # Second element of triplet in SDO_ELEM_INFO diff --git a/lib/Ora2Pg/MySQL.pm b/lib/Ora2Pg/MySQL.pm index 916c3237..64ba7ccb 100644 --- a/lib/Ora2Pg/MySQL.pm +++ b/lib/Ora2Pg/MySQL.pm @@ -9,7 +9,7 @@ use POSIX qw(locale_h); setlocale(LC_NUMERIC,"C"); -$VERSION = '21.0'; +$VERSION = '21.1'; # Some function might be excluded from export and assessment. our @EXCLUDED_FUNCTION = ('SQUIRREL_GET_ERROR_OFFSET'); diff --git a/lib/Ora2Pg/PLSQL.pm b/lib/Ora2Pg/PLSQL.pm index a2c05968..744f9bf1 100644 --- a/lib/Ora2Pg/PLSQL.pm +++ b/lib/Ora2Pg/PLSQL.pm @@ -31,7 +31,7 @@ use POSIX qw(locale_h); setlocale(LC_NUMERIC,"C"); -$VERSION = '21.0'; +$VERSION = '21.1'; #---------------------------------------------------- # Cost scores used when converting PLSQL to PLPGSQL diff --git a/packaging/README b/packaging/README index 5e50fedd..5b195d19 100644 --- a/packaging/README +++ b/packaging/README @@ -12,13 +12,13 @@ RPM/ The binary package may be found here: - ~/rpmbuild/RPMS/noarch/ora2pg-21.0-1.noarch.rpm + ~/rpmbuild/RPMS/noarch/ora2pg-21.1-1.noarch.rpm or - /usr/src/redhat/RPMS/i386/ora2pg-21.0-1.noarch.rpm + /usr/src/redhat/RPMS/i386/ora2pg-21.1-1.noarch.rpm To install run: - rpm -i ~/rpmbuild/RPMS/noarch/ora2pg-21.0-1.noarch.rpm + rpm -i ~/rpmbuild/RPMS/noarch/ora2pg-21.1-1.noarch.rpm slackbuild/ @@ -30,11 +30,11 @@ slackbuild/ then take a look at /tmp/build/ to find the Slackware package. To install run the following command: - installpkg /tmp/build/ora2pg-21.0-i386-1gda.tgz + installpkg /tmp/build/ora2pg-21.1-i386-1gda.tgz or - installpkg /tmp/build/ora2pg-21.0-x86_64-1gda.tgz + installpkg /tmp/build/ora2pg-21.1-x86_64-1gda.tgz following the architecture. diff --git a/packaging/debian/ora2pg/DEBIAN/control b/packaging/debian/ora2pg/DEBIAN/control index 179913f7..1164c000 100644 --- a/packaging/debian/ora2pg/DEBIAN/control +++ b/packaging/debian/ora2pg/DEBIAN/control @@ -1,5 +1,5 @@ Package: ora2pg -Version: 21.0 +Version: 21.1 Priority: optional Architecture: all Essential: no diff --git a/packaging/slackbuild/Ora2Pg.SlackBuild b/packaging/slackbuild/Ora2Pg.SlackBuild index 206762f9..6dc0afc9 100644 --- a/packaging/slackbuild/Ora2Pg.SlackBuild +++ b/packaging/slackbuild/Ora2Pg.SlackBuild @@ -12,7 +12,7 @@ ## Fill these variables to your needs ## NAMESRC=${NAMESRC:-ora2pg} -VERSION=${VERSION:-21.0} +VERSION=${VERSION:-21.1} EXT=${EXT:-tar.bz2} NAMEPKG=${NAMEPKG:-ora2pg} PKGEXT=${PKGEXT:-tgz/txz} diff --git a/packaging/slackbuild/Ora2Pg.info b/packaging/slackbuild/Ora2Pg.info index d63d4271..894feacb 100644 --- a/packaging/slackbuild/Ora2Pg.info +++ b/packaging/slackbuild/Ora2Pg.info @@ -1,7 +1,7 @@ PRGNAM="Ora2Pg" -VERSION="21.0" +VERSION="21.1" HOMEPAGE="http://ora2pg.darold.net/" -DOWNLOAD="http://downloads.sourceforge.net/ora2pg/ora2pg-21.0.tar.gz" +DOWNLOAD="http://downloads.sourceforge.net/ora2pg/ora2pg-21.1.tar.gz" MD5SUM="" DOWNLOAD_x86_64="UNTESTED" MD5SUM_x86_64="" diff --git a/scripts/ora2pg b/scripts/ora2pg index b37e41c7..7b365685 100644 --- a/scripts/ora2pg +++ b/scripts/ora2pg @@ -31,7 +31,7 @@ use POSIX qw(locale_h sys_wait_h _exit); setlocale(LC_NUMERIC, ''); setlocale(LC_ALL, 'C'); -my $VERSION = '21.0'; +my $VERSION = '21.1'; $| = 1; diff --git a/scripts/ora2pg_scanner b/scripts/ora2pg_scanner index dc86d702..26f35c52 100644 --- a/scripts/ora2pg_scanner +++ b/scripts/ora2pg_scanner @@ -26,7 +26,7 @@ use strict; use Getopt::Long qw(:config no_ignore_case bundling); -my $VERSION = '21.0'; +my $VERSION = '21.1'; my @DB_DNS = (); my $OUTDIR = '';