Ingest counts duplicates as accepted on MariaDB #10

Closed
opened 2026-11-25 22:03:11 +00:00 by jonasled · 0 comments
Owner

Resending an event with a known id returns accepted: 1 on MariaDB (SQLite returns 0). Data is correct: the event is stored only once.

Cause: on MariaDB the Gorm MySQL driver appends RETURNING id to INSERT ... ON DUPLICATE KEY UPDATE, which also returns the existing row, so it is counted in RowsAffected.

Resending an event with a known `id` returns `accepted: 1` on MariaDB (SQLite returns 0). Data is correct: the event is stored only once. Cause: on MariaDB the Gorm MySQL driver appends `RETURNING id` to `INSERT ... ON DUPLICATE KEY UPDATE`, which also returns the existing row, so it is counted in `RowsAffected`.
Sign in to join this conversation.
No labels
bug
feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jonasled/tokentracker#10
No description provided.