Skip to content

Commit 3b6c1bc

Browse files
committed
Make it possible to run with informix
1 parent e8bd4e7 commit 3b6c1bc

File tree

6 files changed

+61
-2
lines changed

6 files changed

+61
-2
lines changed

ci/build.sh

+2
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ elif [ "$RDBMS" == "cockroachdb" ]; then
7676
goal="-Pdb=cockroachdb"
7777
elif [ "$RDBMS" == "altibase" ]; then
7878
goal="-Pdb=altibase"
79+
elif [ "$RDBMS" == "informix" ]; then
80+
goal="-Pdb=informix"
7981
fi
8082

8183
# Only run checkstyle in the H2 build,

ci/database-start.sh

+2
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,6 @@ elif [ "$RDBMS" == 'cockroachdb' ]; then
3232
bash $DIR/../docker_db.sh cockroachdb
3333
elif [ "$RDBMS" == 'hana' ]; then
3434
bash $DIR/../docker_db.sh hana
35+
elif [ "$RDBMS" == 'informix' ]; then
36+
bash $DIR/../docker_db.sh informix
3537
fi

docker_db.sh

+52
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,58 @@ tidb_5_4() {
946946
fi
947947
}
948948

949+
informix() {
950+
informix_14_10
951+
}
952+
953+
informix_14_10() {
954+
$PRIVILEGED_CLI $CONTAINER_CLI rm -f informix || true
955+
$PRIVILEGED_CLI $CONTAINER_CLI run --name informix --privileged -p 9088:9088 -e LICENSE=accept -d icr.io/informix/informix-developer-database:14.10.FC9W1DE
956+
echo "Starting Informix. This can take a few minutes"
957+
# Give the container some time to start
958+
OUTPUT=
959+
n=0
960+
until [ "$n" -ge 10 ]
961+
do
962+
OUTPUT=$($CONTAINER_CLI logs informix 2>&1)
963+
if [[ $OUTPUT == *"Server Started"* ]]; then
964+
break;
965+
fi
966+
n=$((n+1))
967+
echo "Waiting for Informix to start..."
968+
sleep 30
969+
done
970+
if [ "$n" -ge 5 ]; then
971+
echo "Informix failed to start and configure after 5 minutes"
972+
else
973+
echo "Informix successfully started"
974+
fi
975+
}
976+
977+
informix_12_10() {
978+
$PRIVILEGED_CLI $CONTAINER_CLI rm -f informix || true
979+
$PRIVILEGED_CLI $CONTAINER_CLI run --name informix --privileged -p 9088:9088 -e LICENSE=accept -d ibmcom/informix-developer-database:12.10.FC12W1DE
980+
echo "Starting Informix. This can take a few minutes"
981+
# Give the container some time to start
982+
OUTPUT=
983+
n=0
984+
until [ "$n" -ge 10 ]
985+
do
986+
OUTPUT=$($CONTAINER_CLI logs informix 2>&1)
987+
if [[ $OUTPUT == *"login Information"* ]]; then
988+
break;
989+
fi
990+
n=$((n+1))
991+
echo "Waiting for Informix to start..."
992+
sleep 30
993+
done
994+
if [ "$n" -ge 5 ]; then
995+
echo "Informix failed to start and configure after 5 minutes"
996+
else
997+
echo "Informix successfully started"
998+
fi
999+
}
1000+
9491001
if [ -z ${1} ]; then
9501002
echo "No db name provided"
9511003
echo "Provide one of:"

gradle/databases.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ ext {
291291
'connection.init_sql' : ''
292292
],
293293
informix : [
294-
'db.dialect' : 'org.hibernate.dialect.InformixDialect',
294+
'db.dialect' : 'org.hibernate.community.dialect.InformixDialect',
295295
'jdbc.driver': 'com.informix.jdbc.IfxDriver',
296296
'jdbc.user' : 'informix',
297297
'jdbc.pass' : 'in4mix',

gradle/java-module.gradle

+3
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ dependencies {
131131
else if ( db.startsWith( 'altibase' ) ) {
132132
testRuntimeOnly dbLibs.altibase
133133
}
134+
else if ( db.startsWith( 'informix' ) ) {
135+
testRuntimeOnly dbLibs.informix
136+
}
134137

135138
annotationProcessor libs.loggingProcessor
136139
annotationProcessor libs.logging

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ dependencyResolutionManagement {
231231
def hanaVersion = version "hana", "2.19.11"
232232
def h2gisVersion = version "h2gis", overrideableVersion( "gradle.libs.versions.h2gis", "2.2.0" )
233233
def hsqldbVersion = version "hsqldb", overrideableVersion( "gradle.libs.versions.hsqldb", "2.7.2" )
234-
def informixVersion = version "informix", "4.10.12"
234+
def informixVersion = version "informix", "4.50.10.1"
235235
def mariadbVersion = version "mariadb", "3.3.1"
236236
def mssqlVersion = version "mssql", "12.4.2.jre11"
237237
def mysqlVersion = version "mysql", "8.2.0"

0 commit comments

Comments
 (0)