mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 13:02:00 +00:00
Create parent directories in DiskLocal::replaceFile
This commit is contained in:
parent
2ebae2d722
commit
4cb7b7e49b
@ -333,6 +333,7 @@ void DiskLocal::replaceFile(const String & from_path, const String & to_path)
|
||||
{
|
||||
fs::path from_file = fs::path(disk_path) / from_path;
|
||||
fs::path to_file = fs::path(disk_path) / to_path;
|
||||
fs::create_directories(to_file.parent_path());
|
||||
fs::rename(from_file, to_file);
|
||||
}
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
111
|
@ -0,0 +1,17 @@
|
||||
-- Tags: no-parallel
|
||||
|
||||
DROP DATABASE IF EXISTS 02265_atomic_db;
|
||||
DROP DATABASE IF EXISTS 02265_ordinary_db;
|
||||
|
||||
CREATE DATABASE 02265_atomic_db ENGINE = Atomic;
|
||||
CREATE DATABASE 02265_ordinary_db ENGINE = Ordinary;
|
||||
|
||||
CREATE TABLE 02265_ordinary_db.join_table ( `a` Int64 ) ENGINE = Join(`ALL`, LEFT, a);
|
||||
INSERT INTO 02265_ordinary_db.join_table VALUES (111);
|
||||
|
||||
RENAME TABLE 02265_ordinary_db.join_table TO 02265_atomic_db.join_table;
|
||||
|
||||
SELECT * FROM 02265_atomic_db.join_table;
|
||||
|
||||
DROP DATABASE IF EXISTS 02265_atomic_db;
|
||||
DROP DATABASE IF EXISTS 02265_ordinary_db;
|
Loading…
Reference in New Issue
Block a user