Juan Hernandez has posted comments on this change.

Change subject: core: added default sorting of the audit log events
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/36885/1/packaging/dbscripts/audit_log_sp.sql
File packaging/dbscripts/audit_log_sp.sql:

Line 154:                                    WHERE pv.user_id = v_user_id AND 
pv.entity_id = a.storage_domain_id AND pv.entity_id = dpv.entity_id)
Line 155:                         OR EXISTS (SELECT 1
Line 156:                                    FROM 
user_vds_groups_permissions_view pv, user_object_permissions_view dpv
Line 157:                                    WHERE pv.user_id = v_user_id AND 
pv.entity_id = a.vds_group_id AND pv.entity_id = dpv.entity_id)
Line 158:      ) order by log_time desc;
Times and dates can go backwards (when the date of the machine is adjusted). 
Can't we just order by the audit_log_id column? That is generated from a 
sequence, and thus can't (in theory) go backwards.
Line 159: END; $procedure$
Line 160: LANGUAGE plpgsql;
Line 161: 
Line 162: Create or replace FUNCTION GetAuditLogByAuditLogId(v_audit_log_id 
INTEGER) RETURNS SETOF audit_log STABLE


-- 
To view, visit http://gerrit.ovirt.org/36885
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3d768a23c758f4d52f9f563a2e339873f451c9e4
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjeli...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to