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 camunda/camunda-bpm-platform#4001

Backported commit 95ad993bb1 from the camunda-bpm-platform repository.
Original author: tasso94 <[email protected]>
  • Loading branch information
hauptmedia committed Nov 4, 2024
1 parent ae5420e commit 8883744
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 10 deletions.
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 @@ -308,8 +308,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 @@ -322,8 +322,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 8883744

Please sign in to comment.