[MXS-3299] Parse error when connecting (through binlog router) from mysql-connector-j Created: 2020-11-15 Updated: 2021-08-13 Resolved: 2021-08-06 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | binlogrouter |
| Affects Version/s: | 2.5 |
| Fix Version/s: | 2.5.15 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Ben Osheroff | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Sprint: | MXS-SPRINT-137 |
| Description |
|
(from https://groups.google.com/g/maxscale/c/ngEIt4yDJEY) I've traced this down to a problem parsing the sql (in Pinkloki session). The sql that triggers the error:
|
| Comments |
| Comment by markus makela [ 2021-08-02 ] | ||||||||||||||||||||||
|
The reason seems to be the lack of alias support in the binlogrouter. | ||||||||||||||||||||||
| Comment by markus makela [ 2021-08-02 ] | ||||||||||||||||||||||
|
Adding the support for aliases in the parser isn't very complex but making it behave like MariaDB does would be more work. With minimal changes to add support for it, the query in the issue description would produce the following output:
osheroff would you know if this be adequate for your purposes? | ||||||||||||||||||||||
| Comment by markus makela [ 2021-08-03 ] | ||||||||||||||||||||||
|
Another way to deal with this would be to just add some code that substitutes some known variables with some constant values. The values themselves could be the defaults from some MariaDB version. | ||||||||||||||||||||||
| Comment by markus makela [ 2021-08-03 ] | ||||||||||||||||||||||
|
Added in support for field aliases and constant values for the following variables:
|