From 4f418f0e1dd9e702490bd3500143cf8251434732 Mon Sep 17 00:00:00 2001 From: motodiary Date: Sun, 28 Apr 2024 10:08:03 +0800 Subject: [PATCH] =?UTF-8?q?replace=20=E2=80=98&&=E2=80=99=20with=20AND=20i?= =?UTF-8?q?n=20sql=20in=20as=5Fpgsql=5Fresource.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...eplace-with-AND-in-as_pgsql_resource.patch | 25 +++++++++++++++++++ slurm.spec | 5 +++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 0003-replace-with-AND-in-as_pgsql_resource.patch diff --git a/0003-replace-with-AND-in-as_pgsql_resource.patch b/0003-replace-with-AND-in-as_pgsql_resource.patch new file mode 100644 index 0000000..fbb856f --- /dev/null +++ b/0003-replace-with-AND-in-as_pgsql_resource.patch @@ -0,0 +1,25 @@ +From 319ebfe23d5381935786e951870d4b6c3c073098 Mon Sep 17 00:00:00 2001 +From: motodiary +Date: Sun, 28 Apr 2024 09:50:21 +0800 +Subject: [PATCH] replace && with AND in sql,because pgsql only supports AND + +--- + src/plugins/accounting_storage/pgsql/as_pgsql_resource.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/plugins/accounting_storage/pgsql/as_pgsql_resource.c b/src/plugins/accounting_storage/pgsql/as_pgsql_resource.c +index 1905f92..07f79fc 100755 +--- a/src/plugins/accounting_storage/pgsql/as_pgsql_resource.c ++++ b/src/plugins/accounting_storage/pgsql/as_pgsql_resource.c +@@ -776,7 +776,7 @@ extern List as_pgsql_get_res(pgsql_conn_t *pgsql_conn, uid_t uid, + "id", + tmp, res_table, clus_res_table, + (!res_cond || !res_cond->with_deleted) ? +- " && t2.deleted=0" : "", ++ " AND t2.deleted=0" : "", + extra); + xfree(tmp); + xfree(extra); +-- +2.33.0 + diff --git a/slurm.spec b/slurm.spec index abe8724..fee0582 100644 --- a/slurm.spec +++ b/slurm.spec @@ -1,6 +1,6 @@ Name: slurm Version: 21.08.8 -%define rel 5 +%define rel 6 Release: %{rel}%{?dist} Summary: Slurm Workload Manager @@ -710,6 +710,9 @@ rm -rf %{buildroot} %systemd_postun_with_restart slurmdbd.service %changelog +* Sun Apr 28 2024 Xing Liu - 21.08.8-6 +- replace ‘&&’ with AND in sql in as_pgsql_resource.c + * Thu Apr 25 2024 Xing Liu - 21.08.8-5 - move autoreconf command from %prep to %build -- Gitee