diff --git a/ChangeLog b/ChangeLog index aad450a6..2e242c80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/PATCHLIST.md b/PATCHLIST.md index 2276cbc6..31c38a3b 100644 --- a/PATCHLIST.md +++ b/PATCHLIST.md @@ -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) diff --git a/src/zabbix_server/escalator/escalator.c b/src/zabbix_server/escalator/escalator.c index 5c8c9d10..82b24011 100644 --- a/src/zabbix_server/escalator/escalator.c +++ b/src/zabbix_server/escalator/escalator.c @@ -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);