elastic / elasticsearch-sql-odbc

ODBC driver for Elasticsearch SQL
Other
0 stars 30 forks source link

Fixes: correct check on truncation failure. Reinit IRD on statement closing. Logging format descriptors #170

Closed bpintea closed 5 years ago

bpintea commented 5 years ago

This PR bundles a few minor fixes:

  1. A check on conversion failure was incorrectly taking into account the result of a previous column conversion on the same row. The defect was without practical implications, since a second, impossible condition would have had to match to lead to an incorrect failure. However the incorrect first check lead to a failing assertion.

  2. The IRD descriptor was not re-init'd on statement handle closing. This defect is fixed just for good house-keeping, since the descriptor would be re-init'd on attaching a new result set to it (which happens regularly when the result for a query is being paged / using a cursor). Along with this, some code duplication has been removed.

  3. A few logging statements had the wrong format specifiers, mostly expecting signed, instead of the correct unsigned types of the integer variants.