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
Describe the enhancement requested
When tests use a global connection, it is revealed that ODBC
flightsql-odbcbackend has a bug whereSQLGetInforeturns inconsistent values for these 3 attributes:SQL_CATALOG_LOCATIONSQL_DROP_TABLESQL_DROP_SCHEMATest case with
SQL_CATALOG_LOCATIONis reproducible on remote OS Dremio instance, and test casesSQL_DROP_TABLE, andSQL_DROP_SCHEMAare reproducible on mock serverCode to reproduce:
arrow/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc
Lines 584 to 589 in dbbf7cf
arrow/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc
Lines 710 to 715 in dbbf7cf
arrow/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc
Lines 717 to 722 in dbbf7cf
Parent issue: #30622
Component(s)
C++, FlightRPC