summaryrefslogtreecommitdiffstats
path: root/src/zabbix_server/timer/timer.c
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-07-13 07:55:39 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-07-13 07:55:39 +0000
commit697332fe6532254a7c9125aefdfd3a68dda2a6f1 (patch)
treeb112002e78f9998589ee8885bad6a4f9655c6834 /src/zabbix_server/timer/timer.c
parent8990a1cb4b4245d01e93e7fd9cc0825348e7ef56 (diff)
- new more efficient definition of function DBexecute() (Alexei)
- new more efficient definition of function DBselect() (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@3042 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/zabbix_server/timer/timer.c')
-rw-r--r--src/zabbix_server/timer/timer.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/zabbix_server/timer/timer.c b/src/zabbix_server/timer/timer.c
index 648bd6eb..04c77d6c 100644
--- a/src/zabbix_server/timer/timer.c
+++ b/src/zabbix_server/timer/timer.c
@@ -63,7 +63,6 @@ extern void update_functions(DB_ITEM *item);
******************************************************************************/
void main_timer_loop()
{
- char sql[MAX_STRING_LEN];
int now;
/* int itemid,functionid;
@@ -90,9 +89,7 @@ void main_timer_loop()
#endif
*/
- zbx_snprintf(sql,sizeof(sql),"select distinct %s, functions f where h.hostid=i.hostid and h.status=%d and i.status=%d and f.function in ('nodata','date','dayofweek','time','now') and i.itemid=f.itemid", ZBX_SQL_ITEM_SELECT, HOST_STATUS_MONITORED, ITEM_STATUS_ACTIVE);
-
- result = DBselect(sql);
+ result = DBselect("select distinct %s, functions f where h.hostid=i.hostid and h.status=%d and i.status=%d and f.function in ('nodata','date','dayofweek','time','now') and i.itemid=f.itemid", ZBX_SQL_ITEM_SELECT, HOST_STATUS_MONITORED, ITEM_STATUS_ACTIVE);
while((row=DBfetch(result)))
{