Merge pull request #50013 from ClickHouse/mysql-compatibility-setting

Allow some settings for MySQL compatibility
This commit is contained in:
Alexey Milovidov 2023-05-20 02:04:02 +03:00 committed by GitHub
commit 2c8c412835
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 3 deletions

View File

@ -719,8 +719,12 @@
<!-- Default profile of settings. -->
<default_profile>default</default_profile>
<!-- Comma-separated list of prefixes for user-defined settings. -->
<custom_settings_prefixes></custom_settings_prefixes>
<!-- Comma-separated list of prefixes for user-defined settings.
The server will allow to set these settings, and retrieve them with the getSetting function.
They are also logged in the query_log, similarly to other settings, but have no special effect.
The "SQL_" prefix is introduced for compatibility with MySQL - these settings are being set be Tableau.
-->
<custom_settings_prefixes>SQL_</custom_settings_prefixes>
<!-- System profile of settings. This settings are used by internal processes (Distributed DDL worker and so on). -->
<!-- <system_profile>default</system_profile> -->

View File

@ -1,4 +1,4 @@
<clickhouse>
<!-- Comma-separated list of prefixes for user-defined settings. -->
<custom_settings_prefixes>custom_</custom_settings_prefixes>
<custom_settings_prefixes>SQL_,custom_</custom_settings_prefixes>
</clickhouse>

View File

@ -0,0 +1 @@
0

View File

@ -0,0 +1,2 @@
SET SQL_AUTO_IS_NULL = 0;
SELECT getSetting('SQL_AUTO_IS_NULL');