Not so much a total fix, just extending the limit to 99999 rows
Created attachment 3592 [details] [review] Proposed Patch
This bug is mentioned in: Bug 6028 : MT3815: Quickfix for CSV export (9999 rows limitation) http://lists.koha-community.org/pipermail/koha-patches/2011-March/014415.html
Pushed, please test
*** Bug 5638 has been marked as a duplicate of this bug. ***
There have been no further reports of problems so I am marking this bug resolved.