From 5faa5a5fcb5879aaff7e8f60aad60f0487e837be Mon Sep 17 00:00:00 2001 From: Frank Langelage Date: Sat, 25 Sep 2021 12:46:56 +0200 Subject: [PATCH] IBM Informix support (update VII). --- database/pom.xml | 16 +++-- .../jackson-datatype-jsr310/2.12.1/module.xml | 9 +++ .../impl/db/sql/DbSqlSessionFactory.java | 35 +++++++++- .../activiti.informix.create.engine.sql | 70 +++++++++++++++++-- .../activiti.informix.create.history.sql | 31 ++++++-- .../db/drop/activiti.informix.drop.engine.sql | 2 + .../upgrade/informix_engine_7.10_to_7.11.sql | 33 +++++++++ .../upgrade/informix_engine_7.11_to_7.12.sql | 34 +++++++++ .../upgrade/informix_engine_7.12_to_7.13.sql | 51 ++++++++++++++ .../upgrade/informix_engine_7.13_to_7.14.sql | 27 +++++++ .../upgrade/informix_engine_7.14_to_7.15.sql | 37 ++++++++++ .../upgrade/informix_engine_7.15_to_7.16.sql | 30 ++++++++ .../impl/mapping/entity/Authorization.xml | 9 +++ .../bpm/engine/impl/mapping/entity/Filter.xml | 2 +- .../impl/mapping/entity/TaskMetrics.xml | 9 +++ .../concurrency/JdbcStatementTimeoutTest.java | 3 +- .../SuppressSqlExceptionsTest.java | 4 +- qa/wildfly-runtime/pom.xml | 4 +- 18 files changed, 384 insertions(+), 22 deletions(-) create mode 100644 distro/wildfly/modules/src/main/modules/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.12.1/module.xml create mode 100644 engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.10_to_7.11.sql create mode 100644 engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.11_to_7.12.sql create mode 100644 engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.12_to_7.13.sql create mode 100644 engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.13_to_7.14.sql create mode 100644 engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.14_to_7.15.sql create mode 100644 engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.15_to_7.16.sql diff --git a/database/pom.xml b/database/pom.xml index 03decb77e1f..9c4a5de2190 100644 --- a/database/pom.xml +++ b/database/pom.xml @@ -32,7 +32,8 @@ ${version.db2-10.5} 42.3.3 4.8.0 - 4.10 + 4.4.0 + 4.50.3 @@ -93,6 +94,7 @@ ${version.postgresql} +<<<<<<< 3ed6b1a4936388ebbb9c9debd1f7c4e0c9251495 com.ibm.db2 jcc ${version.db2} @@ -105,6 +107,10 @@ com.ibm.informix.jdbc ifxjdbc +======= + com.ibm.informix + jdbc +>>>>>>> IBM Informix support (update VII). ${version.informix} @@ -653,8 +659,8 @@ - com.ibm.informix.jdbc - ifxjdbc + com.ibm.informix + jdbc test @@ -666,8 +672,8 @@ sql-maven-plugin - com.ibm.informix.jdbc - ifxjdbc + com.ibm.informix + jdbc ${version.informix} diff --git a/distro/wildfly/modules/src/main/modules/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.12.1/module.xml b/distro/wildfly/modules/src/main/modules/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.12.1/module.xml new file mode 100644 index 00000000000..dde1d28a100 --- /dev/null +++ b/distro/wildfly/modules/src/main/modules/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.12.1/module.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/engine/src/main/java/org/camunda/bpm/engine/impl/db/sql/DbSqlSessionFactory.java b/engine/src/main/java/org/camunda/bpm/engine/impl/db/sql/DbSqlSessionFactory.java index 7c293e3d8e5..c6c1ab8cb84 100644 --- a/engine/src/main/java/org/camunda/bpm/engine/impl/db/sql/DbSqlSessionFactory.java +++ b/engine/src/main/java/org/camunda/bpm/engine/impl/db/sql/DbSqlSessionFactory.java @@ -44,7 +44,7 @@ public class DbSqlSessionFactory implements SessionFactory { public static final String MARIADB = "mariadb"; public static final String CRDB = "cockroachdb"; public static final String INFORMIX = "informix"; - public static final String[] SUPPORTED_DATABASES = {MSSQL, DB2, ORACLE, H2, MYSQL, POSTGRES, MARIADB, INFORMIX}; + public static final String[] SUPPORTED_DATABASES = {MSSQL, DB2, ORACLE, H2, MYSQL, POSTGRES, MARIADB, CRDB, INFORMIX}; protected static final Map> databaseSpecificStatements = new HashMap<>(); @@ -724,11 +724,17 @@ public class DbSqlSessionFactory implements SessionFactory { optimizeDatabaseSpecificLimitAfterWithoutOffsetStatements.put(INFORMIX, ""); databaseSpecificLimitBetweenStatements.put(INFORMIX, ""); databaseSpecificLimitBetweenFilterStatements.put(INFORMIX, ""); + databaseSpecificLimitBetweenAcquisitionStatements.put(INFORMIX, ""); databaseSpecificLimitBeforeWithoutOffsetStatements.put(INFORMIX, "FIRST ${maxResults}"); databaseSpecificLimitAfterWithoutOffsetStatements.put(INFORMIX, ""); databaseSpecificOrderByStatements.put(INFORMIX, defaultOrderBy); databaseSpecificLimitBeforeNativeQueryStatements.put(INFORMIX, ""); databaseSpecificDistinct.put(INFORMIX, "distinct"); + databaseSpecificNumericCast.put(INFORMIX, ""); + + databaseSpecificCountDistinctBeforeStart.put(INFORMIX, defaultDistinctCountBeforeStart); + databaseSpecificCountDistinctBeforeEnd.put(INFORMIX, defaultDistinctCountBeforeEnd); + databaseSpecificCountDistinctAfterEnd.put(INFORMIX, defaultDistinctCountAfterEnd); databaseSpecificEscapeChar.put(INFORMIX, defaultEscapeChar); @@ -745,7 +751,31 @@ public class DbSqlSessionFactory implements SessionFactory { databaseSpecificDaysComparator.put(INFORMIX, "DATE(${date}) + ${days} <= #{currentTimestamp}"); + databaseSpecificCollationForCaseSensitivity.put(INFORMIX, ""); + + addDatabaseSpecificStatement(INFORMIX, "insertByteArray", "insertByteArray_postgres"); + addDatabaseSpecificStatement(INFORMIX, "updateByteArray", "updateByteArray_postgres"); + addDatabaseSpecificStatement(INFORMIX, "selectByteArray", "selectByteArray_postgres"); + addDatabaseSpecificStatement(INFORMIX, "selectByteArrays", "selectByteArrays_postgres"); + addDatabaseSpecificStatement(INFORMIX, "selectResourceByDeploymentIdAndResourceName", "selectResourceByDeploymentIdAndResourceName_postgres"); + addDatabaseSpecificStatement(INFORMIX, "selectResourceByDeploymentIdAndResourceNames", "selectResourceByDeploymentIdAndResourceNames_postgres"); + addDatabaseSpecificStatement(INFORMIX, "selectResourceByDeploymentIdAndResourceId", "selectResourceByDeploymentIdAndResourceId_postgres"); + addDatabaseSpecificStatement(INFORMIX, "selectResourceByDeploymentIdAndResourceIds", "selectResourceByDeploymentIdAndResourceIds_postgres"); + addDatabaseSpecificStatement(INFORMIX, "selectResourcesByDeploymentId", "selectResourcesByDeploymentId_postgres"); + addDatabaseSpecificStatement(INFORMIX, "selectResourceById", "selectResourceById_postgres"); + addDatabaseSpecificStatement(INFORMIX, "selectLatestResourcesByDeploymentName", "selectLatestResourcesByDeploymentName_postgres"); + addDatabaseSpecificStatement(INFORMIX, "insertIdentityInfo", "insertIdentityInfo_postgres"); + addDatabaseSpecificStatement(INFORMIX, "updateIdentityInfo", "updateIdentityInfo_postgres"); + addDatabaseSpecificStatement(INFORMIX, "selectIdentityInfoById", "selectIdentityInfoById_postgres"); + addDatabaseSpecificStatement(INFORMIX, "selectIdentityInfoByUserIdAndKey", "selectIdentityInfoByUserIdAndKey_postgres"); + addDatabaseSpecificStatement(INFORMIX, "selectIdentityInfoByUserId", "selectIdentityInfoByUserId_postgres"); + addDatabaseSpecificStatement(INFORMIX, "selectIdentityInfoDetails", "selectIdentityInfoDetails_postgres"); + addDatabaseSpecificStatement(INFORMIX, "insertComment", "insertComment_postgres"); + addDatabaseSpecificStatement(INFORMIX, "selectCommentsByTaskId", "selectCommentsByTaskId_postgres"); + addDatabaseSpecificStatement(INFORMIX, "selectCommentsByProcessInstanceId", "selectCommentsByProcessInstanceId_postgres"); + addDatabaseSpecificStatement(INFORMIX, "selectCommentByTaskIdAndCommentId", "selectCommentByTaskIdAndCommentId_postgres"); addDatabaseSpecificStatement(INFORMIX, "selectFilterByQueryCriteria", "selectFilterByQueryCriteria_oracleDb2"); + addDatabaseSpecificStatement(INFORMIX, "selectFilter", "selectFilter_postgres"); addDatabaseSpecificStatement(INFORMIX, "deleteAttachmentsByRemovalTime", "deleteAttachmentsByRemovalTime_informix"); addDatabaseSpecificStatement(INFORMIX, "deleteCommentsByRemovalTime", "deleteCommentsByRemovalTime_informix"); @@ -764,6 +794,8 @@ public class DbSqlSessionFactory implements SessionFactory { addDatabaseSpecificStatement(INFORMIX, "deleteUserOperationLogByRemovalTime", "deleteUserOperationLogByRemovalTime_informix"); addDatabaseSpecificStatement(INFORMIX, "deleteByteArraysByRemovalTime", "deleteByteArraysByRemovalTime_informix"); addDatabaseSpecificStatement(INFORMIX, "deleteHistoricBatchesByRemovalTime", "deleteHistoricBatchesByRemovalTime_informix"); + addDatabaseSpecificStatement(INFORMIX, "deleteAuthorizationsByRemovalTime", "deleteAuthorizationsByRemovalTime_informix"); + addDatabaseSpecificStatement(INFORMIX, "deleteTaskMetricsByRemovalTime", "deleteTaskMetricsByRemovalTime_informix"); constants = new HashMap(); constants.put("constant.event", "'event'"); @@ -774,6 +806,7 @@ public class DbSqlSessionFactory implements SessionFactory { constants.put("constant.datepart.minute", "MINUTE"); constants.put("constant.null.startTime", "CAST(NULL AS DATETIME) AS START_TIME_"); constants.put("constant.varchar.cast", "'${key}'"); + constants.put("constant.integer.cast", "cast(NULL as integer)"); constants.put("constant.null.reporter", "CAST(NULL AS VARCHAR(255)) AS REPORTER_"); dbSpecificConstants.put(INFORMIX, constants); } diff --git a/engine/src/main/resources/org/camunda/bpm/engine/db/create/activiti.informix.create.engine.sql b/engine/src/main/resources/org/camunda/bpm/engine/db/create/activiti.informix.create.engine.sql index 9fce7b041ae..fa30c64ef63 100644 --- a/engine/src/main/resources/org/camunda/bpm/engine/db/create/activiti.informix.create.engine.sql +++ b/engine/src/main/resources/org/camunda/bpm/engine/db/create/activiti.informix.create.engine.sql @@ -1,8 +1,9 @@ -- --- Copyright © 2012 - 2018 camunda services GmbH and various authors (info@camunda.com) --- --- Licensed under the Apache License, Version 2.0 (the "License"); --- you may not use this file except in compliance with the License. +-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH +-- under one or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information regarding copyright +-- ownership. Camunda licenses this file to you under the Apache License, +-- Version 2.0; you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 @@ -39,6 +40,15 @@ values ('history.cleanup.job.lock', '0', 1); insert into ACT_GE_PROPERTY values ('startup.lock', '0', 1); +insert into ACT_GE_PROPERTY +values ('historyLevel', '3', 1); + +insert into ACT_GE_PROPERTY +values ('telemetry.lock', '0', 1); + +insert into ACT_GE_PROPERTY +values ('installationId.lock', '0', 1); + create table ACT_GE_BYTEARRAY ( ID_ varchar(64) not null, REV_ integer, @@ -54,6 +64,16 @@ create table ACT_GE_BYTEARRAY ( primary key (ID_) ); +create table ACT_GE_SCHEMA_LOG ( + ID_ varchar(64) not null, + TIMESTAMP_ datetime year to fraction(5), + VERSION_ varchar(255), + primary key (ID_) +); + +insert into ACT_GE_SCHEMA_LOG +values ('0', CURRENT, '7.15.0'); + create table ACT_RE_DEPLOYMENT ( ID_ varchar(64) not null, NAME_ varchar(255), @@ -101,8 +121,10 @@ create table ACT_RU_JOB ( RETRIES_ integer, EXCEPTION_STACK_ID_ varchar(64), EXCEPTION_MSG_ lvarchar(4000), + FAILED_ACT_ID_ varchar(255), DUEDATE_ datetime year to fraction(5), REPEAT_ varchar(255), + REPEAT_OFFSET_ bigint default 0, HANDLER_TYPE_ varchar(255), HANDLER_CFG_ lvarchar(4000), DEPLOYMENT_ID_ varchar(64), @@ -126,6 +148,7 @@ create table ACT_RU_JOBDEF ( SUSPENSION_STATE_ integer, JOB_PRIORITY_ bigint, TENANT_ID_ varchar(64), + DEPLOYMENT_ID_ varchar(64), primary key (ID_) ); @@ -148,6 +171,17 @@ create table ACT_RE_PROCDEF ( primary key (ID_) ); +create table ACT_RE_CAMFORMDEF ( + ID_ varchar(64) not null, + REV_ integer, + KEY_ varchar(255) not null, + VERSION_ integer not null, + DEPLOYMENT_ID_ varchar(64), + RESOURCE_NAME_ lvarchar(4000), + TENANT_ID_ varchar(64), + primary key (ID_) +); + create table ACT_RU_TASK ( ID_ varchar(64) not null, REV_ integer, @@ -192,9 +226,11 @@ create table ACT_RU_VARIABLE ( NAME_ varchar(255) not null, EXECUTION_ID_ varchar(64), PROC_INST_ID_ varchar(64), + PROC_DEF_ID_ varchar(64), CASE_EXECUTION_ID_ varchar(64), CASE_INST_ID_ varchar(64), TASK_ID_ varchar(64), + BATCH_ID_ varchar(64), BYTEARRAY_ID_ varchar(64), DOUBLE_ double precision, LONG_ bigint, @@ -229,6 +265,7 @@ create table ACT_RU_INCIDENT ( INCIDENT_TYPE_ varchar(255) not null, EXECUTION_ID_ varchar(64), ACTIVITY_ID_ varchar(255), + FAILED_ACTIVITY_ID_ varchar(255), PROC_INST_ID_ varchar(64), PROC_DEF_ID_ varchar(64), CAUSE_INCIDENT_ID_ varchar(64), @@ -236,6 +273,7 @@ create table ACT_RU_INCIDENT ( CONFIGURATION_ varchar(255), TENANT_ID_ varchar(64), JOB_DEF_ID_ varchar(64), + ANNOTATION_ lvarchar(4000), primary key (ID_) ); @@ -248,6 +286,8 @@ create table ACT_RU_AUTHORIZATION ( RESOURCE_TYPE_ integer not null, RESOURCE_ID_ varchar(255), PERMS_ integer, + REMOVAL_TIME_ datetime year to fraction(5), + ROOT_PROC_INST_ID_ varchar(64), primary key (ID_) ); @@ -272,6 +312,13 @@ create table ACT_RU_METER_LOG ( primary key (ID_) ); +create table ACT_RU_TASK_METER_LOG ( + ID_ varchar(64) not null, + ASSIGNEE_HASH_ bigint, + TIMESTAMP_ datetime year to fraction(5), + primary key (ID_) +); + create table ACT_RU_EXT_TASK ( ID_ varchar(64) not null, REV_ integer not null, @@ -316,13 +363,17 @@ create index ACT_IDX_EXEC_BUSKEY on ACT_RU_EXECUTION(BUSINESS_KEY_); create index ACT_IDX_EXEC_TENANT_ID on ACT_RU_EXECUTION(TENANT_ID_); create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_); create index ACT_IDX_TASK_ASSIGNEE on ACT_RU_TASK(ASSIGNEE_); +create index ACT_IDX_TASK_OWNER on ACT_RU_TASK(OWNER_); create index ACT_IDX_TASK_TENANT_ID on ACT_RU_TASK(TENANT_ID_); create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_); create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_); create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_); create index ACT_IDX_EVENT_SUBSCR_TENANT_ID on ACT_RU_EVENT_SUBSCR(TENANT_ID_); + create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_); create index ACT_IDX_VARIABLE_TENANT_ID on ACT_RU_VARIABLE(TENANT_ID_); +-- create index ACT_IDX_VARIABLE_TASK_NAME_TYPE on ACT_RU_VARIABLE(TASK_ID_, NAME_, TYPE_); + create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_); create index ACT_IDX_INC_CONFIGURATION on ACT_RU_INCIDENT(CONFIGURATION_); create index ACT_IDX_INC_TENANT_ID on ACT_RU_INCIDENT(TENANT_ID_); @@ -487,6 +538,13 @@ alter table ACT_RU_BATCH references ACT_RU_JOBDEF (ID_) constraint ACT_FK_BATCH_JOB_DEF; +create index ACT_IDX_BATCH_ID ON ACT_RU_VARIABLE(BATCH_ID_); + +alter table ACT_RU_VARIABLE + add constraint foreign key (BATCH_ID_) + references ACT_RU_BATCH (ID_) + constraint ACT_FK_VAR_BATCH; + -- indexes for concurrency problems - https://app.camunda.com/jira/browse/CAM-1646 -- -- create index ACT_IDX_EXECUTION_PROC on ACT_RU_EXECUTION(PROC_DEF_ID_); -- create index ACT_IDX_EXECUTION_PARENT on ACT_RU_EXECUTION(PARENT_ID_); @@ -526,4 +584,8 @@ create index ACT_IDX_PROCDEF_DEPLOYMENT_ID on ACT_RE_PROCDEF(DEPLOYMENT_ID_); create index ACT_IDX_PROCDEF_TENANT_ID on ACT_RE_PROCDEF(TENANT_ID_); create index ACT_IDX_PROCDEF_VER_TAG on ACT_RE_PROCDEF(VERSION_TAG_); +-- indices for history cleanup: https://jira.camunda.com/browse/CAM-11616 +create index ACT_IDX_AUTH_ROOT_PI on ACT_RU_AUTHORIZATION(ROOT_PROC_INST_ID_); +create index ACT_IDX_AUTH_RM_TIME on ACT_RU_AUTHORIZATION(REMOVAL_TIME_); + create function MINUTE ( param1 datetime year to fraction ) returning integer; define rv integer; select to_char(param1, "%M" )::int into rv from sysmaster:sysdual; return rv; end function; diff --git a/engine/src/main/resources/org/camunda/bpm/engine/db/create/activiti.informix.create.history.sql b/engine/src/main/resources/org/camunda/bpm/engine/db/create/activiti.informix.create.history.sql index 5c46616eb13..7cb54506e0d 100644 --- a/engine/src/main/resources/org/camunda/bpm/engine/db/create/activiti.informix.create.history.sql +++ b/engine/src/main/resources/org/camunda/bpm/engine/db/create/activiti.informix.create.history.sql @@ -1,8 +1,9 @@ -- --- Copyright © 2012 - 2018 camunda services GmbH and various authors (info@camunda.com) --- --- Licensed under the Apache License, Version 2.0 (the "License"); --- you may not use this file except in compliance with the License. +-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH +-- under one or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information regarding copyright +-- ownership. Camunda licenses this file to you under the Apache License, +-- Version 2.0; you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 @@ -53,7 +54,7 @@ create table ACT_HI_ACTINST ( CALL_CASE_INST_ID_ varchar(64), ACT_NAME_ varchar(255), ACT_TYPE_ varchar(255) not null, - ASSIGNEE_ varchar(64), + ASSIGNEE_ varchar(255), START_TIME_ datetime year to fraction(5) not null, END_TIME_ datetime year to fraction(5), DURATION_ bigint, @@ -150,6 +151,7 @@ create table ACT_HI_DETAIL ( TENANT_ID_ varchar(64), OPERATION_ID_ varchar(64), REMOVAL_TIME_ datetime year to fraction(5), + INITIAL_ boolean, primary key (ID_) ); @@ -229,6 +231,9 @@ create table ACT_HI_OP_LOG ( NEW_VALUE_ lvarchar(4000), TENANT_ID_ varchar(64), REMOVAL_TIME_ datetime year to fraction(5), + CATEGORY_ varchar(64), + EXTERNAL_TASK_ID_ varchar(64), + ANNOTATION_ lvarchar(4000), primary key (ID_) ); @@ -244,13 +249,16 @@ create table ACT_HI_INCIDENT ( INCIDENT_MSG_ lvarchar(4000), INCIDENT_TYPE_ varchar(255) not null, ACTIVITY_ID_ varchar(255), + FAILED_ACTIVITY_ID_ varchar(255), CAUSE_INCIDENT_ID_ varchar(64), ROOT_CAUSE_INCIDENT_ID_ varchar(64), CONFIGURATION_ varchar(255), + HISTORY_CONFIGURATION_ varchar(255), INCIDENT_STATE_ integer, TENANT_ID_ varchar(64), JOB_DEF_ID_ varchar(64), REMOVAL_TIME_ datetime year to fraction(5), + ANNOTATION_ lvarchar(4000), primary key (ID_) ); @@ -268,6 +276,7 @@ create table ACT_HI_JOB_LOG ( JOB_DEF_TYPE_ varchar(255), JOB_DEF_CONFIGURATION_ varchar(255), ACT_ID_ varchar(255), + FAILED_ACT_ID_ varchar(255), EXECUTION_ID_ varchar(64), ROOT_PROC_INST_ID_ varchar(64), PROCESS_INSTANCE_ID_ varchar(64), @@ -276,6 +285,7 @@ create table ACT_HI_JOB_LOG ( DEPLOYMENT_ID_ varchar(64), SEQUENCE_COUNTER_ bigint, TENANT_ID_ varchar(64), + HOSTNAME_ varchar(255), REMOVAL_TIME_ datetime year to fraction(5), primary key (ID_) ); @@ -330,7 +340,7 @@ create index ACT_IDX_HI_PRO_INST_ROOT_PI on ACT_HI_PROCINST(ROOT_PROC_INST_ID_); create index ACT_IDX_HI_PRO_INST_RM_TIME on ACT_HI_PROCINST(REMOVAL_TIME_); create index ACT_IDX_HI_ACTINST_ROOT_PI on ACT_HI_ACTINST(ROOT_PROC_INST_ID_); -create index ACT_IDX_HI_ACT_INST_START on ACT_HI_ACTINST(START_TIME_); +create index ACT_IDX_HI_ACT_INST_START_END on ACT_HI_ACTINST(START_TIME_, END_TIME_); create index ACT_IDX_HI_ACT_INST_END on ACT_HI_ACTINST(END_TIME_); create index ACT_IDX_HI_ACT_INST_PROCINST on ACT_HI_ACTINST(PROC_INST_ID_, ACT_ID_); create index ACT_IDX_HI_ACT_INST_COMP on ACT_HI_ACTINST(EXECUTION_ID_, ACT_ID_, END_TIME_); --, ID_); @@ -362,6 +372,7 @@ create index ACT_IDX_HI_DETAIL_PROC_DEF_KEY on ACT_HI_DETAIL(PROC_DEF_KEY_); create index ACT_IDX_HI_DETAIL_BYTEAR on ACT_HI_DETAIL(BYTEARRAY_ID_); create index ACT_IDX_HI_DETAIL_RM_TIME on ACT_HI_DETAIL(REMOVAL_TIME_); create index ACT_IDX_HI_DETAIL_TASK_BYTEAR on ACT_HI_DETAIL(BYTEARRAY_ID_, TASK_ID_); +create index ACT_IDX_HI_DETAIL_VAR_INST_ID on ACT_HI_DETAIL(VAR_INST_ID_); create index ACT_IDX_HI_IDENT_LNK_ROOT_PI on ACT_HI_IDENTITYLINK(ROOT_PROC_INST_ID_); create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_); @@ -370,6 +381,7 @@ create index ACT_IDX_HI_IDENT_LNK_TENANT_ID on ACT_HI_IDENTITYLINK(TENANT_ID_); create index ACT_IDX_HI_IDENT_LNK_PROC_DEF_KEY on ACT_HI_IDENTITYLINK(PROC_DEF_KEY_); create index ACT_IDX_HI_IDENT_LINK_TASK on ACT_HI_IDENTITYLINK(TASK_ID_); create index ACT_IDX_HI_IDENT_LINK_RM_TIME on ACT_HI_IDENTITYLINK(REMOVAL_TIME_); +create index ACT_IDX_HI_IDENT_LNK_TIMESTAMP on ACT_HI_IDENTITYLINK(TIMESTAMP_); create index ACT_IDX_HI_VARINST_ROOT_PI on ACT_HI_VARINST(ROOT_PROC_INST_ID_); create index ACT_IDX_HI_PROCVAR_PROC_INST on ACT_HI_VARINST(PROC_INST_ID_); @@ -379,12 +391,15 @@ create index ACT_IDX_HI_VAR_INST_TENANT_ID on ACT_HI_VARINST(TENANT_ID_); create index ACT_IDX_HI_VAR_INST_PROC_DEF_KEY on ACT_HI_VARINST(PROC_DEF_KEY_); create index ACT_IDX_HI_VARINST_BYTEAR on ACT_HI_VARINST(BYTEARRAY_ID_); create index ACT_IDX_HI_VARINST_RM_TIME on ACT_HI_VARINST(REMOVAL_TIME_); +create index ACT_IDX_HI_VAR_PI_NAME_TYPE on ACT_HI_VARINST(PROC_INST_ID_, NAME_); --, VAR_TYPE_); create index ACT_IDX_HI_INCIDENT_TENANT_ID on ACT_HI_INCIDENT(TENANT_ID_); create index ACT_IDX_HI_INCIDENT_PROC_DEF_KEY on ACT_HI_INCIDENT(PROC_DEF_KEY_); create index ACT_IDX_HI_INCIDENT_ROOT_PI on ACT_HI_INCIDENT(ROOT_PROC_INST_ID_); create index ACT_IDX_HI_INCIDENT_PROCINST on ACT_HI_INCIDENT(PROC_INST_ID_); create index ACT_IDX_HI_INCIDENT_RM_TIME on ACT_HI_INCIDENT(REMOVAL_TIME_); +create index ACT_IDX_HI_INCIDENT_CREATE_TIME on ACT_HI_INCIDENT(CREATE_TIME_); +create index ACT_IDX_HI_INCIDENT_END_TIME on ACT_HI_INCIDENT(END_TIME_); create index ACT_IDX_HI_JOB_LOG_ROOT_PI on ACT_HI_JOB_LOG(ROOT_PROC_INST_ID_); create index ACT_IDX_HI_JOB_LOG_PROCINST on ACT_HI_JOB_LOG(PROCESS_INSTANCE_ID_); @@ -394,6 +409,7 @@ create index ACT_IDX_HI_JOB_LOG_JOB_DEF_ID on ACT_HI_JOB_LOG(JOB_DEF_ID_); create index ACT_IDX_HI_JOB_LOG_PROC_DEF_KEY on ACT_HI_JOB_LOG(PROCESS_DEF_KEY_); create index ACT_IDX_HI_JOB_LOG_EX_STACK on ACT_HI_JOB_LOG(JOB_EXCEPTION_STACK_ID_); create index ACT_IDX_HI_JOB_LOG_RM_TIME on ACT_HI_JOB_LOG(REMOVAL_TIME_); +create index ACT_IDX_HI_JOB_LOG_JOB_CONF on ACT_HI_JOB_LOG(JOB_DEF_CONFIGURATION_); create index ACT_HI_BAT_RM_TIME on ACT_HI_BATCH(REMOVAL_TIME_); @@ -411,6 +427,9 @@ create index ACT_IDX_HI_OP_LOG_PROCDEF on ACT_HI_OP_LOG(PROC_DEF_ID_); create index ACT_IDX_HI_OP_LOG_TASK on ACT_HI_OP_LOG(TASK_ID_); create index ACT_IDX_HI_OP_LOG_RM_TIME on ACT_HI_OP_LOG(REMOVAL_TIME_); create index ACT_IDX_HI_OP_LOG_TIMESTAMP on ACT_HI_OP_LOG(TIMESTAMP_); +create index ACT_IDX_HI_OP_LOG_USER_ID on ACT_HI_OP_LOG(USER_ID_); +create index ACT_IDX_HI_OP_LOG_OP_TYPE on ACT_HI_OP_LOG(OPERATION_TYPE_); +create index ACT_IDX_HI_OP_LOG_ENTITY_TYPE on ACT_HI_OP_LOG(ENTITY_TYPE_); create index ACT_IDX_HI_ATTACHMENT_CONTENT on ACT_HI_ATTACHMENT(CONTENT_ID_); create index ACT_IDX_HI_COMMENT_ROOT_PI on ACT_HI_COMMENT(ROOT_PROC_INST_ID_); diff --git a/engine/src/main/resources/org/camunda/bpm/engine/db/drop/activiti.informix.drop.engine.sql b/engine/src/main/resources/org/camunda/bpm/engine/db/drop/activiti.informix.drop.engine.sql index e4705af2f85..814383b4cec 100644 --- a/engine/src/main/resources/org/camunda/bpm/engine/db/drop/activiti.informix.drop.engine.sql +++ b/engine/src/main/resources/org/camunda/bpm/engine/db/drop/activiti.informix.drop.engine.sql @@ -1,5 +1,6 @@ drop table ACT_GE_PROPERTY; drop table ACT_GE_BYTEARRAY; +drop table ACT_GE_SCHEMA_LOG; drop table ACT_RE_DEPLOYMENT; drop table ACT_RE_PROCDEF; drop table ACT_RU_IDENTITYLINK; @@ -13,6 +14,7 @@ drop table ACT_RU_INCIDENT; drop table ACT_RU_AUTHORIZATION; drop table ACT_RU_FILTER; drop table ACT_RU_METER_LOG; +drop table ACT_RU_TASK_METER_LOG; drop table ACT_RU_EXT_TASK; drop table ACT_RU_BATCH; diff --git a/engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.10_to_7.11.sql b/engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.10_to_7.11.sql new file mode 100644 index 00000000000..1a8f2d0e69b --- /dev/null +++ b/engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.10_to_7.11.sql @@ -0,0 +1,33 @@ +-- +-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH +-- under one or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information regarding copyright +-- ownership. Camunda licenses this file to you under the Apache License, +-- Version 2.0; you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- https://app.camunda.com/jira/browse/CAM-9920 +ALTER TABLE ACT_HI_OP_LOG + ADD CATEGORY_ varchar(64); + +ALTER TABLE ACT_HI_OP_LOG + ADD EXTERNAL_TASK_ID_ varchar(64); + +create table ACT_GE_SCHEMA_LOG ( + ID_ varchar(64) not null, + TIMESTAMP_ datetime year to fraction(5), + VERSION_ varchar(255), + primary key (ID_) +); + +insert into ACT_GE_SCHEMA_LOG +values ('0', CURRENT, '7.11.0'); \ No newline at end of file diff --git a/engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.11_to_7.12.sql b/engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.11_to_7.12.sql new file mode 100644 index 00000000000..8cb000133c9 --- /dev/null +++ b/engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.11_to_7.12.sql @@ -0,0 +1,34 @@ +-- +-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH +-- under one or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information regarding copyright +-- ownership. Camunda licenses this file to you under the Apache License, +-- Version 2.0; you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +insert into ACT_GE_SCHEMA_LOG +values ('100', CURRENT, '7.12.0'); + +-- https://app.camunda.com/jira/browse/CAM-10665 +ALTER TABLE ACT_HI_OP_LOG + ADD ANNOTATION_ lvarchar(4000); + +-- https://app.camunda.com/jira/browse/CAM-9855 +ALTER TABLE ACT_RU_JOB + ADD REPEAT_OFFSET_ bigint default 0; + +-- https://app.camunda.com/jira/browse/CAM-10672 +ALTER TABLE ACT_HI_INCIDENT + ADD HISTORY_CONFIGURATION_ varchar(255); + +-- https://app.camunda.com/jira/browse/CAM-10600 +create index ACT_IDX_HI_DETAIL_VAR_INST_ID on ACT_HI_DETAIL(VAR_INST_ID_); diff --git a/engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.12_to_7.13.sql b/engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.12_to_7.13.sql new file mode 100644 index 00000000000..9e24cab42cf --- /dev/null +++ b/engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.12_to_7.13.sql @@ -0,0 +1,51 @@ +-- +-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH +-- under one or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information regarding copyright +-- ownership. Camunda licenses this file to you under the Apache License, +-- Version 2.0; you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +insert into ACT_GE_SCHEMA_LOG +values ('200', CURRENT, '7.13.0'); + +-- https://jira.camunda.com/browse/CAM-10953 +create index ACT_IDX_HI_VAR_PI_NAME_TYPE on ACT_HI_VARINST(PROC_INST_ID_, NAME_); --, VAR_TYPE_); + + +-- https://app.camunda.com/jira/browse/CAM-10784 +ALTER TABLE ACT_HI_JOB_LOG + ADD HOSTNAME_ varchar(255) default null; + +-- https://jira.camunda.com/browse/CAM-10378 +ALTER TABLE ACT_RU_JOB + ADD FAILED_ACT_ID_ varchar(255); + +ALTER TABLE ACT_HI_JOB_LOG + ADD FAILED_ACT_ID_ varchar(255); + +ALTER TABLE ACT_RU_INCIDENT + ADD FAILED_ACTIVITY_ID_ varchar(255); + +ALTER TABLE ACT_HI_INCIDENT + ADD FAILED_ACTIVITY_ID_ varchar(255); + +-- https://jira.camunda.com/browse/CAM-11616 +ALTER TABLE ACT_RU_AUTHORIZATION + ADD REMOVAL_TIME_ datetime year to fraction(5), +create index ACT_IDX_AUTH_RM_TIME on ACT_RU_AUTHORIZATION(REMOVAL_TIME_); + +-- https://jira.camunda.com/browse/CAM-11616 +ALTER TABLE ACT_RU_AUTHORIZATION + ADD ROOT_PROC_INST_ID_ varchar(64); +create index ACT_IDX_AUTH_ROOT_PI on ACT_RU_AUTHORIZATION(ROOT_PROC_INST_ID_); + diff --git a/engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.13_to_7.14.sql b/engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.13_to_7.14.sql new file mode 100644 index 00000000000..deef33a7c93 --- /dev/null +++ b/engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.13_to_7.14.sql @@ -0,0 +1,27 @@ +-- +-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH +-- under one or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information regarding copyright +-- ownership. Camunda licenses this file to you under the Apache License, +-- Version 2.0; you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +insert into ACT_GE_SCHEMA_LOG +values ('300', CURRENT_TIMESTAMP, '7.14.0'); + +-- insert telemetry.lock in property table - https://jira.camunda.com/browse/CAM-12023 -- +insert into ACT_GE_PROPERTY +values ('telemetry.lock', '0', 1); + +-- insert telemetry.lock in property table - https://jira.camunda.com/browse/CAM-12031 -- +insert into ACT_GE_PROPERTY +values ('installationId.lock', '0', 1); diff --git a/engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.14_to_7.15.sql b/engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.14_to_7.15.sql new file mode 100644 index 00000000000..a08615dc589 --- /dev/null +++ b/engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.14_to_7.15.sql @@ -0,0 +1,37 @@ +-- +-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH +-- under one or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information regarding copyright +-- ownership. Camunda licenses this file to you under the Apache License, +-- Version 2.0; you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +insert into ACT_GE_SCHEMA_LOG +values ('400', CURRENT_TIMESTAMP, '7.15.0'); + +-- https://jira.camunda.com/browse/CAM-13013 + +create table ACT_RU_TASK_METER_LOG ( + ID_ varchar(64) not null, + ASSIGNEE_HASH_ bigint, + TIMESTAMP_ datetime year to fraction(5), + primary key (ID_) +); + +create index ACT_IDX_TASK_METER_LOG_TIME on ACT_RU_TASK_METER_LOG(TIMESTAMP_); + +-- https://jira.camunda.com/browse/CAM-13060 +ALTER TABLE ACT_RU_INCIDENT + ADD ANNOTATION_ lvarchar(4000); + +ALTER TABLE ACT_HI_INCIDENT + ADD ANNOTATION_ lvarchar(4000); diff --git a/engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.15_to_7.16.sql b/engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.15_to_7.16.sql new file mode 100644 index 00000000000..62fd98fc7fe --- /dev/null +++ b/engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/informix_engine_7.15_to_7.16.sql @@ -0,0 +1,30 @@ +-- +-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH +-- under one or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information regarding copyright +-- ownership. Camunda licenses this file to you under the Apache License, +-- Version 2.0; you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +insert into ACT_GE_SCHEMA_LOG +values ('500', CURRENT_TIMESTAMP, '7.16.0'); + +create table ACT_RE_CAMFORMDEF ( + ID_ varchar(64) not null, + REV_ integer, + KEY_ varchar(255) not null, + VERSION_ integer not null, + DEPLOYMENT_ID_ varchar(64), + RESOURCE_NAME_ lvarchar(4000), + TENANT_ID_ varchar(64), + primary key (ID_) +); \ No newline at end of file diff --git a/engine/src/main/resources/org/camunda/bpm/engine/impl/mapping/entity/Authorization.xml b/engine/src/main/resources/org/camunda/bpm/engine/impl/mapping/entity/Authorization.xml index b2636ec1f3a..0a92dbf6432 100644 --- a/engine/src/main/resources/org/camunda/bpm/engine/impl/mapping/entity/Authorization.xml +++ b/engine/src/main/resources/org/camunda/bpm/engine/impl/mapping/entity/Authorization.xml @@ -179,6 +179,15 @@ ${limitAfterWithoutOffset}) + + + + delete from ${prefix}ACT_RU_AUTHORIZATION + where REMOVAL_TIME_ <= #{parameter.removalTime} + + + AND ${datepart1}${datepart2}${date}${datepart3} diff --git a/engine/src/main/resources/org/camunda/bpm/engine/impl/mapping/entity/Filter.xml b/engine/src/main/resources/org/camunda/bpm/engine/impl/mapping/entity/Filter.xml index c9321523629..3b32e6537a7 100644 --- a/engine/src/main/resources/org/camunda/bpm/engine/impl/mapping/entity/Filter.xml +++ b/engine/src/main/resources/org/camunda/bpm/engine/impl/mapping/entity/Filter.xml @@ -109,7 +109,7 @@ ${limitAfter} - diff --git a/engine/src/main/resources/org/camunda/bpm/engine/impl/mapping/entity/TaskMetrics.xml b/engine/src/main/resources/org/camunda/bpm/engine/impl/mapping/entity/TaskMetrics.xml index 3f4d0c82381..953e842977b 100644 --- a/engine/src/main/resources/org/camunda/bpm/engine/impl/mapping/entity/TaskMetrics.xml +++ b/engine/src/main/resources/org/camunda/bpm/engine/impl/mapping/entity/TaskMetrics.xml @@ -83,6 +83,15 @@ ${limitAfterWithoutOffset}) + + + + delete from ${prefix}ACT_RU_TASK_METER_LOG + where TIMESTAMP_ <= #{parameter.removalTime} + + +