- Fixed typo with ADODB result set introduced in previous revision.

- For PollD_MP run getServerVersion() only once every polling inter-
  val, not for every query.
This commit is contained in:
Frank Fegert 2009-07-12 19:33:28 +00:00
parent 97afaa73a6
commit 414af8a1eb
2 changed files with 5 additions and 3 deletions

View File

@ -258,7 +258,7 @@ class ADOdb {
$recordArray = array();
$this->conn->SetFetchMode(ADODB_FETCH_ASSOC);
try {
$recordSet = $this->conn->Execute($sql);
$recordSet = &$this->conn->Execute($sql);
} catch (exception $e) {
$this->writeMSG(adodb_backtrace($e->gettrace()));
exit;

View File

@ -695,6 +695,7 @@ class PollD {
class PollD_MP {
var $cfg;
var $servers;
var $queries;
var $lastrun;
var $overviewqueries;
@ -908,6 +909,7 @@ class PollD_MP {
$servers = array();
while (list ($key, $val) = each ($rows)) {
$servers[$val["servername"]] = (array)$val;
$servers[$val["servername"]]["version"] = $this->getServerVersion($val);
}
return $servers;
}
@ -1141,7 +1143,7 @@ class PollD_MP {
$starttquery = time();
$querytime = 0;
$version = $this->getServerVersion($server["servername"]);
$version = $this->servers[$server]["version"];
$logprefix = "Worker(".$this->child_pid.") ".sprintf('%-16s', $server)." ---------".$query["name"];
$tablename = "res_".$query["name"]."_".$server;
@ -1214,7 +1216,7 @@ class PollD_MP {
$starttquery = time();
$querytime = 0;
$version = $this->getServerVersion($server["servername"]);
$version = $this->servers[$server]["version"];
$tablename = "res_overview_".$server;
$logprefix = "Worker(".$this->child_pid.") ".sprintf('%-16s', $server)." ---------".$query["name"];