"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/libs/zbxdbupgrade/dbupgrade_4000.c" between
zabbix-5.4.2.tar.gz and zabbix-5.4.3.tar.gz

About: ZABBIX is an enterprise-class distributed monitoring solution for servers and applications.

dbupgrade_4000.c  (zabbix-5.4.2):dbupgrade_4000.c  (zabbix-5.4.3)
skipping to change at line 42 skipping to change at line 42
static int DBpatch_4000000(void) static int DBpatch_4000000(void)
{ {
return SUCCEED; return SUCCEED;
} }
static int DBpatch_4000001(void) static int DBpatch_4000001(void)
{ {
DB_RESULT result; DB_RESULT result;
int ret; int ret;
const char *fields[] = {"def_shortdata", "def_longdata", "r_shortdat zbx_field_len_t fields[] = {
a", "r_longdata", "ack_shortdata", {"def_shortdata", 0},
"ack_longdata"}; {"def_longdata", 0},
{"r_shortdata", 0},
{"r_longdata", 0},
{"ack_shortdata", 0},
{"ack_longdata", 0}
};
/* 0 - EVENT_SOURCE_TRIGGERS */ /* 0 - EVENT_SOURCE_TRIGGERS */
result = DBselect("select actionid,def_shortdata,def_longdata,r_shortdata ,r_longdata,ack_shortdata," result = DBselect("select actionid,def_shortdata,def_longdata,r_shortdata ,r_longdata,ack_shortdata,"
"ack_longdata from actions where eventsource=0"); "ack_longdata from actions where eventsource=0");
ret = db_rename_macro(result, "actions", "actionid", fields, ARRSIZE(fiel ds), "{TRIGGER.NAME}", ret = db_rename_macro(result, "actions", "actionid", fields, ARRSIZE(fiel ds), "{TRIGGER.NAME}",
"{EVENT.NAME}"); "{EVENT.NAME}");
DBfree_result(result); DBfree_result(result);
return ret; return ret;
} }
static int DBpatch_4000002(void) static int DBpatch_4000002(void)
{ {
DB_RESULT result; DB_RESULT result;
int ret; int ret;
const char *fields[] = {"subject", "message"}; zbx_field_len_t fields[] = {
{"subject", 0},
{"message", 0}
};
/* 0 - EVENT_SOURCE_TRIGGERS */ /* 0 - EVENT_SOURCE_TRIGGERS */
result = DBselect("select om.operationid,om.subject,om.message" result = DBselect("select om.operationid,om.subject,om.message"
" from opmessage om,operations o,actions a" " from opmessage om,operations o,actions a"
" where om.operationid=o.operationid" " where om.operationid=o.operationid"
" and o.actionid=a.actionid" " and o.actionid=a.actionid"
" and a.eventsource=0"); " and a.eventsource=0");
ret = db_rename_macro(result, "opmessage", "operationid", fields, ARRSIZE (fields), "{TRIGGER.NAME}", ret = db_rename_macro(result, "opmessage", "operationid", fields, ARRSIZE (fields), "{TRIGGER.NAME}",
"{EVENT.NAME}"); "{EVENT.NAME}");
DBfree_result(result); DBfree_result(result);
return ret; return ret;
} }
static int DBpatch_4000003(void) static int DBpatch_4000003(void)
{ {
DB_RESULT result; DB_RESULT result;
int ret; int ret;
const char *fields[] = {"command"}; zbx_field_len_t fields[] = {{"command", 0}};
/* 0 - EVENT_SOURCE_TRIGGERS */ /* 0 - EVENT_SOURCE_TRIGGERS */
result = DBselect("select oc.operationid,oc.command" result = DBselect("select oc.operationid,oc.command"
" from opcommand oc,operations o,actions a" " from opcommand oc,operations o,actions a"
" where oc.operationid=o.operationid" " where oc.operationid=o.operationid"
" and o.actionid=a.actionid" " and o.actionid=a.actionid"
" and a.eventsource=0"); " and a.eventsource=0");
ret = db_rename_macro(result, "opcommand", "operationid", fields, ARRSIZE (fields), "{TRIGGER.NAME}", ret = db_rename_macro(result, "opcommand", "operationid", fields, ARRSIZE (fields), "{TRIGGER.NAME}",
"{EVENT.NAME}"); "{EVENT.NAME}");
 End of changes. 3 change blocks. 
5 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)