The limit you are seeing is simply an optimisation in the workbench to attempt to limit the number of rows returned from a large table.
When you are running a query from either the console or via code, there are no limits placed on the number or rows returned.
On that note though, it is normally good practise to either manually limit the number of rows returned or at least process the results a single row at a time. The reason is that if you try to get all the records at once you will have to assign that resultset as much memory as the entire set will use. If you process it one row at a time, you can re-use the same memory as you go.