summaryrefslogtreecommitdiffstats
path: root/include
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 /include
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 'include')
-rw-r--r--include/db.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/db.h b/include/db.h
index 7eb619be..0339a32a 100644
--- a/include/db.h
+++ b/include/db.h
@@ -121,6 +121,8 @@ extern int CONFIG_DBPORT;
#define ZBX_SQL_ITEM_SELECT "i.itemid,i.key_,h.host,h.port,i.delay,i.description,i.nextcheck,i.type,i.snmp_community,i.snmp_oid,h.useip,h.ip,i.history,i.lastvalue,i.prevvalue,i.hostid,h.status,i.value_type,h.errors_from,i.snmp_port,i.delta,i.prevorgvalue,i.lastclock,i.units,i.multiplier,i.snmpv3_securityname,i.snmpv3_securitylevel,i.snmpv3_authpassphrase,i.snmpv3_privpassphrase,i.formula,h.available,i.status,i.trapper_hosts,i.logtimefmt,i.valuemapid from hosts h, items i"
+#define ZBX_MAX_SQL_LEN 4096
+
DB_HOST
{
int hostid;
@@ -311,10 +313,12 @@ void DBconnect(void);
void DBclose(void);
void DBvacuum(void);
-int DBexecute( char *query );
+/*int DBexecute( char *query );*/
+int DBexecute(const char *fmt, ...);
/*long DBaffected_rows();*/
-DB_RESULT DBselect(char *query);
+/*DB_RESULT DBselect(char *query);*/
+DB_RESULT DBselect(const char *fmt, ...);
DB_RESULT DBselectN(char *query, int n);
DB_ROW DBfetch(DB_RESULT result);
/*char *DBget_field(DB_RESULT result, int rownum, int fieldnum);*/