Fix #2306: Aggregate cursor usage
Merge pull request #2542 from changyy/master

Fix #2306: Aggregate cursor usage