diff --git a/dbms/src/Dictionaries/getDictionaryConfigurationFromAST.cpp b/dbms/src/Dictionaries/getDictionaryConfigurationFromAST.cpp index 0eb734b18fa..daa3b1a272d 100644 --- a/dbms/src/Dictionaries/getDictionaryConfigurationFromAST.cpp +++ b/dbms/src/Dictionaries/getDictionaryConfigurationFromAST.cpp @@ -39,8 +39,9 @@ String getUnescapedFieldString(const Field & field) if (!string.empty() && string.front() == '\'' && string.back() == '\'') string = string.substr(1, string.size() - 2); - /// Backqouting will be performed on dictionary providers side + /// Escaping will be performed on dictionary providers side boost::replace_all(string, "\\'", "'"); + boost::replace_all(string, "\\\\", "\\"); return string; } diff --git a/dbms/tests/integration/test_dictionaries_ddl/test.py b/dbms/tests/integration/test_dictionaries_ddl/test.py index 5f1430a786c..c5df6e68dd2 100644 --- a/dbms/tests/integration/test_dictionaries_ddl/test.py +++ b/dbms/tests/integration/test_dictionaries_ddl/test.py @@ -234,7 +234,7 @@ def test_dictionary_with_where(started_cluster): DB 'clickhouse' TABLE 'special_table' REPLICA(PRIORITY 1 HOST 'mysql1' PORT 3306) - WHERE 'value1 = \\'qweqwe\\'' + WHERE 'value1 = \\'qweqwe\\' OR value1 = \\'\\\\u3232\\'' )) LAYOUT(FLAT()) LIFETIME(MIN 1 MAX 3)