[CONJ-887] Current position is after the last row Created: 2021-06-08 Updated: 2021-07-02 Resolved: 2021-07-02 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | aurora |
| Affects Version/s: | 2.6.2 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Björn Raupach | Assignee: | Diego Dupin |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
AWS Aurora MySQL 5.6 |
||
| Description |
|
Hi there, not really a bug but this looks like the best place to ask and I am a bit lost. I am regulary seeing a "Current position is after the last row" SQLException in my production logs. I have no idea why they happen and I am unable to reproduce the error on my local machine. In addition, this exception does not happen every time. Just a small fraction within thousands of other statements that do work. Unfortunately reading the source code didn't help me much either. I know why the error happens, but I don't understand why this situation even occurs. rowPointer >= dataSize should never happen. Here are the steps I do in production
In summary I do a insert row if it doesn't exist otherwise I might update the row. Any ideas how to narrow this one down? |
| Comments |
| Comment by Diego Dupin [ 2021-06-29 ] | |||||||
|
Having the complete stackTrace would help narrowing issue at least The only way i see to get this kind of error is moving during insert.
moving cursor with methods like next, absolute, ... after moveToInsertRow(), but before insertRow() might result in that kind of state. | |||||||
| Comment by Björn Raupach [ 2021-06-30 ] | |||||||
|
Hi Diego, apologies. I don't think there is an issue with the driver. It looks like just some programming bug. There was no check wether or not rs.next() does actually return true. It was just assumed. Hence the error message. Again, I am very sorry. Not a bug. Please close this issue. | |||||||
| Comment by Diego Dupin [ 2021-07-02 ] | |||||||
|
better this way |