Bug #108452 SQLGetData returns SQL_SUCCESS_WITH_INFO for bit columns
Submitted: 9 Sep 2022 16:33 Modified: 8 Nov 2022 5:06
Reporter: Mingwei Liu Email Updates:
Status: Analyzing Impact on me:
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:8.0.30 OS:Windows (11)
Assigned to: MySQL Verification Team CPU Architecture:Any (64)

[9 Sep 2022 16:33] Mingwei Liu
SQLGetData now will return SQL_SUCCESS_WITH_INFO instead of SQL_SUCCESS for bit columns if BufferLength is set to 0. Not sure if this is a bug or on purpose.

How to repeat:
Step 1: Generate data using following code:

CREATE SCHEMA `mytestdb1`;
CREATE TABLE `mytestdb1`.`mytesttable1` (
  `myint1` INT NOT NULL,
  `mybit1` BIT(1) NOT NULL,
  PRIMARY KEY (`myint1`));
INSERT INTO `mytestdb1`.`mytesttable1` (`myint1`, `mybit1`) VALUES ('1', 0);
INSERT INTO `mytestdb1`.`mytesttable1` (`myint1`, `mybit1`) VALUES ('2', 1);

Step 2: Using query

SELECT mybit1 FROM mytestdb1.mytesttable1

Then SQLExecDirect, SQLFetch, and SQLGetData with TargetType = SQL_C_BIT and BufferLength = 0.

SQLGetData will return SQL_SUCCESS_WITH_INFO in 8.0.30. In 8.0.11 it returns SQL_SUCCESS.
[7 Nov 2022 10:55] MySQL Verification Team
Hello Mingwei Liu,

Thank you for the bug report.
Could you please provide repeatable test case (code, sample project, etc. - please make it as private if you prefer) to confirm this issue at our end?

Ashwini Patil