diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index 0cef97459..0f0d43849 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -130,10 +130,10 @@ jobs: chmod +x ./src/odbc-test/scripts/import_test_data.sh ./src/odbc-test/scripts/import_test_data.sh - # - name: run-tests - # run: | - # ssh -f -N -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${{env.DOC_DB_PRIV_KEY_FILE}} -L${{env.DOC_DB_LOCAL_PORT}}:${{secrets.DOC_DB_HOST}}:${{env.DOC_DB_REMOTE_PORT}} ${{secrets.DOC_DB_USER}} - # ./build/odbc/bin/ignite-odbc-tests + - name: run-tests + run: | + ssh -f -N -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${{env.DOC_DB_PRIV_KEY_FILE}} -L${{env.DOC_DB_LOCAL_PORT}}:${{secrets.DOC_DB_HOST}}:${{env.DOC_DB_REMOTE_PORT}} ${{secrets.DOC_DB_USER}} + ./build/odbc/bin/ignite-odbc-tests --catch_system_errors=false - name: upload-test-report if: always() diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index d19890673..ec5ad50f2 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -106,10 +106,10 @@ jobs: run: | chmod +x ./src/odbc-test/scripts/import_test_data.sh ./src/odbc-test/scripts/import_test_data.sh - # - name: run-tests - # run: | - # ssh -f -N -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${{env.DOC_DB_PRIV_KEY_FILE}} -L${{env.DOC_DB_LOCAL_PORT}}:${{secrets.DOC_DB_HOST}}:${{env.DOC_DB_REMOTE_PORT}} ${{secrets.DOC_DB_USER}} - # ./build/odbc/bin/ignite-odbc-tests + - name: run-tests + run: | + ssh -f -N -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${{env.DOC_DB_PRIV_KEY_FILE}} -L${{env.DOC_DB_LOCAL_PORT}}:${{secrets.DOC_DB_HOST}}:${{env.DOC_DB_REMOTE_PORT}} ${{secrets.DOC_DB_USER}} + ./build/odbc/bin/ignite-odbc-tests --catch_system_errors=false - name: upload-test-report if: always() uses: EnricoMi/publish-unit-test-result-action/composite@v1.30 diff --git a/src/odbc/src/jni/java.cpp b/src/odbc/src/jni/java.cpp index 05546fc76..d93aaf8f7 100644 --- a/src/odbc/src/jni/java.cpp +++ b/src/odbc/src/jni/java.cpp @@ -970,6 +970,7 @@ JniErrorCode JniContext::DriverManagerGetConnection( } else { connection = new GlobalJObject(env, env->NewGlobalRef(result)); } + env->DeleteLocalRef(jConnectionString); return errInfo.code; } @@ -1148,6 +1149,10 @@ JniErrorCode JniContext::DatabaseMetaDataGetTables( jvm->GetMembers().m_DatabaseMetaDataGetTables, jCatalog, jSchemaPattern, jTableNamePattern, jTypes); ExceptionCheck(env, &errInfo); + env->DeleteLocalRef(jCatalog); + env->DeleteLocalRef(jSchemaPattern); + env->DeleteLocalRef(jTableNamePattern); + env->DeleteLocalRef(jTypes); if (!result || errInfo.code != JniErrorCode::IGNITE_JNI_ERR_SUCCESS) { resultSet = nullptr; @@ -1181,6 +1186,11 @@ JniErrorCode JniContext::DatabaseMetaDataGetColumns( jTableNamePattern, jColumnNamePattern); ExceptionCheck(env, &errInfo); + env->DeleteLocalRef(jCatalog); + env->DeleteLocalRef(jSchemaPattern); + env->DeleteLocalRef(jTableNamePattern); + env->DeleteLocalRef(jColumnNamePattern); + if (!result || errInfo.code != JniErrorCode::IGNITE_JNI_ERR_SUCCESS) { resultSet = nullptr; return errInfo.code; @@ -1268,6 +1278,8 @@ JniErrorCode JniContext::ResultSetGetString( resultSet.Get()->GetRef(), jvm->GetMembers().m_ResultSetGetStringByName, jColumnName); ExceptionCheck(env, &errInfo); + + env->DeleteLocalRef(jColumnName); if (errInfo.code == JniErrorCode::IGNITE_JNI_ERR_SUCCESS) { if (result != nullptr) { @@ -1324,6 +1336,9 @@ JniErrorCode JniContext::ResultSetGetInt( jvm->GetMembers().m_ResultSetGetIntByName, jColumnName); ExceptionCheck(env, &errInfo); + + env->DeleteLocalRef(jColumnName); + if (errInfo.code == JniErrorCode::IGNITE_JNI_ERR_SUCCESS) { bool wasNull; errInfo.code = ResultSetWasNull(resultSet, wasNull, errInfo);