[R2DBC-76] Wrong MEDIUM binary decoding Created: 2022-12-25 Updated: 2023-03-16 Resolved: 2023-01-05 |
|
| Status: | Closed |
| Project: | MariaDB Connector/R2DBC |
| Component/s: | protocol |
| Affects Version/s: | 1.1.2, 1.1.3 |
| Fix Version/s: | 1.1.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sridhar Iyer | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 0.5d | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
When I try to save any entity it works fine and the entity gets saved to the database. When the entity is retrieved using ReactiveCrudRepository it throws MappingException with the latest version of r2dbc-mariadb. Logs attached. _mariadb version 10.10 |
| Comments |
| Comment by Diego Dupin [ 2023-01-04 ] | ||||||||||||||||
|
There seems to be some decoding position error. I've not been able to reproduced the issue for now. | ||||||||||||||||
| Comment by Diego Dupin [ 2023-01-04 ] | ||||||||||||||||
|
In case logs cannot be enable, query and table(s) DDL would help, because LocalDate decoder is accurate, so i wonder if that can be a wrong position due to previous value wrong decoding | ||||||||||||||||
| Comment by Sridhar Iyer [ 2023-01-04 ] | ||||||||||||||||
|
Thanks Deigo. I have attached the trace log (error_trace.txt). | ||||||||||||||||
| Comment by Diego Dupin [ 2023-01-05 ] | ||||||||||||||||
|
ok, thanks for logs, that has permit to identify the issue. problem is after reading a MEDIUM value driver leave a resultset pointer in a bad shape : MEDIUM are encoded on 3 bytes server side, but protocol send them in 4 bytes in exchange when using binary protocol. this is corrected with https://github.com/mariadb-corporation/mariadb-connector-r2dbc/commit/08b3e06011c7274fe5a6325e5a15e12cf1f38c0f
|