mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 07:01:59 +00:00
Merge pull request #35995 from vdimir/rename_join_ordinary_to_atomic
Create parent directories in DiskLocal::replaceFile
This commit is contained in:
commit
99a55a2304
@ -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