Skip to content

Commit

Permalink
chore(databases): add support for oracle 23ai (#4522)
Browse files Browse the repository at this point in the history
related to #4001
  • Loading branch information
tasso94 authored Aug 22, 2024
1 parent aa1f15b commit 95ad993
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .ci/config/matrices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ engine-webapp-unit:
- 'mariadb_106'
- 'mysql_80'
- 'oracle_19'
- 'oracle_23'
- 'db2_115'
- 'sqlserver_2017'
- 'sqlserver_2019'
Expand All @@ -38,6 +39,7 @@ daily-stages:
- 'mariadb_106'
- 'mysql_80'
- 'oracle_19'
- 'oracle_23'
- 'db2_115'
- 'sqlserver_2022'
stages:
Expand All @@ -62,4 +64,4 @@ jdk-ce-stages:
- 'platform-jdk-openjdk-jdk-11-latest'
- 'platform-jdk-jdk-21-latest'
- 'platform-jdk-jdk-17-latest'
- 'platform-jdk-jdk-11-latest'
- 'platform-jdk-jdk-11-latest'
14 changes: 7 additions & 7 deletions database/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<!-- database driver versions -->
<version.h2>2.1.214</version.h2>
<version.h2-v1>1.4.200</version.h2-v1><!-- used for instance migration qa -->
<version.oracle>19.3.0.0</version.oracle>
<version.oracle>23.5.0.24.07</version.oracle>
<version.mariadb>1.7.6</version.mariadb>
<version.mariadb-v1>1.1.8</version.mariadb-v1>
<version.mysql>8.3.0</version.mysql>
Expand All @@ -44,8 +44,8 @@
<version>${version.h2}</version>
</dependency>
<dependency>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>ojdbc8</artifactId>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11</artifactId>
<version>${version.oracle}</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -309,8 +309,8 @@
</properties>
<dependencies>
<dependency>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>ojdbc8</artifactId>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -323,8 +323,8 @@
<artifactId>sql-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>ojdbc8</artifactId>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11</artifactId>
<version>${version.oracle}</version>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -659,13 +659,13 @@ protected List<String> getTablesPresentInOracleDatabase() throws SQLException {
Connection connection = null;
PreparedStatement prepStat = null;
ResultSet tablesRs = null;
String selectTableNamesFromOracle = "SELECT table_name FROM all_tables WHERE table_name LIKE ?";
String selectTableNamesFromOracle = "SELECT table_name FROM all_tables WHERE table_name LIKE ? ESCAPE '-'";
String databaseTablePrefix = getDbSqlSessionFactory().getDatabaseTablePrefix();

try {
connection = Context.getProcessEngineConfiguration().getDataSource().getConnection();
prepStat = connection.prepareStatement(selectTableNamesFromOracle);
prepStat.setString(1, databaseTablePrefix + "ACT_%");
prepStat.setString(1, databaseTablePrefix + "ACT-_%");

tablesRs = prepStat.executeQuery();
while (tablesRs.next()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
import org.junit.Rule;
import org.junit.Test;

@RequiredDatabase(excludes = { DbSqlSessionFactory.H2 })
// This test is excluded on Oracle since the SQL State changed with the new version of the JDBC driver.
@RequiredDatabase(excludes = { DbSqlSessionFactory.H2, DbSqlSessionFactory.ORACLE })
public class ConnectionPersistenceExceptionTest {

@Rule
Expand Down
14 changes: 14 additions & 0 deletions qa/test-old-engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,20 @@
</build>
</profile>

<profile>
<id>oracle-23</id>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>old-engine</id>

Expand Down

0 comments on commit 95ad993

Please sign in to comment.