diff options
| author | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-07-04 11:27:27 +0000 |
|---|---|---|
| committer | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-07-04 11:27:27 +0000 |
| commit | 87284087f0b676cf85589eab268bfd69d290f968 (patch) | |
| tree | 23b2ca8aafd331565358aa21f9582e6adb0fc723 /src/libs | |
| parent | 621b3e8d4771f21e4ac620f957abdb5dc8573fd6 (diff) | |
| download | zabbix-87284087f0b676cf85589eab268bfd69d290f968.tar.gz zabbix-87284087f0b676cf85589eab268bfd69d290f968.tar.xz zabbix-87284087f0b676cf85589eab268bfd69d290f968.zip | |
- added server-side transactions for PostgreSQL (Alexei)
- fixed housekeeper to run as multiple transations (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@4425 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/libs')
| -rw-r--r-- | src/libs/zbxdb/db.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/libs/zbxdb/db.c b/src/libs/zbxdb/db.c index 96934207..a1cc71aa 100644 --- a/src/libs/zbxdb/db.c +++ b/src/libs/zbxdb/db.c @@ -244,6 +244,9 @@ void zbx_db_begin(void) #ifdef HAVE_MYSQL zbx_db_execute("%s","begin;"); #endif +#ifdef HAVE_POSTGRESQL + zbx_db_execute("%s","begin;"); +#endif #ifdef HAVE_SQLITE3 sqlite_transaction_started++; @@ -251,7 +254,7 @@ void zbx_db_begin(void) { php_sem_acquire(&sqlite_access); - zbx_db_execute("begin;"); + zbx_db_execute("%s","begin;"); } else { @@ -278,7 +281,10 @@ void zbx_db_begin(void) void zbx_db_commit(void) { #ifdef HAVE_MYSQL - zbx_db_execute("commit;"); + zbx_db_execute("%s","commit;"); +#endif +#ifdef HAVE_POSTGRESQL + zbx_db_execute("%s","commit;"); #endif #ifdef HAVE_SQLITE3 @@ -289,7 +295,7 @@ void zbx_db_commit(void) if(sqlite_transaction_started == 1) { - zbx_db_execute("commit;"); + zbx_db_execute("%s","commit;"); sqlite_transaction_started = 0; @@ -319,6 +325,9 @@ void zbx_db_rollback(void) #ifdef HAVE_MYSQL zbx_db_execute("rollback;"); #endif +#ifdef HAVE_POSTGRESQL + zbx_db_execute("rollback;"); +#endif #ifdef HAVE_SQLITE3 if(sqlite_transaction_started > 1) |
