PDIO-446 Fix query all events with limit=-1