Skip to content

[C++][FlightRPC][ODBC] Fix inconsistent values in SQLGetInfo in global connection #49482

@alinaliBQ

Description

@alinaliBQ

Describe the enhancement requested

When tests use a global connection, it is revealed that ODBC flightsql-odbc backend has a bug where SQLGetInfo returns inconsistent values for these 3 attributes:

  • SQL_CATALOG_LOCATION
  • SQL_DROP_TABLE
  • SQL_DROP_SCHEMA

Test case with SQL_CATALOG_LOCATION is reproducible on remote OS Dremio instance, and test cases SQL_DROP_TABLE, and SQL_DROP_SCHEMA are reproducible on mock server

Code to reproduce:

TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoCatalogLocation) {
SQLUSMALLINT value;
GetInfo(this->conn, SQL_CATALOG_LOCATION, &value);
EXPECT_EQ(static_cast<SQLUSMALLINT>(0), value);
}

TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropSchema) {
SQLUINTEGER value;
GetInfo(this->conn, SQL_DROP_SCHEMA, &value);
EXPECT_EQ(static_cast<SQLUINTEGER>(0), value);
}

TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropTable) {
SQLUINTEGER value;
GetInfo(this->conn, SQL_DROP_TABLE, &value);
EXPECT_EQ(static_cast<SQLUINTEGER>(0), value);
}

Parent issue: #30622

Component(s)

C++, FlightRPC

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions