Rename setting and description for MySQL compatible types

This renames the setting for MySQL compatible types from output_format_mysql_types to use_mysql_types_in_show_columns
This commit is contained in:
tpanetti 2023-06-10 08:35:51 -07:00
parent 5769d7feca
commit cb8c20722b
3 changed files with 4 additions and 4 deletions

View File

@ -196,7 +196,7 @@ class IColumn;
M(Bool, allow_experimental_inverted_index, false, "If it is set to true, allow to use experimental inverted index.", 0) \
\
M(UInt64, mysql_max_rows_to_insert, 65536, "The maximum number of rows in MySQL batch insertion of the MySQL storage engine", 0) \
M(Bool, output_format_mysql_types, false, "Use MySQL converted types when connected via MySQL compatibility", 0) \
M(Bool, use_mysql_types_in_show_columns, false, "Use MySQL converted types when connected via MySQL compatibility for show columns query", 0) \
\
M(UInt64, optimize_min_equality_disjunction_chain_length, 3, "The minimum length of the expression `expr = x1 OR ... expr = xN` for optimization ", 0) \
\

View File

@ -75,7 +75,7 @@ public:
, columns_mask(std::move(columns_mask_)), max_block_size(max_block_size_)
, databases(std::move(databases_)), tables(std::move(tables_)), storages(std::move(storages_))
, client_info_interface(context->getClientInfo().interface)
, use_mysql_types(context->getSettingsRef().output_format_mysql_types)
, use_mysql_types(context->getSettingsRef().use_mysql_types_in_show_columns)
, total_tables(tables->size()), access(context->getAccess())
, query_id(context->getCurrentQueryId()), lock_acquire_timeout(context->getSettingsRef().lock_acquire_timeout)
{
@ -133,7 +133,7 @@ protected:
auto get_type_name = [this](const IDataType& type) -> std::string
{
// Check if the output_format_mysql_types setting is enabled and client is connected via MySQL protocol
// Check if the use_mysql_types_in_show_columns setting is enabled and client is connected via MySQL protocol
if (use_mysql_types && client_info_interface == DB::ClientInfo::Interface::MYSQL)
{
return type.getSQLCompatibleName();

View File

@ -127,7 +127,7 @@ TEMP_FILE=$(mktemp)
cat <<EOT > $TEMP_FILE
SHOW COLUMNS FROM tab;
SET output_format_mysql_types=1;
SET use_mysql_types_in_show_columns=1;
SHOW COLUMNS FROM tab;
SHOW EXTENDED COLUMNS FROM tab;
SHOW FULL COLUMNS FROM tab;