mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
adjust database count checking DatabaseCatalog::TEMPORARY_DATABASE explicitly, change 'yandex' into 'clickhouse' in config.xml
This commit is contained in:
parent
446cc0542b
commit
a2fd206a4d
@ -149,7 +149,7 @@ BlockIO InterpreterCreateQuery::createDatabase(ASTCreateQuery & create)
|
||||
{
|
||||
size_t db_count = DatabaseCatalog::instance().getDatabases().size();
|
||||
// there's an invisible system database _temporary_and_external_tables, so we need to subtract 1
|
||||
if (db_count > 0)
|
||||
if (db_count > 0 && DatabaseCatalog::instance().isDatabaseExist(DatabaseCatalog::TEMPORARY_DATABASE))
|
||||
db_count--;
|
||||
if (db_count >= max_db)
|
||||
throw Exception(ErrorCodes::TOO_MANY_DATABASES,
|
||||
|
@ -19,7 +19,7 @@ TEMP_DIR=$(mktemp -d "$CUR_DIR/$(basename "$BASE").XXXXXX")
|
||||
# Generate config.xml
|
||||
CONFIG_FILE="$TEMP_DIR/config.xml"
|
||||
cat > "$CONFIG_FILE" <<EOL
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<logger>
|
||||
<level>information</level>
|
||||
<log>$TEMP_DIR/clickhouse-server.log</log>
|
||||
@ -35,7 +35,7 @@ cat > "$CONFIG_FILE" <<EOL
|
||||
</users_xml>
|
||||
</user_directories>
|
||||
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
EOL
|
||||
|
||||
echo "<clickhouse>
|
||||
|
Loading…
Reference in New Issue
Block a user