From 67b0ece3955098ba6f38c8058b085a4c8a237355 Mon Sep 17 00:00:00 2001 From: motodiary Date: Wed, 15 May 2024 09:55:40 +0800 Subject: [PATCH] fixed the 'partition' field in sql Signed-off-by: motodiary --- 0013-fixed-the-partition-field-in-sql.patch | 57 +++++++++++++++++++++ slurm.spec | 6 ++- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 0013-fixed-the-partition-field-in-sql.patch diff --git a/0013-fixed-the-partition-field-in-sql.patch b/0013-fixed-the-partition-field-in-sql.patch new file mode 100644 index 0000000..6018041 --- /dev/null +++ b/0013-fixed-the-partition-field-in-sql.patch @@ -0,0 +1,57 @@ +From e89d6313205a7a2ab6a0881b92cc036ffa27d5d0 Mon Sep 17 00:00:00 2001 +From: motodiary +Date: Wed, 15 May 2024 09:51:50 +0800 +Subject: [PATCH] fixed the 'partition' field in sql + +--- + .../accounting_storage/pgsql/as_pgsql_assoc.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/plugins/accounting_storage/pgsql/as_pgsql_assoc.c b/src/plugins/accounting_storage/pgsql/as_pgsql_assoc.c +index f983d96..676e22f 100755 +--- a/src/plugins/accounting_storage/pgsql/as_pgsql_assoc.c ++++ b/src/plugins/accounting_storage/pgsql/as_pgsql_assoc.c +@@ -153,7 +153,7 @@ static char *massoc_req_inx[] = { + "acct", + "parent_acct", + "user", +- "`partition`", ++ "partition", + "lft", + "rgt", + "qos", +@@ -193,7 +193,7 @@ static char *rassoc_req_inx[] = { + "acct", + "parent_acct", + "user", +- "`partition`" ++ "partition" + }; + + enum { +@@ -852,7 +852,7 @@ static int _modify_unset_users(pgsql_conn_t *pgsql_conn, + "id_assoc", + "user", + "acct", +- "`partition`", ++ "partition", + "max_jobs", + "max_jobs_accrue", + "min_prio_thresh", +@@ -2640,10 +2640,10 @@ extern int as_pgsql_add_assocs(pgsql_conn_t *pgsql_conn, uint32_t uid, + */ + if (!part) + part = ""; +- xstrcat(cols, ", `partition`"); ++ xstrcat(cols, ", \"partition\""); + xstrfmtcat(vals, ", '%s'", part); +- xstrfmtcat(update, " AND `partition`='%s'", part); +- xstrfmtcat(extra, ", `partition`='%s'", part); ++ xstrfmtcat(update, " AND \"partition\"='%s'", part); ++ xstrfmtcat(extra, ", \"partition\"='%s'", part); + if (!added_user_list) + added_user_list = list_create(NULL); + if (!list_find_first(added_user_list, +-- +2.33.0 + diff --git a/slurm.spec b/slurm.spec index 24b7692..3fdf78c 100644 --- a/slurm.spec +++ b/slurm.spec @@ -1,6 +1,6 @@ Name: slurm Version: 21.08.8 -%define rel 15 +%define rel 16 Release: %{rel}%{?dist} Summary: Slurm Workload Manager @@ -28,6 +28,7 @@ Patch9: 0009-fix-the-default-value-type.patch Patch10: 0010-use-pgsql_handle_quotes-to-replace-old-method.patch Patch11: 0011-Adjusting-the-implementation-of-last_affect_row.patch Patch12: 0012-fix-some-sql-statements.patch +Patch13: 0013-fixed-the-partition-field-in-sql.patch # build options .rpmmacros options change to default action # ==================== ==================== ======================== @@ -720,6 +721,9 @@ rm -rf %{buildroot} %systemd_postun_with_restart slurmdbd.service %changelog +* Wed May 15 2024 Xing Liu - 21.08.8-16 +- fixed the 'partition' field in sql + * Tue May 14 2024 Xing Liu - 21.08.8-15 - fix some sql statements -- Gitee