Bug #119045 MySQL Workbench crash: “Index out of range” when running SELECT with JOIN and LIMIT
Submitted: 19 Sep 17:28
Reporter: Hemavarshini J P Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:8.0.44 OS:Windows (11)
Assigned to: CPU Architecture:Any

[19 Sep 17:28] Hemavarshini J P
Description:
MySQL Workbench encounters an Unexpected Error with the message:

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

This happens when running a standard SELECT query with JOIN, GROUP BY, ORDER BY, and LIMIT. 
The query executes successfully and returns results, but Workbench crashes with the error popup 
when displaying the result set.

How to repeat:
1. Open MySQL Workbench.
2. Connect to database.
3. Run a SELECT query with JOIN, GROUP BY, ORDER BY, and LIMIT (see example below).
4. Workbench executes but shows an "Index out of range" error after displaying results.

Suggested fix:
Ensure Workbench handles result grid rendering correctly when queries return small result sets with LIMIT.
The query itself runs fine on MySQL server, so this looks like a Workbench UI bug rather than a SQL error.
Possible fix: add a safeguard to prevent index-out-of-range exception in the result grid handler.