Closed tonodor closed 11 months ago
@tonodor thanks for the fix.
Looks reasonable.
Is it possible to add test that is fixed by this bug?
Alex
In my case it was happening on a Linux system connecting to Hadoop using Cloudera Impala ODBC driver. I can't replicate it with MySQL, SQL Server or Postgres so it's likely due to the driver that is not checking if the pointer is valid before using it. I can't find any reference that states if the parameter is optional or not, however, passing a valid pointer is probably better.
In my case it was happening on a Linux system connecting to Hadoop using Cloudera Impala ODBC driver. I can't replicate it with MySQL, SQL Server or Postgres so it's likely due to the driver that is not checking if the pointer is valid before using it. I can't find any reference that states if the parameter is optional or not, however, passing a valid pointer is probably better.
Thanks for explaining.
The bug is in github.com/alexbrainman/odbc so you change is valid.
I just merged your your change. So closing this PR.
Alex
This fixed #184 for me. api.SQLGetDiagRec is expecting a pointer to a smallint to store the message length but the current implementation passes a nil.