mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 09:22:05 +00:00
refactor
This commit is contained in:
parent
d826115f2a
commit
720f8805f9
5
src/Parsers/ASTDatabaseOrNone.cpp
Normal file
5
src/Parsers/ASTDatabaseOrNone.cpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
//
|
||||||
|
// Created by max_w on 2021/7/27.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "ASTDatabaseOrNone.h"
|
16
src/Parsers/ASTDatabaseOrNone.h
Normal file
16
src/Parsers/ASTDatabaseOrNone.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// Created by max_w on 2021/7/27.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CLICKHOUSE_ASTDATABASEORNONE_H
|
||||||
|
#define CLICKHOUSE_ASTDATABASEORNONE_H
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class ASTDatabaseOrNone {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif //CLICKHOUSE_ASTDATABASEORNONE_H
|
5
src/Parsers/ParserDatabaseOrNone.cpp
Normal file
5
src/Parsers/ParserDatabaseOrNone.cpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
//
|
||||||
|
// Created by max_w on 2021/7/27.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "ParserDatabaseOrNone.h"
|
16
src/Parsers/ParserDatabaseOrNone.h
Normal file
16
src/Parsers/ParserDatabaseOrNone.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// Created by max_w on 2021/7/27.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CLICKHOUSE_PARSERDATABASEORNONE_H
|
||||||
|
#define CLICKHOUSE_PARSERDATABASEORNONE_H
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class ParserDatabaseOrNone {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif //CLICKHOUSE_PARSERDATABASEORNONE_H
|
@ -1,2 +1,4 @@
|
|||||||
default
|
default
|
||||||
db_01939
|
db_01939
|
||||||
|
CREATE USER u_01939
|
||||||
|
CREATE USER u_01939 DEFAULT DATABASE NONE
|
||||||
|
@ -5,8 +5,8 @@ CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|||||||
# shellcheck source=../shell_config.sh
|
# shellcheck source=../shell_config.sh
|
||||||
. "$CUR_DIR"/../shell_config.sh
|
. "$CUR_DIR"/../shell_config.sh
|
||||||
|
|
||||||
${CLICKHOUSE_CLIENT_BINARY} --query "drop database if exists db_01939"
|
${CLICKHOUSE_CLIENT_BINARY} --query "create database if not exists db_01939"
|
||||||
${CLICKHOUSE_CLIENT_BINARY} --query "create database db_01939"
|
${CLICKHOUSE_CLIENT_BINARY} --query "create database if not exists NONE"
|
||||||
|
|
||||||
#create user by sql
|
#create user by sql
|
||||||
${CLICKHOUSE_CLIENT_BINARY} --query "drop user if exists u_01939"
|
${CLICKHOUSE_CLIENT_BINARY} --query "drop user if exists u_01939"
|
||||||
@ -15,5 +15,11 @@ ${CLICKHOUSE_CLIENT_BINARY} --query "create user u_01939 default database db_01
|
|||||||
${CLICKHOUSE_CLIENT_BINARY} --query "SELECT currentDatabase();"
|
${CLICKHOUSE_CLIENT_BINARY} --query "SELECT currentDatabase();"
|
||||||
${CLICKHOUSE_CLIENT_BINARY} --user=u_01939 --query "SELECT currentDatabase();"
|
${CLICKHOUSE_CLIENT_BINARY} --user=u_01939 --query "SELECT currentDatabase();"
|
||||||
|
|
||||||
|
${CLICKHOUSE_CLIENT_BINARY} --query "alter user u_01939 default database NONE"
|
||||||
|
${CLICKHOUSE_CLIENT_BINARY} --query "show create user u_01939"
|
||||||
|
${CLICKHOUSE_CLIENT_BINARY} --query "alter user u_01939 default database \`NONE\`"
|
||||||
|
${CLICKHOUSE_CLIENT_BINARY} --query "show create user u_01939"
|
||||||
|
|
||||||
${CLICKHOUSE_CLIENT_BINARY} --query "drop user u_01939 "
|
${CLICKHOUSE_CLIENT_BINARY} --query "drop user u_01939 "
|
||||||
${CLICKHOUSE_CLIENT_BINARY} --query "drop database db_01939"
|
${CLICKHOUSE_CLIENT_BINARY} --query "drop database db_01939"
|
||||||
|
${CLICKHOUSE_CLIENT_BINARY} --query "drop database NONE"
|
||||||
|
Loading…
Reference in New Issue
Block a user