aws / amazon-redshift-odbc-driver

Apache License 2.0
18 stars 7 forks source link

SQLColumnsW will sometimes return "smallint out of range" error #25

Open jkoskela opened 2 months ago

jkoskela commented 2 months ago

Driver version

2.1.2

Redshift version

1.0.71629

Client Operating System

RHEL 9

Table schema

Can't share that here, I can share through direct channel.

Problem description

  1. Expected behaviour: SQLColumnsW returns column metadata without an error
  2. Actual behaviour: SQLColumnsW returns and error
  3. Error message/stack trace: "smallint out of range"
  4. Any other details that can be helpful: This occurs for a customer of ours, and I don't have an internal repro for this issue yet They are connecting to a complex view. I have the DDL, but don't have the base tables to setup a repro.

sqlstate: 22003 native error: 0

ODBC trace logs

Will send via other channel.

Reproduction code

I don't have a repro yet. Will try to get one.

vahid110 commented 1 month ago

Hey @jkoskela,

Thanks for flagging this issue! However, It might be a bit difficult to guess without reproducing.

We recently fixed a similar problem where the app expected a small int for a specific column, but the driver returned a regular int. Our team has already addressed this, and the fix will be in the next release.

Although this is not guaranteed to be the exact issue you are referring to, but given the situation, it'd be great if you could test it out once the new version is available. If you're still having trouble after that, just give us a shout, and we'll be happy to help!

jkoskela commented 1 month ago

We don't have a repro, but our common customers have a repro. There is a bug open with Amazon about it. I will try to relay the information to them to test it.