From 8b836a391b408b25b4c5896b521a2fec88baceb7 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 11 Jun 2010 03:50:47 +0000 Subject: [PATCH] - database: remove unused fields from app table svn path=/trunk/boinc/; revision=21728 --- checkin_notes | 9 +++++++++ db/boinc_db.cpp | 16 ++-------------- db/boinc_db.h | 4 ---- db/schema.sql | 4 ---- html/ops/db_update.php | 10 ++++++++++ 5 files changed, 21 insertions(+), 22 deletions(-) diff --git a/checkin_notes b/checkin_notes index 77aa2f309f..f1618378a4 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4224,3 +4224,12 @@ David 10 Jun 2010 credit.h html/inc/ result.inc + +David 10 Jun 2010 + - database: remove unused fields from app table + + db/ + boinc_db.cpp,h + schema.sql + html/ops/ + db_update.php diff --git a/db/boinc_db.cpp b/db/boinc_db.cpp index 24bcb217a4..4c59c86274 100644 --- a/db/boinc_db.cpp +++ b/db/boinc_db.cpp @@ -195,11 +195,7 @@ void DB_APP::db_print(char* buf){ "beta=%d, " "target_nresults=%d, " "min_avg_pfc=%.15e, " - "host_scale_check=%d, " - "max_jobs_in_progress=%d, " - "max_gpu_jobs_in_progress=%d, " - "max_jobs_per_rpc=%d, " - "max_jobs_per_day_init=%d ", + "host_scale_check=%d, ", create_time, name, min_version, @@ -210,11 +206,7 @@ void DB_APP::db_print(char* buf){ beta?1:0, target_nresults, min_avg_pfc, - host_scale_check?1:0, - max_jobs_in_progress, - max_gpu_jobs_in_progress, - max_jobs_per_rpc, - max_jobs_per_day_init + host_scale_check?1:0 ); } @@ -233,10 +225,6 @@ void DB_APP::db_parse(MYSQL_ROW &r) { target_nresults = atoi(r[i++]); min_avg_pfc = atof(r[i++]); host_scale_check = (atoi(r[i++]) != 0); - max_jobs_in_progress = atoi(r[i++]); - max_gpu_jobs_in_progress = atoi(r[i++]); - max_jobs_per_rpc = atoi(r[i++]); - max_jobs_per_day_init = atoi(r[i++]); } void DB_APP_VERSION::db_print(char* buf){ diff --git a/db/boinc_db.h b/db/boinc_db.h index 0eff6c9e05..db682a45f6 100644 --- a/db/boinc_db.h +++ b/db/boinc_db.h @@ -83,10 +83,6 @@ struct APP { // Approximates (actual FLOPS)/wu.rsc_fpops_est bool host_scale_check; // use host scaling cautiously, to thwart cherry picking - int max_jobs_in_progress; - int max_gpu_jobs_in_progress; - int max_jobs_per_rpc; - int max_jobs_per_day_init; int write(FILE*); void clear(); diff --git a/db/schema.sql b/db/schema.sql index 2797ae452b..f454d3cd13 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -51,10 +51,6 @@ create table app ( target_nresults smallint not null default 0, min_avg_pfc double not null, host_scale_check tinyint not null, - max_jobs_in_progress integer not null, - max_gpu_jobs_in_progress integer not null, - max_jobs_per_rpc integer not null, - max_jobs_per_day_init integer not null, primary key (id) ) engine=InnoDB; diff --git a/html/ops/db_update.php b/html/ops/db_update.php index f2ee9d3d7c..aa06b3ea67 100755 --- a/html/ops/db_update.php +++ b/html/ops/db_update.php @@ -706,6 +706,15 @@ function update_4_21_2010() { "); } +function update_6_10_2010() { + do_query("alter table app + drop column max_jobs_in_progress, + drop column max_gpu_jobs_in_progress, + drop column max_jobs_per_rpc, + drop column max_jobs_per_day_init + "); +} + // Updates are done automatically if you use "upgrade". // // If you need to do updates manually, @@ -722,6 +731,7 @@ $db_updates = array ( array(20807, "update_3_5_2010"), array(20932, "update_3_17_2010"), array(21226, "update_4_21_2010"), + array(21728, "update_6_10_2010"), ); ?>