[ODBC-45] Error binding boolean data type to SQL_C_CHAR Created: 2016-07-13  Updated: 2021-03-05  Resolved: 2018-11-04

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: General
Affects Version/s: 2.0.11
Fix Version/s: 2.0.12

Type: Bug Priority: Major
Reporter: Danniel Corbit Assignee: Lawrin Novitsky
Resolution: Fixed Votes: 0
Labels: None
Environment:

Windows Server 2012 R2 Standard 6.3.9600 Build 9600
Both 32 and 64 bit drivers have the same behavior.


Attachments: File bugg-binaries.7z     File bugg.7z    

 Description   

The attached program accepts 3 parameters:

1. The ODBC DSN
2. The database user name
3. The database password

It then connects to the database, creates a simple table that has a bool and attempts to bind and populate.
You will see that the only binding failure is SQL_C_CHAR.
The exact error message is:
check_error> SQL_ERROR
return code = -1 reported from file: bugg.cpp, line: 232
SQLSTATE: 22001
Native Error Code: 1406
buffer: [ma-2.0.11][5.7.12-log]Data too long for column 'x' at row 1



 Comments   
Comment by Lawrin Novitsky [ 2016-09-13 ]

Partial fix for the bug has been pushed and will be part of coming release.
The patch fixes only SQL_C_CHAR string parameter case, and not SQL_C_WCHAR. Also it is more permissive for parameter values, than specs suggest. i.e. by specs it should be "0" or "1", and errors should be set for other values.

Comment by Lawrin Novitsky [ 2018-11-04 ]

The exact reported issue has been fixed, for adjacent (possible) issues the new ticket has been opened(195)

Generated at Thu Feb 08 03:25:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.