From 37cca1eb26899309a43dc06c24975b583ae9bd01 Mon Sep 17 00:00:00 2001
From: Danny Auble <da@llnl.gov>
Date: Wed, 11 Jun 2008 16:14:40 +0000
Subject: [PATCH] fixed bug with filetxt plugin not returning correct
 information about partition

---
 src/common/plugin.c                           |  8 ++++++--
 .../filetxt/filetxt_jobacct_process.c         |  1 +
 .../mysql/accounting_storage_mysql.c          | 20 -------------------
 3 files changed, 7 insertions(+), 22 deletions(-)

diff --git a/src/common/plugin.c b/src/common/plugin.c
index b4cf0928422..a895b820676 100644
--- a/src/common/plugin.c
+++ b/src/common/plugin.c
@@ -188,8 +188,12 @@ plugin_load_and_link(const char *type_name, int n_syms,
 			so_name[i] = '_';
 		i++;
 	}
-	dir_array = slurm_get_plugin_dir();
-
+	if(!(dir_array = slurm_get_plugin_dir())) {
+		error("plugin_load_and_link: No plugin dir given");
+		xfree(so_name);
+		return plug;
+	}
+	
 	head = dir_array;
 	i=0;
 	for (i=0; ; i++) {
diff --git a/src/plugins/accounting_storage/filetxt/filetxt_jobacct_process.c b/src/plugins/accounting_storage/filetxt/filetxt_jobacct_process.c
index a9d0f7470d6..3711582c943 100644
--- a/src/plugins/accounting_storage/filetxt/filetxt_jobacct_process.c
+++ b/src/plugins/accounting_storage/filetxt/filetxt_jobacct_process.c
@@ -299,6 +299,7 @@ static jobacct_job_rec_t *_create_jobacct_job_rec(
 	jobacct_job->priority = filetxt_job->priority;
 	jobacct_job->requid = filetxt_job->requid;
 	memcpy(&jobacct_job->sacct, &filetxt_job->sacct, sizeof(sacct_t));
+	jobacct_job->show_full = filetxt_job->show_full;
 	jobacct_job->start = filetxt_job->header.timestamp -
 		jobacct_job->elapsed;
 	jobacct_job->state = filetxt_job->status;
diff --git a/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c b/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c
index f6e1b72c925..a2afe6df2fa 100644
--- a/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c
+++ b/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c
@@ -185,26 +185,6 @@ static int _move_account(mysql_conn_t *mysql_conn, uint32_t lft, uint32_t rgt,
 			 char *cluster,
 			 char *id, char *parent)
 {
-/*
-  tested sql...
-
-  SELECT @parLeft := lft from assoc_table where cluster='name' && acct='new parent' && user='';
-
-  SELECT @oldLeft := lft, @oldRight := rgt, @myWidth := (rgt - lft + 1), @myDiff := (@parLeft+1) - lft FROM assoc_table WHERE id = 'account id';
-
-  update assoc_table set deleted = deleted + 2, lft = lft + @myDiff, rgt = rgt + @myDiff WHERE lft BETWEEN @oldLeft AND @oldRight;
-
-  UPDATE assoc_table SET rgt = rgt + @myWidth WHERE rgt > @parLeft && deleted < 2;
-  UPDATE assoc_table SET lft = lft + @myWidth WHERE lft > @parLeft && deleted < 2;
-
-  UPDATE assoc_table SET rgt = rgt - @myWidth WHERE (@myDiff < 0 && rgt > @oldRight && deleted < 2) || (@myDiff >= 0 && rgt > @oldLeft);
-  UPDATE assoc_table SET lft = lft - @myWidth WHERE (@myDiff < 0 && lft > @oldRight && deleted < 2) || (@myDiff >= 0 && lft > @oldLeft);
-
-  update assoc_table set deleted = deleted - 2 WHERE deleted > 1;
-	   
-  update assoc_table set parent_acct='new parent' where id = 'account id';
-
-*/
 	int rc = SLURM_SUCCESS;
 	MYSQL_RES *result = NULL;
 	MYSQL_ROW row;
-- 
GitLab