Leave length/indicator untouched on out-of-range overflow (follow-up to #210) - #211
Conversation
…eview) On the SQL_ERROR path for a numeric-out-of-range conversion the data buffer is left untouched; skip writing the length/indicator too, for symmetry. Within spec either way (buffer/indicator undefined after SQL_ERROR), per review feedback on #210.
|
Verified the follow-up on its merge commit (d747b18) side by side with #210's (4a5a0e7), both built from a fresh clone in a clean Ubuntu 24.04 container against libpq 16.15 and unixODBC 2.3.12, running the program from #207 extended with the
So the C-type size is gone from the indicator on the error rows, on The driver these two reports came out of, adbcBridge, reads |
Follow-up to #210 (merged), addressing the review note on that PR: on the out-of-range
SQL_ERRORpath the data buffer is left untouched, but the length/indicator was still set to the C type's size (4 or 2).This skips the length/indicator write when the conversion overflows (
result == COPY_RESULT_OVERFLOW), for symmetry with the untouched data buffer. Within spec either way (buffer and indicator are undefined afterSQL_ERROR).Verified on PostgreSQL 18:
int-overflowandresult-conversionstests still pass; error rows no longer report the C-type size in the indicator.