Skip to content

Commit

Permalink
[ZBX-20249] fixed escalator query failure on Oracle (ssimonenko)
Browse files Browse the repository at this point in the history
  • Loading branch information
CHERTS committed Dec 18, 2021
1 parent 6b21cb1 commit a8261ac
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Bug fixes:
........S. [ZBX-19872] removed redundant escaping in XML data of HTTP agent POST request (asestakovs)
...G...PS. [ZBX-20236] improved memory consumption in Zabbix proxy trappers by moving configuration sync between database and cache to configuration syncer; improved trappers and listeners memory consumption by freeing received data after it was processed instead of after new data is received (vso)
...G...... [ZBX-20192] fixed quote expansion in command execution in agent2 on windows (dgoloscapov)
........S. [ZBX-20249] fixed escalator query failure on Oracle (ssimonenko)

--------------------------------------------------------------------------------
Changes for 4.4.25
Expand Down
1 change: 1 addition & 0 deletions PATCHLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@
[ZBX-20176] fixed trigger not being calculated for first value when item changes state to supported; fixed build failure when DES is disabled in Net-SNMP; fixed tests on big-endian systems (https://support.zabbix.com/browse/ZBX-20076)
[ZBX-20192] fixed quote expansion in command execution in agent2 on windows (https://support.zabbix.com/browse/ZBX-20192)
[ZBX-20236] improved memory consumption in Zabbix proxy trappers by moving configuration sync between database and cache to configuration syncer; improved trappers and listeners memory consumption by freeing received data after it was processed instead of after new data is received (https://support.zabbix.com/browse/ZBX-20236)
[ZBX-20249] fixed escalator query failure on Oracle (https://support.zabbix.com/browse/ZBX-20249)
[ZBXNEXT-170] implemented possibility to "unlink" specific templates in hosts and templates massupdate (https://support.zabbix.com/browse/ZBXNEXT-170)
[ZBXNEXT-284] added timeout parameter to zabbix_sender and zabbix_get (https://support.zabbix.com/browse/ZBXNEXT-284)
[ZBXNEXT-435] Add Oracle TNSNAMES connect support (https://support.zabbix.com/browse/ZBXNEXT-435)
Expand Down
19 changes: 11 additions & 8 deletions src/zabbix_server/escalator/escalator.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,15 +621,18 @@ static void add_sentusers_msg_esc_cancel(ZBX_USER_MSG **user_msg, zbx_uint64_t a
zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);

zbx_snprintf_alloc(&sql, &sql_alloc, &sql_offset,
"select distinct userid,mediatypeid,subject,message,esc_step"
"select userid,mediatypeid,subject,message,esc_step"
" from alerts"
" where actionid=" ZBX_FS_UI64
" and mediatypeid is not null"
" and alerttype=%d"
" and acknowledgeid is null"
" and eventid=" ZBX_FS_UI64
" order by userid,mediatypeid,esc_step desc",
actionid, ALERT_TYPE_MESSAGE, event->eventid);
" where alertid in (select max(alertid)"
" from alerts"
" where actionid=" ZBX_FS_UI64
" and mediatypeid is not null"
" and alerttype=%d"
" and acknowledgeid is null"
" and eventid=" ZBX_FS_UI64
" group by userid,mediatypeid,esc_step)"
" order by userid,mediatypeid,esc_step desc",
actionid, ALERT_TYPE_MESSAGE, event->eventid);

result = DBselect("%s", sql);

Expand Down

0 comments on commit a8261ac

Please sign in to comment.