Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for SQL_WLONGVARCHAR data type #211

Merged
merged 3 commits into from Mar 6, 2019

Conversation

2 participants
@mloskot
Copy link
Member

mloskot commented Feb 27, 2019

What does this PR do?

SQL Server, for example, reports

  • NTEXT as SQL_WLONGVARCHAR
  • TEXT as SQL_LONGVARCHAR

Formerly, SQL_WLONGVARCHAR(-10) column was only recognised by accident due to defined non-standard SQL_NVARCHAR(-10) constant but the implementation was broken:

  • SQLDescribeCol returns the column size of 1073741824 characters
  • The column was not recognised as large variable-length object
  • The column was also incorrectly recognised as SQLCHAR-based data
  • Binding would attempt to pre-allocate large buffer of size
    sizeof(SQLCHAR) * 1073741824

Removal of the non-standard SQL_NVARCHAR proposed in #210 - a requirement of this changeset.

What are related issues/pull requests?

Tasklist

@mloskot mloskot self-assigned this Feb 27, 2019

@mloskot mloskot requested a review from lexicalunit Feb 27, 2019

@mloskot mloskot added this to the 2.13 milestone Feb 27, 2019

@mloskot mloskot referenced this pull request Feb 27, 2019

Merged

Remove non-standard constant SQL_NVARCHAR #210

3 of 3 tasks complete

@mloskot mloskot force-pushed the mloskot:ml/add-support-for-sql-wlongvarchar branch from 61ae9a8 to d35e1ac Feb 27, 2019

Add support for SQL_WLONGVARCHAR data type
SQL Server, for example, reports
- `NTEXT` as `SQL_WLONGVARCHAR`
- `TEXT` as `SQL_LONGVARCHAR`

Formerly, `SQL_WLONGVARCHAR` column was only recognised by accident
due to defined non-standard `SQL_NVARCHAR(-10)` constant but the
implementation was broken:
- `SQLDescribeCol` returns the column size of 1073741824 characters
- The column was not recognised as large variable-length object
- The column was also incorrectly recognised as `SQLCHAR`-based data
- Binding would attempt to pre-allocate large buffer of size
  `sizeof(SQLCHAR) * 1073741824`

Removal of the non-standard `SQL_NVARCHAR` proposed
in #210 - a requirement of this changeset.

@mloskot mloskot force-pushed the mloskot:ml/add-support-for-sql-wlongvarchar branch from d35e1ac to 9ce22f8 Feb 27, 2019

mloskot added some commits Mar 6, 2019

@mloskot mloskot merged commit ca19a34 into nanodbc:master Mar 6, 2019

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@mloskot mloskot added this to Done in Release 2.13 via automation Mar 6, 2019

@mloskot mloskot deleted the mloskot:ml/add-support-for-sql-wlongvarchar branch Mar 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.