mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Fix crash in SchemaAllowedHandler.
This commit is contained in:
parent
2d33a4029b
commit
90dd31fef1
@ -21,15 +21,14 @@ namespace
|
|||||||
{
|
{
|
||||||
bool isSchemaAllowed(SQLHDBC hdbc)
|
bool isSchemaAllowed(SQLHDBC hdbc)
|
||||||
{
|
{
|
||||||
std::string identifier;
|
SQLUINTEGER value;
|
||||||
|
SQLSMALLINT value_length = sizeof(value);
|
||||||
SQLSMALLINT t;
|
SQLRETURN r = POCO_SQL_ODBC_CLASS::SQLGetInfo(hdbc, SQL_SCHEMA_USAGE, &value, sizeof(value), &value_length);
|
||||||
SQLRETURN r = POCO_SQL_ODBC_CLASS::SQLGetInfo(hdbc, SQL_SCHEMA_USAGE, nullptr, 0, &t);
|
|
||||||
|
|
||||||
if (POCO_SQL_ODBC_CLASS::Utility::isError(r))
|
if (POCO_SQL_ODBC_CLASS::Utility::isError(r))
|
||||||
throw POCO_SQL_ODBC_CLASS::ConnectionException(hdbc);
|
throw POCO_SQL_ODBC_CLASS::ConnectionException(hdbc);
|
||||||
|
|
||||||
return t != 0;
|
return value != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user