Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions plugins/newsql/newsql.c
Original file line number Diff line number Diff line change
Expand Up @@ -1406,6 +1406,13 @@ static int newsql_get_snapshot(struct sqlclntstate *clnt, int *file,
*file = sqlquery->snapshot_info->file;
*offset = sqlquery->snapshot_info->offset;
}
/* On ha-retry, statements after BEGIN (e.g. INSERT) carry no
* snapshot_info in their sqlquery. Fall back to the snapshot stored
* on the clnt during BEGIN handling, just as fill_snapinfo does. */
if (*file == 0 && clnt->is_hasql_retry && clnt->snapshot_file) {
*file = clnt->snapshot_file;
*offset = clnt->snapshot_offset;
}
return 0;
}

Expand Down
Loading