mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
whitelist /dev/null in StorageFile
This commit is contained in:
parent
49cfe326e3
commit
84c7589c9a
@ -108,7 +108,8 @@ static void checkCreationIsAllowed(const Context & context_global, const std::st
|
||||
if (context_global.getApplicationType() != Context::ApplicationType::SERVER)
|
||||
return;
|
||||
|
||||
if (!startsWith(table_path, db_dir_path))
|
||||
/// "/dev/null" is allowed for perf testing
|
||||
if (!startsWith(table_path, db_dir_path) && table_path != "/dev/null")
|
||||
throw Exception("Part path " + table_path + " is not inside " + db_dir_path, ErrorCodes::DATABASE_ACCESS_DENIED);
|
||||
|
||||
Poco::File table_path_poco_file = Poco::File(table_path);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<test>
|
||||
<type>loop</type>
|
||||
|
||||
<create_query>CREATE TABLE IF NOT EXISTS table_{format} ENGINE = File({format}) AS test.hits</create_query>
|
||||
<create_query>CREATE TABLE IF NOT EXISTS table_{format} ENGINE = File({format}, '/dev/null') AS test.hits</create_query>
|
||||
|
||||
<stop_conditions>
|
||||
<all_of>
|
||||
|
Loading…
Reference in New Issue
Block a user