summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-02-15 09:22:15 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-02-15 09:22:15 +0000
commit72a50be21259abb76b212d9d6b9cd473e871ddda (patch)
treed328171f4e9d60e1efea31805415904141ad54a9 /include
parent49544e4ca878565fb808f5582d0fa99854021b59 (diff)
- fixed compilation of --with-pgsql on non-GCC platforms (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1259 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'include')
-rw-r--r--include/db.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/db.c b/include/db.c
index b4ac0f93..d6fd34b0 100644
--- a/include/db.c
+++ b/include/db.c
@@ -123,9 +123,9 @@ extern char *CONFIG_DBSOCKET;*/
*/
int DBexecute(char *query)
{
-/* zabbix_set_log_level(LOG_LEVEL_DEBUG);*/
- zabbix_log( LOG_LEVEL_DEBUG, "Executing query:%s",query);
+/* Do not include any code here. Will break HAVE_PGSQL section */
#ifdef HAVE_MYSQL
+ zabbix_log( LOG_LEVEL_DEBUG, "Executing query:%s",query);
while( mysql_query(&mysql,query) != 0)
{
zabbix_log( LOG_LEVEL_ERR, "Query::%s",query);
@@ -140,6 +140,7 @@ int DBexecute(char *query)
#ifdef HAVE_PGSQL
PGresult *result;
+ zabbix_log( LOG_LEVEL_DEBUG, "Executing query:%s",query);
result = PQexec(conn,query);
if( result==NULL)
@@ -168,9 +169,9 @@ int DBexecute(char *query)
*/
DB_RESULT *DBselect(char *query)
{
-/* zabbix_set_log_level(LOG_LEVEL_DEBUG);*/
- zabbix_log( LOG_LEVEL_DEBUG, "Executing query:%s",query);
+/* Do not include any code here. Will break HAVE_PGSQL section */
#ifdef HAVE_MYSQL
+ zabbix_log( LOG_LEVEL_DEBUG, "Executing query:%s",query);
while(mysql_query(&mysql,query) != 0)
{
zabbix_log( LOG_LEVEL_ERR, "Query::%s",query);
@@ -187,6 +188,7 @@ DB_RESULT *DBselect(char *query)
#ifdef HAVE_PGSQL
PGresult *result;
+ zabbix_log( LOG_LEVEL_DEBUG, "Executing query:%s",query);
result = PQexec(conn,query);
if( result==NULL)
@@ -1099,7 +1101,6 @@ int DBadd_alert(int actionid, int mediatypeid, char *sendto, char *subject, char
void DBvacuum(void)
{
-
#ifdef HAVE_PGSQL
char *table_for_housekeeping[]={"services", "services_links", "graphs_items", "graphs", "sysmaps_links",
"sysmaps_hosts", "sysmaps", "config", "groups", "hosts_groups", "alerts",