diff --git a/ChangeLog b/ChangeLog index 5ddd263..64255ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ --------------------------------------------------------------------------- +Version 2.5.20 (beta), 2008-11-19 +- Fixed a performance issue in the logstream db and pdo drivers when + using filters. This bug could cause script timeouts when using complex + filters. +--------------------------------------------------------------------------- Version 2.5.19 (beta), 2008-11-18 - Added a new "cron" folder which contains a maintenance.php script. This script can be used on command line level for database maintenance. diff --git a/src/classes/logstreamdb.class.php b/src/classes/logstreamdb.class.php index 59a4e85..e8bb4be 100644 --- a/src/classes/logstreamdb.class.php +++ b/src/classes/logstreamdb.class.php @@ -1035,6 +1035,11 @@ class LogStreamDB extends LogStream { $iBegin++; } + // --- Check if results were found + if ( $iBegin == $this->_currentRecordNum ) + return ERROR_NOMORERECORDS; + // --- + // Free Query ressources mysql_free_result ($myquery); diff --git a/src/classes/logstreampdo.class.php b/src/classes/logstreampdo.class.php index 8c54411..5ad98f5 100644 --- a/src/classes/logstreampdo.class.php +++ b/src/classes/logstreampdo.class.php @@ -1065,6 +1065,11 @@ class LogStreamPDO extends LogStream { $iCount++; } + // --- Check if results were found + if ( $iBegin == $this->_currentRecordNum ) + return ERROR_NOMORERECORDS; + // --- + // return success state if reached this point! return SUCCESS; }