diff options
author | Andris Zeila <andris.zeila@zabbix.com> | 2021-09-30 13:48:35 +0300 |
---|---|---|
committer | Andris Zeila <andris.zeila@zabbix.com> | 2021-09-30 14:38:51 +0300 |
commit | e87e37c199b304f18f9a797cba196e07adcc0123 (patch) | |
tree | 5aa06bce2e4fc7b5c4710fe5c76270b7f555acd9 /include/zbxdb.h | |
parent | b8c62ea12496d88ac91e88b2f855f97ed3cb3f3e (diff) |
........S. [ZBXNEXT-6923] added table locking by locking record in other table
Diffstat (limited to 'include/zbxdb.h')
-rw-r--r-- | include/zbxdb.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/include/zbxdb.h b/include/zbxdb.h index 358fc2b18b2..0faf8bef5c6 100644 --- a/include/zbxdb.h +++ b/include/zbxdb.h @@ -90,6 +90,7 @@ int zbx_db_connect(char *host, char *user, char *password, char *dbname, char *d void zbx_db_close(void); int zbx_db_begin(void); +int zbx_db_begin_lock(const char *dbname, const char *fmt, va_list args); int zbx_db_commit(void); int zbx_db_rollback(void); int zbx_db_txn_level(void); @@ -223,14 +224,6 @@ int zbx_db_version_check(const char *database, zbx_uint32_t current_version, zbx void zbx_db_version_json_create(struct zbx_json *json, struct zbx_db_version_info_t *info); #if defined(HAVE_MYSQL) -# define ZBX_DB_LOCK_TABLE2(t1, t2) "lock tables " t1 " write," t2 " write" -#elif defined(HAVE_POSTGRESQL) -# define ZBX_DB_LOCK_TABLE2(t1, t2) "lock table " t1 "," t2 " in exclusive mode" -#else /* HAVE_ORACLE */ -# define ZBX_DB_LOCK_TABLE2(t1, t2) "lock table " t1 "," t2 " in exclusive mode" -#endif - -#if defined(HAVE_MYSQL) # define ZBX_DB_TIMESTAMP() "unix_timestamp()" #elif defined(HAVE_POSTGRESQL) # define ZBX_DB_TIMESTAMP() "cast(extract(epoch from now()) as int)" |