[CONJ-956] ArrayIndexOutOfBoundsException when alias length > 250 Created: 2022-04-08 Updated: 2022-05-13 Resolved: 2022-04-11 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | 3.0.4 |
| Fix Version/s: | 3.0.5 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Brent Levinson | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
java.lang.ArrayIndexOutOfBoundsException: 365 Is this related to |
| Comments |
| Comment by Brent Levinson [ 2022-04-08 ] | |||||||||||||||
|
I have been trying random SQL work arounds, but only leads to minor shifts in the exception. See below: java.lang.ArrayIndexOutOfBoundsException: 255 | |||||||||||||||
| Comment by Diego Dupin [ 2022-04-11 ] | |||||||||||||||
|
Could you help giving some additional info, to try to reproduced the issue ? like:
| |||||||||||||||
| Comment by Brent Levinson [ 2022-04-11 ] | |||||||||||||||
|
This is a query against MariaDB 10.5.7 | |||||||||||||||
| Comment by Diego Dupin [ 2022-04-11 ] | |||||||||||||||
|
I would seem more a server issue than connectors. | |||||||||||||||
| Comment by Brent Levinson [ 2022-04-11 ] | |||||||||||||||
|
How can it be a server issue when the MySQL connector works, but the MariaDB connector does not? | |||||||||||||||
| Comment by Brent Levinson [ 2022-04-11 ] | |||||||||||||||
|
Thank you, I appreciate your research. I have looking at Wireshark results and not seeing anything. Our test of the 2.7 driver was unsuccessful because it has other limitations that prevent us from using it. Does that mean we could restructure our SQL and provide an alias to the sub-selects as a work around? Or is their a configuration on the MariaDB server to limit the size of server generated aliases? | |||||||||||||||
| Comment by Diego Dupin [ 2022-04-11 ] | |||||||||||||||
|
Aliases are limited to 256 characters. Aliases value are length encoded, and current implementation was expecting only 1 or 3 bytes length encoded prefix. Some queries might return a 9 byte length prefix even for a 251 length alias. This will be corrected in next release | |||||||||||||||
| Comment by Diego Dupin [ 2022-04-11 ] | |||||||||||||||
|
Correction is available using snapshot:
|