2020-04-27 Fred Gleason <fredg@paravelsystems.com>

* Incremented the package version to 3.3.0int0.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2020-05-02 12:53:03 -04:00
parent 4d3e54df02
commit 23df7cbc14
6 changed files with 28 additions and 4 deletions

View File

@ -19825,3 +19825,8 @@
dialog box.
2020-04-27 Fred Gleason <fredg@paravelsystems.com>
* Incremented the package version to 3.3.0int0.
2020-05-02 Fred Gleason <fredg@paravelsystems.com>
* Added a'STACK_LINES_ID_IDX' index to the 'STACK_SCHED_CODES'
table in the database.
* Incremented the database version to 317.
* Cleaned up SQL generation in rdmaint(8).

View File

@ -24,7 +24,7 @@
/*
* Current Database Version
*/
#define RD_VERSION_DATABASE 316
#define RD_VERSION_DATABASE 317
#endif // DBVERSION_H

View File

@ -41,6 +41,15 @@ bool MainObject::RevertSchema(int cur_schema,int set_schema,QString *err_msg)
//
// Revert 317
//
if((cur_schema==317)&&(set_schema<cur_schema)) {
DropIndex("STACK_SCHED_CODES","STACK_LINES_ID_IDX");
WriteSchemaVersion(--cur_schema);
}
//
// Revert 316
//

View File

@ -160,7 +160,7 @@ void MainObject::InitializeSchemaMap() {
global_version_map["3.1"]=310;
global_version_map["3.2"]=311;
global_version_map["3.3"]=314;
global_version_map["3.4"]=316;
global_version_map["3.4"]=317;
}

View File

@ -9916,6 +9916,16 @@ bool MainObject::UpdateSchema(int cur_schema,int set_schema,QString *err_msg)
WriteSchemaVersion(++cur_schema);
}
if((cur_schema<317)&&(set_schema>cur_schema)) {
sql=QString("create index STACK_LINES_ID_IDX on ")+
"STACK_SCHED_CODES(STACK_LINES_ID)";
if(!RDSqlQuery::apply(sql,err_msg)) {
return false;
}
WriteSchemaVersion(++cur_schema);
}

View File

@ -2,7 +2,7 @@
//
// A Utility for running periodic system maintenance.
//
// (C) Copyright 2008-2019 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2008-2020 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@ -316,7 +316,7 @@ void MainObject::PurgeStacks()
sql="select NAME from SERVICES";
q=new RDSqlQuery(sql);
while(q->next()) {
sql=QString().sprintf("select MAX(SCHED_STACK_ID) from STACK_LINES where ")+
sql=QString("select MAX(SCHED_STACK_ID) from STACK_LINES where ")+
"SERVICE_NAME=\""+RDEscapeString(q->value(0).toString())+"\"";
q1=new RDSqlQuery(sql);
if (q1->next()) {