Skip to content

Error when fetching data with empty values #205

@adolfo-ubs

Description

@adolfo-ubs

When you make a query in Linux (also in Docker containers), if any value from the fetched data contains an empty string value, an error happens:

python: /workspace/mssql_python/pybind/ddbc_bindings.cpp:2004: SQLRETURN FetchBatchData(SQLHSTMT, ColumnBuffers&, pybind11::list&, pybind11::list&, SQLUSMALLINT, SQLULEN&): Assertion `dataLen > 0 && "Must be > 0 since SQL_NULL_DATA & SQL_NO_DATA is already handled"' failed.
Abortado

If you execute the query "SELECT '' test_colum from mytable" error can be reproduced as it also returns empty string

The error doesn't appear on Windows

Further technical details

Python version: 3.12
Tried Ubuntu 24.04, SUSE SLES 15 and Docker container. Same error on all of them

Metadata

Metadata

Assignees

Labels

Triage DoneIssues that are triaged by dev team and are in investigation.bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions