Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.67.x-blue] Bump h2 from 1.4.197 to 2.2.220 #5427

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion drools-persistence/drools-persistence-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
<maven.jdbc.driver.jar/>
<maven.jdbc.username/>
<maven.jdbc.password/>
<maven.jdbc.url>jdbc:h2:mem:test</maven.jdbc.url>
<!-- appending ;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE to the jdbc url is necessary to workaround the problem reported at -->
<!-- https://github.com/h2database/h2database/issues/3325 -->
<maven.jdbc.url>jdbc:h2:mem:test;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE</maven.jdbc.url>
<maven.jdbc.schema>public</maven.jdbc.schema>
</properties>

Expand Down
4 changes: 3 additions & 1 deletion drools-traits/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
<maven.jdbc.driver.jar/>
<maven.jdbc.username/>
<maven.jdbc.password/>
<maven.jdbc.url>jdbc:h2:mem:test</maven.jdbc.url>
<!-- appending ;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE to the jdbc url is necessary to workaround the problem reported at -->
<!-- https://github.com/h2database/h2database/issues/3325 -->
<maven.jdbc.url>jdbc:h2:mem:test;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE</maven.jdbc.url>
<maven.jdbc.schema>public</maven.jdbc.schema>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public static PoolingDataSourceWrapper setupPoolingDataSource(Properties dsProps
String jdbcUrl = dsProps.getProperty("url");
// fix an incomplete JDBC URL used by some tests
if (jdbcUrl.startsWith("jdbc:h2:") && !jdbcUrl.contains("tcp://") && !jdbcUrl.contains("mem:")) {
dsProps.put("url", jdbcUrl + "tcp://localhost/target/./persistence-test");
dsProps.put("url", jdbcUrl + "tcp://localhost/target/./persistence-test;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE");
}
h2Server.start();
}
Expand All @@ -168,7 +168,7 @@ private static Properties getDefaultProperties() {
if (defaultProperties == null) {
String[] keyArr = { "serverName", "portNumber", "databaseName", "url", "user", "password", "driverClassName",
"className", "maxPoolSize", "allowLocalTransactions" };
String[] defaultPropArr = { "", "", "", "jdbc:h2:tcp://localhost/JPADroolsFlow", "sa", "", "org.h2.Driver",
String[] defaultPropArr = { "", "", "", "jdbc:h2:tcp://localhost/JPADroolsFlow;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE", "sa", "", "org.h2.Driver",
"org.h2.jdbcx.JdbcDataSource", "16", "true" };
if (keyArr.length != defaultPropArr.length) {
throw new IllegalStateException("Unequal number of keys for default properties!");
Expand Down Expand Up @@ -247,7 +247,7 @@ public void start() {
if (realH2Server == null || !realH2Server.isRunning(false)) {
try {
DeleteDbFiles.execute("", "JPADroolsFlow", true);
realH2Server = Server.createTcpServer(new String[0]);
realH2Server = Server.createTcpServer(new String[]{"-ifNotExists"});
realH2Server.start();
} catch (SQLException e) {
throw new RuntimeException("Can't start h2 server db", e);
Expand Down