2016-06-10 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in 'utils/rdmaint/rdmaint.cpp' that failed to process
	SQL NULL date values correctly.
This commit is contained in:
Fred Gleason 2016-06-10 17:52:59 -04:00
parent 815dea346c
commit 6fd3788af7
2 changed files with 7 additions and 3 deletions

View File

@ -15225,3 +15225,6 @@
2016-06-10 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'lib/rdlist_logs.cpp' that failed to process
SQL NULL date values correctly.
2016-06-10 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'utils/rdmaint/rdmaint.cpp' that failed to process
SQL NULL date values correctly.

View File

@ -204,9 +204,10 @@ void MainObject::PurgeLogs()
RDSqlQuery *q;
QDateTime dt=QDateTime(QDate::currentDate(),QTime::currentTime());
sql=QString().sprintf("select NAME from LOGS where \
(PURGE_DATE!=\"0000-00-00\")&&(PURGE_DATE<\"%s\")",
(const char *)dt.date().toString("yyyy-MM-dd"));
sql=QString("select NAME from LOGS where ")+
"(PURGE_DATE!=\"0000-00-00\")&&"+
"(PURGE_DATE is not null)&&"+
"(PURGE_DATE<\""+dt.date().toString("yyyy-MM-dd")+"\")";
q=new RDSqlQuery(sql);
while(q->next()) {
maint_config->