Don't call UNIX_TIMESTAMP when sorting by host_last_state_change
Else possible indices can't be used.
This commit is contained in:
parent
3a1afb3511
commit
e7776d08a9
|
@ -78,6 +78,7 @@ class HoststatusQuery extends IdoQuery
|
|||
'host_last_hard_state_change' => 'UNIX_TIMESTAMP(hs.last_hard_state_change)',
|
||||
'host_last_notification' => 'UNIX_TIMESTAMP(hs.last_notification)',
|
||||
'host_last_state_change' => 'UNIX_TIMESTAMP(hs.last_state_change)',
|
||||
'host_last_state_change_ts' => 'hs.last_state_change',
|
||||
'host_last_time_down' => 'UNIX_TIMESTAMP(hs.last_time_down)',
|
||||
'host_last_time_unreachable' => 'UNIX_TIMESTAMP(hs.last_time_unreachable)',
|
||||
'host_last_time_up' => 'UNIX_TIMESTAMP(hs.last_time_up)',
|
||||
|
|
|
@ -40,6 +40,7 @@ class HostStatus extends DataView
|
|||
'host_last_check',
|
||||
'host_last_notification',
|
||||
'host_last_state_change',
|
||||
'host_last_state_change_ts',
|
||||
'host_long_output',
|
||||
'host_max_check_attempts',
|
||||
'host_modified_host_attributes',
|
||||
|
@ -119,6 +120,9 @@ class HostStatus extends DataView
|
|||
'order' => self::SORT_ASC
|
||||
),
|
||||
'host_last_state_change' => array(
|
||||
'columns' => array(
|
||||
'host_last_state_change_ts'
|
||||
),
|
||||
'order' => self::SORT_DESC
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue