Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions