mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 03:09:21 +02:00
The RowCount Function is now only used with MYSQL, PGSQL and MSSQL in PDO LogStream Driver
Other PDO Drivers may not support the function properly and always return 0 like Oracle PDO Driver. So the check will not be done in this case.
This commit is contained in:
parent
4f500e16e6
commit
973880713e
@ -1495,9 +1495,15 @@ class LogStreamPDO extends LogStream {
|
||||
if ( ($res = $this->CreateMainSQLQuery($uID)) != SUCCESS )
|
||||
return $res;
|
||||
|
||||
// return specially with NO RECORDS when 0 records are returned! Otherwise it will be -1
|
||||
if ( $this->_myDBQuery->rowCount() == 0 )
|
||||
return ERROR_NOMORERECORDS;
|
||||
// Check rowcount property only on supported drivers, others may always return 0 like oracle PDO Driver
|
||||
if ( $this->_logStreamConfigObj->DBType == DB_MYSQL ||
|
||||
$this->_logStreamConfigObj->DBType == DB_MSSQL ||
|
||||
$this->_logStreamConfigObj->DBType == DB_PGSQL )
|
||||
{
|
||||
// return specially with NO RECORDS when 0 records are returned! Otherwise it will be -1
|
||||
if ( $this->_myDBQuery->rowCount() == 0 )
|
||||
return ERROR_NOMORERECORDS;
|
||||
}
|
||||
|
||||
// Copy rows into the buffer!
|
||||
$iBegin = $this->_currentRecordNum;
|
||||
|
Loading…
x
Reference in New Issue
Block a user