diff --git a/0046-Add-empty-check-and-inline-in-set_autocommit_off.patch b/0046-Add-empty-check-and-inline-in-set_autocommit_off.patch new file mode 100644 index 0000000000000000000000000000000000000000..a99fb80378766703a12751eeff14ea17e8ffd870 --- /dev/null +++ b/0046-Add-empty-check-and-inline-in-set_autocommit_off.patch @@ -0,0 +1,28 @@ +From 6e87816b49a6777cd9c5da6d8fca3549932c7547 Mon Sep 17 00:00:00 2001 +From: motodiary +Date: Tue, 11 Jun 2024 10:06:21 +0800 +Subject: [PATCH] Add empty check and inline in set_autocommit_off + +--- + src/database/pgsql_common.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/database/pgsql_common.c b/src/database/pgsql_common.c +index 241307e..afd8c23 100755 +--- a/src/database/pgsql_common.c ++++ b/src/database/pgsql_common.c +@@ -979,9 +979,9 @@ extern int destroy_pgsql_db_info(pgsql_db_info_t *db_info) + return SLURM_SUCCESS; + } + +-extern void set_autocommit_off(pgsql_conn_t *pgsql_conn) ++extern inline void set_autocommit_off(pgsql_conn_t *pgsql_conn) + { +- if (pgsql_conn->rollback) { ++ if (pgsql_conn && pgsql_conn->rollback) { + SQLSetConnectAttr(pgsql_conn->db_conn, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)SQL_AUTOCOMMIT_OFF, 0); + } + +-- +2.33.0 + diff --git a/slurm.spec b/slurm.spec index 0e3e7c08756bc329c52b63906bc159af3089fe73..208b4cafb2b6f52067c76605974851ab84d49c5a 100644 --- a/slurm.spec +++ b/slurm.spec @@ -1,6 +1,6 @@ Name: slurm Version: 21.08.8 -%define rel 48 +%define rel 49 Release: %{rel}%{?dist} Summary: Slurm Workload Manager @@ -61,6 +61,7 @@ Patch42: 0042-Change-the-serial-type-to-integer.patch Patch43: 0043-Remove-redundant-tres_table-fields.patch Patch44: 0044-replace-goto-fini.patch Patch45: 0045-Remove-comments-in-concatenated-strings.patch +Patch46: 0046-Add-empty-check-and-inline-in-set_autocommit_off.patch # build options .rpmmacros options change to default action # ==================== ==================== ======================== @@ -753,6 +754,9 @@ rm -rf %{buildroot} %systemd_postun_with_restart slurmdbd.service %changelog +* Tue Jun 11 2024 Xing Liu - 21.08.8-49 +- Add empty check and inline in set_autocommit_off + * Fri Jun 07 2024 Xing Liu - 21.08.8-48 - Remove comments in concatenated strings