Fix syntax hilite in CREATE USER query

This commit is contained in:
Alexey Milovidov 2020-06-14 22:11:32 +03:00
parent 561d4b5b01
commit 3663e2a47e
3 changed files with 11 additions and 1 deletions

View File

@ -65,7 +65,8 @@ namespace
settings.ostr << (settings.hilite ? IAST::hilite_keyword : "") << " IDENTIFIED WITH " << authentication_type_name
<< (settings.hilite ? IAST::hilite_none : "");
if (password)
settings.ostr << (settings.hilite ? IAST::hilite_keyword : "") << " BY " << quoteString(*password);
settings.ostr << (settings.hilite ? IAST::hilite_keyword : "") << " BY " << (settings.hilite ? IAST::hilite_none : "")
<< quoteString(*password);
}

View File

@ -0,0 +1 @@
CREATE USER user IDENTIFIED WITH plaintext_password BY 'hello'

View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. $CURDIR/../shell_config.sh
set -e
$CLICKHOUSE_FORMAT --hilite <<< "CREATE USER user IDENTIFIED WITH PLAINTEXT_PASSWORD BY 'hello'"