From def80fc8571dc1d307420734dfe83ddabf5d5cec Mon Sep 17 00:00:00 2001 From: Nirmit Shah <44708230+shah-nirmit@users.noreply.github.com> Date: Mon, 11 Dec 2023 14:56:48 +0530 Subject: [PATCH] Run MVU tests in release mode (#2113) Task: BABEL-4449 Signed-off-by: Nirmit Shah --- .../build-modified-postgres/action.yml | 10 +++++++++- .github/workflows/major-version-upgrade.yml | 10 ++++++++++ contrib/babelfishpg_tsql/src/pltsql_coerce.c | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/composite-actions/build-modified-postgres/action.yml b/.github/composite-actions/build-modified-postgres/action.yml index 3d143840ec0..8a05e632cab 100644 --- a/.github/composite-actions/build-modified-postgres/action.yml +++ b/.github/composite-actions/build-modified-postgres/action.yml @@ -12,6 +12,10 @@ inputs: description: 'Tap Tests Enabled' required: no default: no + release_mode: + description: 'Build in Release Mode' + required: no + default: no runs: using: "composite" @@ -42,7 +46,11 @@ runs: if [[ ${{inputs.tap_tests}} == "yes" ]]; then ./configure CC='ccache gcc' --prefix=$HOME/${{ inputs.install_dir }}/ --with-python PYTHON=/usr/bin/python3.8 --enable-cassert CFLAGS="-ggdb" --with-libxml --with-uuid=ossp --with-icu --enable-tap-tests --with-gssapi else - ./configure CC='ccache gcc' --prefix=$HOME/${{ inputs.install_dir }}/ --with-python PYTHON=/usr/bin/python3.8 --enable-cassert CFLAGS="-ggdb" --with-libxml --with-uuid=ossp --with-icu + if [[ ${{inputs.release_mode}} == "yes" ]]; then + ./configure CC='ccache gcc' --prefix=$HOME/${{ inputs.install_dir }}/ --with-python PYTHON=/usr/bin/python3.8 CFLAGS="-ggdb -O2" --with-libxml --with-uuid=ossp --with-icu + else + ./configure CC='ccache gcc' --prefix=$HOME/${{ inputs.install_dir }}/ --with-python PYTHON=/usr/bin/python3.8 --enable-cassert CFLAGS="-ggdb" --with-libxml --with-uuid=ossp --with-icu + fi fi make -j 4 2>error.txt make install diff --git a/.github/workflows/major-version-upgrade.yml b/.github/workflows/major-version-upgrade.yml index 704b12b608a..ba2fb491a1c 100644 --- a/.github/workflows/major-version-upgrade.yml +++ b/.github/workflows/major-version-upgrade.yml @@ -123,6 +123,7 @@ jobs: uses: ./.github/composite-actions/build-modified-postgres with: install_dir: ${{env.NEW_INSTALL_DIR}} + release_mode: 'yes' - name: Copy ANTLR run: cp "/usr/local/lib/libantlr4-runtime.so.4.9.3" ~/${{env.NEW_INSTALL_DIR}}/lib/ @@ -174,6 +175,15 @@ jobs: if: always() && steps.setup-new-datadir.outcome == 'success' uses: ./.github/composite-actions/run-pg-upgrade + - name: Disable TDS fault injection tests in release mode + id: disable-fault-injection + if: always() && steps.setup-new-datadir.outcome == 'success' + run: | + cd test/JDBC/ + echo 'ignore#!#babel_tds_fault_injection' >> jdbc_schedule + echo 'ignore#!#tds_faultinjection' >> jdbc_schedule + echo jdbc_schedule + - name: Run JDBC Tests id: jdbc timeout-minutes: 60 diff --git a/contrib/babelfishpg_tsql/src/pltsql_coerce.c b/contrib/babelfishpg_tsql/src/pltsql_coerce.c index 9bc126fe83f..d91a0c5bd7f 100644 --- a/contrib/babelfishpg_tsql/src/pltsql_coerce.c +++ b/contrib/babelfishpg_tsql/src/pltsql_coerce.c @@ -1305,7 +1305,7 @@ select_common_type_for_isnull(ParseState *pstate, List *exprs) static int32 tsql_select_common_typmod_hook(ParseState *pstate, List *exprs, Oid common_type) { - int32 max_typmods; + int32 max_typmods=0; ListCell *lc; common_utility_plugin *utilptr = common_utility_plugin_ptr;