diff --git a/0035-fix-the-sql-error-in-adding-resource.patch b/0035-fix-the-sql-error-in-adding-resource.patch new file mode 100644 index 0000000000000000000000000000000000000000..63c680689ff9c134f99cbcff3b7fa79b37ad3653 --- /dev/null +++ b/0035-fix-the-sql-error-in-adding-resource.patch @@ -0,0 +1,29 @@ +From cca5c9a6eee1522e2b61ebc3b30ce92564018ee5 Mon Sep 17 00:00:00 2001 +From: motodiary +Date: Thu, 30 May 2024 10:39:00 +0800 +Subject: [PATCH] fix the sql error in adding resource + +--- + src/plugins/accounting_storage/pgsql/as_pgsql_resource.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/plugins/accounting_storage/pgsql/as_pgsql_resource.c b/src/plugins/accounting_storage/pgsql/as_pgsql_resource.c +index 4decc21..5d5e5f9 100755 +--- a/src/plugins/accounting_storage/pgsql/as_pgsql_resource.c ++++ b/src/plugins/accounting_storage/pgsql/as_pgsql_resource.c +@@ -442,9 +442,9 @@ static int _add_res(pgsql_conn_t *pgsql_conn, slurmdb_res_rec_t *object, + + xstrfmtcat(query, + "INSERT INTO %s (%s) VALUES (%s) " +- "ON CONFLICT (id) DO UPDATE SET deleted=0, " +- "id=CURRVAL(pg_get_serial_sequence('%s', 'id'))%s;", +- res_table, cols, vals, res_table, extra); ++ "ON CONFLICT (id) DO UPDATE SET deleted=0%s;", ++// "id=CURRVAL(pg_get_serial_sequence('%s', 'id'))%s;", ++ res_table, cols, vals, extra); + + + DB_DEBUG(DB_RES, pgsql_conn->conn, "query\n%s", query); +-- +2.33.0 + diff --git a/slurm.spec b/slurm.spec index 5505ec6e34577a8bd67158cff602cff9f16b77e4..d85052c92bb22bee65ca5017f684e97f927b5e8e 100644 --- a/slurm.spec +++ b/slurm.spec @@ -1,6 +1,6 @@ Name: slurm Version: 21.08.8 -%define rel 37 +%define rel 38 Release: %{rel}%{?dist} Summary: Slurm Workload Manager @@ -50,6 +50,7 @@ Patch31: 0031-fix-some-error-add-pgsql_escape_str-function.patch Patch32: 0032-Correcting-archive-SQL-statements-in-tables.patch Patch33: 0033-fix-pgsql_db_insert_ret_id.patch Patch34: 0034-Replace-the-REPLACE-function-with-the-REGEXP_REPLACE.patch +Patch35: 0035-fix-the-sql-error-in-adding-resource.patch # build options .rpmmacros options change to default action # ==================== ==================== ======================== @@ -742,6 +743,9 @@ rm -rf %{buildroot} %systemd_postun_with_restart slurmdbd.service %changelog +* Thu May 30 2024 Xing Liu - 21.08.8-38 +- fix the sql error in adding resource + * Wed May 29 2024 Xing Liu - 21.08.8-37 - Replace the REPLACE function with the REGEXP_REPLACE function