diff --git a/.github/configuration/upgrade-test-configuration.yml b/.github/configuration/upgrade-test-configuration.yml index 3d56f6cbfc..c7f2207656 100644 --- a/.github/configuration/upgrade-test-configuration.yml +++ b/.github/configuration/upgrade-test-configuration.yml @@ -61,7 +61,7 @@ upgrade-version: [{ { upgrade-path: [ { - version: '14.12', + version: '14.13', upgrade-type: null }, { diff --git a/.github/template/version-branch-template.yml b/.github/template/version-branch-template.yml index cd06636ce0..84029ab580 100644 --- a/.github/template/version-branch-template.yml +++ b/.github/template/version-branch-template.yml @@ -40,6 +40,9 @@ '14.12': engine_branch: BABEL_2_9_STABLE__PG_14_12 extension_branch: BABEL_2_9_STABLE +'14.13': + engine_branch: BABEL_2_10_STABLE__PG_14_13 + extension_branch: BABEL_2_10_STABLE 'source.latest': engine_branch: latest extension_branch: latest diff --git a/.gitignore b/.gitignore index a63fab7a39..4298c3f48e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,8 +21,8 @@ contrib/babelfishpg_tsql/antlr/antlr4cpp_generated_src/ contrib/babelfishpg_tsql/antlr/cmake_install.cmake contrib/babelfishpg_tsql/pl_reserved_kwlist_d.h contrib/babelfishpg_tsql/pl_unreserved_kwlist_d.h -contrib/babelfishpg_tsql/sql/babelfishpg_tsql--[0-9].[0-9].[0-9]--[0-9].[0-9].[0-9].sql -contrib/babelfishpg_tsql/sql/babelfishpg_tsql--[0-9].[0-9].[0-9].sql +contrib/babelfishpg_tsql/sql/babelfishpg_tsql--[0-9]*.[0-9]*.[0-9]*--[0-9]*.[0-9]*.[0-9]*.sql +contrib/babelfishpg_tsql/sql/babelfishpg_tsql--[0-9]*.[0-9]*.[0-9]*.sql contrib/babelfishpg_tsql/src/backend_parser/gram-backend.c contrib/babelfishpg_tsql/src/backend_parser/gram-backend.h contrib/babelfishpg_tsql/src/backend_parser/gram-backend.output @@ -32,4 +32,5 @@ contrib/babelfishpg_tsql/src/backend_parser/scan-backend.c contrib/babelfishpg_tsql/src/backend_parser/scan-backend.l contrib/babelfishpg_tsql/src/pl_gram.c contrib/babelfishpg_tsql/src/pl_gram.h -contrib/babelfishpg_tsql/src/pl_gram.output \ No newline at end of file +contrib/babelfishpg_tsql/src/pl_gram.output + diff --git a/contrib/babelfishpg_tsql/Version.config b/contrib/babelfishpg_tsql/Version.config index 59157caf2a..f8d8886463 100644 --- a/contrib/babelfishpg_tsql/Version.config +++ b/contrib/babelfishpg_tsql/Version.config @@ -2,6 +2,6 @@ # places during the build process PGTSQL_MAJOR_VERSION=2 -PGTSQL_MINOR_VERSION=10 +PGTSQL_MINOR_VERSION=11 PGTSQL_MICRO_VERSION=0 diff --git a/contrib/babelfishpg_tsql/sql/upgrades/babelfishpg_tsql--2.10.0--2.11.0.sql b/contrib/babelfishpg_tsql/sql/upgrades/babelfishpg_tsql--2.10.0--2.11.0.sql new file mode 100644 index 0000000000..37072820ee --- /dev/null +++ b/contrib/babelfishpg_tsql/sql/upgrades/babelfishpg_tsql--2.10.0--2.11.0.sql @@ -0,0 +1,19 @@ +-- complain if script is sourced in psql, rather than via ALTER EXTENSION +\echo Use "ALTER EXTENSION ""babelfishpg_tsql"" UPDATE TO '2.11.0'" to load this file. \quit + +-- add 'sys' to search path for the convenience +SELECT set_config('search_path', 'sys, '||current_setting('search_path'), false); + +-- Please add your SQLs here +/* + * Note: These SQL statements may get executed multiple times specially when some features get backpatched. + * So make sure that any SQL statement (DDL/DML) being added here can be executed multiple times without affecting + * final behaviour. + */ + + +-- After upgrade, always run analyze for all babelfish catalogs. +CALL sys.analyze_babelfish_catalogs(); + +-- Reset search_path to not affect any subsequent scripts +SELECT set_config('search_path', trim(leading 'sys, ' from current_setting('search_path')), false); diff --git a/contrib/babelfishpg_tsql/src/babelfish_version.h b/contrib/babelfishpg_tsql/src/babelfish_version.h index 582d5aeef4..f62bef6e72 100644 --- a/contrib/babelfishpg_tsql/src/babelfish_version.h +++ b/contrib/babelfishpg_tsql/src/babelfish_version.h @@ -8,7 +8,7 @@ *------------------------------------------------------------------------- */ -#define BABELFISH_VERSION_STR "2.10.0" -#define BABELFISH_INTERNAL_VERSION_STR "Babelfish 14.13.0.0" +#define BABELFISH_VERSION_STR "2.11.0" +#define BABELFISH_INTERNAL_VERSION_STR "Babelfish 14.14.0.0" #define BABEL_COMPATIBILITY_VERSION "12.0.2000.8" #define BABEL_COMPATIBILITY_MAJOR_VERSION "12" diff --git a/test/JDBC/upgrade/14_13/schedule b/test/JDBC/upgrade/14_13/schedule new file mode 100644 index 0000000000..e9d6aa23e7 --- /dev/null +++ b/test/JDBC/upgrade/14_13/schedule @@ -0,0 +1,438 @@ +# Schedule File for JDBC Test Framework for local run +# 1. Lines starting with '#' will be treated as comments +# 2. To run a postgres command: cmd#!#postgresql#!# +# 3. To run a T-SQL command: cmd#!#sqlserver#!# +# 4. Keyword "all" is equivalent to running all test files in +# input folder +# 5. To add a test, add test name (without extension, -vu-prepare, -vu-verify and -vu-cleanup. For example if test file name is TestBigInt-vu-prepare.txt write TestBigInt) on a new line + +# This should be the first test to check there are no duplicated object_ids +BABEL-3613 + +babelfish_cast_floor +check_for_inconsistent_metadata +babel_try_parse +TestBigInt +TestBinary +TestBIT +TestChar +TestDatetime2 +TestDatetime +TestDate +TestDecimal +TestFloat +TestImage +TestInt +TestMoney +TestNumeric +TestReal +TestSmallDatetime +TestSmallInt +TestSmallMoney +TestSQLVariant +TestText +TestTime +TestTinyInt +TestUDD +TestUniqueIdentifier +TestVarChar +TestXML +sys-assembly_types +sys-database_mirroring +sys-databases +sys-numbered_procedures +BABEL-3121 +sys-events +sys-suser_sid +sys-trigger_events +BABEL-2688 +BABEL-328 +BABEL-3166 +BABEL-3192 +BABEL-3221 +BABEL-3204 +BABEL-3234 +BABEL-3402 +cast_numeric_types_to_datetime +cast_numeric_types_to_smalldatetime +routines_definition +column_domain_usage +constraint_column_usage +sp_describe_first_result_set +sys-host_name +SYSTEM_USER +indexproperty +sys-all_parameters +msdb-dbo-syspolicy_configuration +sys-all_views +datepart +sys-server_principals +fulltextserviceproperty +is_srvrolemember +msdb-dbo-fn_syspolicy_is_automation_enabled +objectproperty +objectpropertyex +sys-column-property +sys-configurations +sys-datefirst +sys-lock_timeout +sys-max_connections +sys-original_login +sys-schema-name +sys-objects +sys-procedures +sys-sysdatabases +sys-sysobjects +sys-trigger_nestlevel +schema_resolution_proc +BABEL-404 +BABEL-493 +BABEL-621 +BABEL-775 +BABEL-1206 +BABEL-1251 +BABEL-1319 +BABEL-1444 +BABEL-1465 +BABEL-1466 +BABEL-1654 +BABEL-1715 +BABEL-2086 +BABEL-3314 +BABEL-TABLEOPTIONS +BABEL-2765 +BABEL-2819 +BABEL-2917 +BABEL-2955 +BABEL-3358 +BABEL-3747 +BABEL-3781 +temp-tables +table-variable +TestNotNull +Test-Identity +Test-Computed-Columns +BABEL-1189 +BABEL-1062 +BABEL-1243 +BABEL-1493 +BABEL-1963 +BABEL-2203 +BABEL-2208 +BABEL-2257 +BABEL-2449 +BABEL-2535 +BABEL-2787-2 +BABEL-2787 +BABEL-2805 +BABEL-2812 +BABEL-2845 +BABEL-2884 +BABEL-2944 +BABEL-3116 +BABEL-3117 +BABEL-3118 +BABEL-3249 +BABEL-3486 +BABEL-3474 +BABEL-3614 +BABEL-3646 +BABEL-3748 +BABEL-383 +BABEL-405 +BABEL-937 +forjson +forjson-subquery +forjson-datatypes +forjson-nesting +forxml +forxml-subquery +BABEL-PROCID +babel_trigger +insteadoftriggers_with_transaction +insteadof_nested_trigger_inside_proc +insteadof_nested_trigger_with_dml +nested_trigger_inside_proc +nested_trigger_with_dml +triggers_with_transaction +Test-sp_addrole +Test-sp_addrolemember +Test-sp_droprole +Test-sp_droprolemember +Test-sp_helpdbfixedrole +Test-sp_helpsrvrolemember +Test-sp_helpuser +Test-sp_set_session_context +Test-sp_set_session_context-dep +TestTableType +BABEL-CROSS-DB +BABEL-LOGIN +BABEL-USER +BABEL-ROLE +babelfish_sysdatabases +babelfish_namespace_ext +babelfish_authid_login_ext +babelfish_authid_user_ext +babelfish_inconsistent_metadata +babelfish_migration_mode +schema_resolution_func +BABEL-3147 +collation_tests_arabic +collation_tests_greek +collation_tests_mongolian +collation_tests_polish +collation_tests +babel_datetime +babel_char +BABEL-SQUARE +BABEL-728 +babel_function_string +BABEL-1566 +BABEL-3360 +BABEL-3380 +babel_isnumeric +HAS_DBACCESS +BABEL-1475 +BABEL-1510 +BABEL-3213 +BABEL-3010 +BABEL-3369 +BABEL-3370 +BABEL-RAND +BABEL-741 +BABEL-ROLE-MEMBER +tdscollation +BABEL-EXTENDEDPROPERTY +BABEL-EXECUTE_AS_CALLER +sys-filegroups +sys-filetables +sys-fulltext_indexes +sys-hash_indexes +sys-plan_guides +sp_tablecollations +sys-assemblies +BABEL-LOGIN-USER-EXT +bitwise_not-operator +BABEL-1683 +BABEL-1953 +schema_resolution_trigger +select-strip-parens +sys_all_objects-dep +sys-columns-dep +sys-databases-dep +sys-foreign_key_columns-dep +sys-foreign_keys-dep +sys-identity_columns-dep +sys-indexes-dep +sys-key_constraints-dep +sys-schemas-dep +sys-sp_tables_view-dep +sys-sysforeignkeys-dep +sys-tables-dep +sys-types-dep +sys-views-dep +sys-check_constraints-dep +sys-computed_columns-dep +sys-default_constraints-dep +sys-index_columns-dep +sys-sp_databases-dep +sys-syscolumns-dep +sys-dm_exec_connections-dep +sys-dm_exec_sessions-dep +sys-table_types-dep +sys-all_sql_modules-dep +sys-sql_modules-dep +sys-system_sql_modules-dep +sys-triggers-dep +sys-proc_param_helper-dep +babelfish_function_ext +sys-sp_pkeys +sys-sp_statistics +BABEL-APPLOCK +BABEL-1438 +BABEL-SP_DATATYPE_INFO +BABEL-SPCOLUMNS +BABEL-SP_TABLES +BABEL-SP_SPECIAL_COLUMNS +BABEL-SP_TABLE_PRIVILIGES +BABEL-SP_FKEYS +BABEL-SP_STORED_PROCEDURES +BABEL-SP_SPROC_COLUMNS +BABEL-3000 +sys-sp_pkeys-dep +sys-sp_statistics-dep +BABEL-SPCOLUMNS-dep +BABEL-SP_COLUMNS_MANAGED-dep +BABEL-SP_SPECIAL_COLUMNS-dep +BABEL-SP_SPECIAL_COLUMNS_100-dep +BABEL-SP_FKEYS-dep +BABEL-SP_STORED_PROCEDURES-dep +BABEL-SP_SPROC_COLUMNS-dep +BABEL-SP_SPROC_COLUMNS_100-dep +BABEL-3000-dep +Test-sp_helprole-dep +Test-sp_helprolemember-dep +format +format-dep +msdb-dbo-syspolicy_system_health_state +dateadd_internal_df +sys-all_columns +sys-all_columns-dep +sys-all_sql_modules +sys-assembly_modules +sys-change_tracking_databases +sys-change_tracking_tables +sys-check_constraints +sys-columns +sys-computed_columns +sys-data_spaces +sys-database_files +sys-database_filestream_options +sys-database_recovery_status +sys-default_constraints +sys-dm_exec_connections +sys-dm_exec_sessions +sys-dm_hadr_cluster +sys-dm_hadr_database_replica_states +sys-dm_os_host_info +sys-endpoints +sys-extended_properties +sys-filetable_system_defined_objects +sys-foreign_key_columns +sys-foreign_keys +sys-fulltext_catalogs +sys-fulltext_index_columns +sys-fulltext_languages +sys-fulltext_stoplists +sys-identity_columns +sys-index_columns +sys-indexes +sys-key_constraints +sys-master_files +sys-nestlevel-dep +sys-partitions +sys-partitions-dep +sys-registered_search_property_lists +sys-schemas +sys-selective_xml_index_paths +sys-sid_binary +sys-sp_databases +sys-sp_tables_view +sys-spatial_index_tessellations +sys-spatial_indexes +sys-stats +sys-synonyms +sys-syscharsets +sys-syscolumns +sys-sysforeignkeys +sys-syslanguages +sys-system_sql_modules +sys-sql_modules +sys-table_types +sys-tables +sys-triggers +sys-types +sys-views +sys-xml_indexes +sys-xml_schema_collections +sys_all_objects +sys_babelfish_configurations_view +BABEL-1249 +BABEL-1291 +BABEL-1994-CHAR +BABEL-1994-VARCHAR +BABEL-889 +babel_417 +babel_datatype_sqlvariant +babel_sqlvariant_cast_compare +BABEL-3347 +BABEL-3144 +sys-all_parameters-dep +BABEL-3556 +BABEL-3588 +BABEL-3268 +BABEL-3513 +BABEL_GRANT_CONNECT +BABEL-sp_helpdb +BABEL-2795 +babelfish_integrity_checker +get_tds_id +BABEL-PG-SYSTEM-FUNCTIONS +BABEL-3655 +BABEL-3702 +openjson +sys-table_types_internal +sys-table_types_internal-dep +BABEL-CHECK-CONSTRAINT +BABEL-3640 +sys-sysindexes +sys-system_objects +ISC-Views +ISC-Tables +ISC-Columns +#ISC-Check-Constraints +ISC-Table_Constraints +sys_server_principals_dep +sys_database_principals_dep +datediff_big +atn2 +app_name +str +ISC-sequences +jira-BABEL-3504-upgrade +case_insensitive_collation +sys-has_perms_by_name +sys-has_perms_by_name-dep +BABEL_OBJECT_ID +BABEL_SCHEMATA +isc-schemata-dep +AVG-Aggregate-common +AVG-Aggregate-Dep +bbf_view_def +Test-sp_babelfish_volatility +BABEL-3802 +BABEL-3914 +BABEL_OBJECT_NAME +sys-systypes +BABEL_OBJECT_DEFINITION +datediff_internal_date +Test-sp_rename +Test-sp_rename-dep +BABEL-3657 +BABEL-733 +BABEL-3938 +BABEL-NEXT-VALUE-FOR +BABEL-4098 +TestVariableDataLength +binary-index +BABEL-4078 +BABEL-3215 +orderby +babel_int4_varbinary_div +babel_varbinary_int4_div +sys-sql_expression_dependencies +smalldatetimefromparts-dep +BABEL_4330 +Test_ISNULL +BABEL-4410 +#AUTO_ANALYZE #uncomment this test when preparing for new minor version +BABEL-4231 +sys_asymmetric_keys +sys_certificates +sys_database_permissions +BABEL-4606 +BABEL-4672 +babel-4475 +sys_availability_groups +sys_availability_replicas +babel-4517 +BABEL-4641 +BABEL-4707 +BABEL_4817 +BABEL-4863 +BABEL-4869 +babel_4328_datetime +babel_4328_datetime2 +babel_4328_datetimeoffset +BABEL-3401 +babel_726