Commit Graph

1184 Commits

Author SHA1 Message Date
Alexey Milovidov
6dcfdbfaf2
Merge branch 'master' into clusters_is_active_column 2023-04-28 16:16:25 +03:00
Aleksei Golub
e20f92ce0f Fixed exceptions handling; Fixed style; 2023-04-27 21:26:36 +03:00
Aleksei Golub
4606e66068 Fix style 2023-04-26 11:11:41 +03:00
Aleksei Golub
26812f36fb Added read-only database setting; Fixed error messages for filesystem database; added tests 2023-04-26 10:42:20 +03:00
Aleksei Golub
c9f8dd8bfd Replaced Poco::File with std::filesystem 2023-04-26 10:42:20 +03:00
Aleksei Golub
79ca39d920 Fixed exception messages 2023-04-26 10:42:20 +03:00
Aleksei Golub
2d2483d695 Rename DatabaseFileSystem to DatabaseFilesystem 2023-04-26 10:42:19 +03:00
alekseygolub
dfddc25389
Merge branch 'ClickHouse:master' into localfilefunction 2023-04-26 10:41:50 +03:00
Kseniia Sumarokova
a0791e3187
Update DatabasePostgreSQL.cpp 2023-04-25 11:53:59 +02:00
Alexander Tokmakov
332a736a59 Merge branch 'master' into clusters_is_active_column 2023-04-24 15:54:03 +02:00
kssenii
277393fd8d Fix 2023-04-24 14:45:41 +02:00
Aleksei Golub
96553bc3d8 Fix style and tests 2023-04-18 18:05:55 +03:00
Aleksei Golub
267bbcab00 Added ability to implicitly use file table function in clickhouse-local 2023-04-16 15:48:55 +03:00
Kseniia Sumarokova
6a0d9a37ce
Merge branch 'master' into fix-mysql-named-collection 2023-04-14 12:03:51 +02:00
kssenii
ad48e1d010 Fox 2023-04-13 19:36:25 +02:00
Robert Schulze
7a21d5888c
Remove -Wshadow suppression which leaked into global namespace 2023-04-13 08:46:40 +00:00
MikhailBurdukov
2cd3512a5d
ClickHouse startup error when loading a distributed table that depends on a dictionary (#48419)
* Test for start failure.

* Handling the dictionary as shard key.

* Added integration test and fixed style

* Revert extra test

* Fix style

* Fix style

* Refactoring

* Fix build

* style fix
2023-04-12 15:06:02 +03:00
Alexander Tokmakov
dfff30e1a9 Merge branch 'master' into clusters_is_active_column 2023-04-11 16:32:15 +02:00
Alexander Tokmakov
9ec91acef3 add some columns to system.clusters 2023-04-07 18:26:23 +02:00
Azat Khuzhin
011480924a Use forward declaration of ThreadPool
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-04-07 11:25:35 +02:00
Antonio Andelic
7975df538e Don't replicate KeeperMap DELETE and TRUNCATE 2023-04-05 15:28:35 +00:00
Antonio Andelic
e7d00c8f34 Don't replicate mutations for KeeperMap tables 2023-04-03 14:22:08 +00:00
Alexander Tokmakov
f54fd15112 fix 2023-03-31 12:58:11 +02:00
Azat Khuzhin
f38a7aeabe ThreadPool metrics introspection
There are lots of thread pools and simple local-vs-global is not enough
already, it is good to know which one in particular uses threads.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-29 10:46:59 +02:00
Sergei Solomatov
b143a1a3eb fix query 2023-03-26 11:20:53 +00:00
Nikolay Degterinsky
7ee842848a
Merge pull request #47052 from ClickHouse/evillique-patch-1
Disable path check in SQLite storage for clickhouse-local
2023-03-24 23:38:18 +01:00
Alexander Tokmakov
b70216f9f1 fix for Replicated database recovery 2023-03-22 18:12:42 +01:00
Nikolay Degterinsky
ccb0d7df00
Merge branch 'master' into evillique-patch-1 2023-03-21 22:13:12 +01:00
kssenii
bb0beb7449 Merge remote-tracking branch 'upstream/master' into named-collections-finish 2023-03-17 13:02:36 +01:00
Nikolay Degterinsky
469cd60e76 Merge remote-tracking branch 'upstream/master' into evillique-patch-1 2023-03-15 01:07:35 +00:00
Roman Vasin
f42f3ee655
Merge branch 'master' into ADQM-639 2023-03-09 09:48:33 +03:00
Alexander Tokmakov
c909d1e3f4
Merge pull request #47314 from ClickHouse/fix_upgrade_check_file_exists
Fix `File exists` error in Upgrade check
2023-03-08 17:29:34 +03:00
Alexander Tokmakov
f5cf039190 check if a symlink exists more carefully 2023-03-08 00:04:55 +01:00
Nikolay Degterinsky
990af0fb79
Fix typo 2023-03-06 23:44:41 +01:00
Roman Vasin
95a7e11a47 Merge branch 'master' of github.com:ClickHouse/ClickHouse into ADQM-639 2023-03-06 09:11:20 +00:00
kssenii
c06af1f1e7 Fix clang-tidy 2023-03-05 22:12:51 +01:00
kssenii
8f2d75cef8 Fix tests 2023-03-05 12:56:00 +01:00
Kseniia Sumarokova
386663953c
Merge branch 'master' into named-collections-finish 2023-03-03 12:23:38 +01:00
kssenii
cd7cd0526b Fix tests 2023-03-02 21:21:04 +01:00
Robert Schulze
740aeaba1f
Apply some CTAD 2023-03-02 13:36:47 +00:00
kssenii
80d017629a Fix test 2023-03-01 17:01:34 +01:00
Nikolay Degterinsky
86744585fd
Disable path check in SQLite storage for clickhouse-local 2023-03-01 06:30:07 +01:00
kssenii
b19264cf9f Remove redundant 2023-02-27 12:32:13 +01:00
Roman Vasin
5c1c5199b9
Merge branch 'master' into ADQM-639 2023-02-22 09:25:17 +03:00
kssenii
a54b011670 Finish for mysql 2023-02-20 21:37:38 +01:00
Alexey Milovidov
d8cda3dbb8 Remove PVS-Studio 2023-02-19 23:30:05 +01:00
Roman Vasin
3e2b56fabc
Merge branch 'master' into ADQM-639 2023-02-17 21:14:26 +03:00
Roman Vasin
b0ced21c30 Move temp database clean up into new function removeDataPath() 2023-02-14 13:22:15 +00:00
Antonio Andelic
8d16fe5793
Merge branch 'master' into add-support-for-settings-alias 2023-02-13 08:46:00 +01:00
Roman Vasin
bb465ce7dd
Merge branch 'master' into ADQM-639 2023-02-10 17:04:14 +03:00
Antonio Andelic
f96d480563
Merge branch 'master' into add-support-for-settings-alias 2023-02-09 16:07:45 +01:00
Vitaly Baranov
4869d3806c Add setting check_referential_table_dependencies to check referential dependencies on DROP TABLE. 2023-02-08 23:56:59 +01:00
Vitaly Baranov
6555b48132 Disable evaluating the right part of IN operator while analyzing dependencies. 2023-02-07 13:21:30 +01:00
Vitaly Baranov
324b0b6896 Fix DDLDependencyVisitor for an empty table name. 2023-02-07 13:21:18 +01:00
Roman Vasin
9488bd834f
Merge branch 'master' into ADQM-639 2023-02-07 09:45:10 +03:00
Antonio Andelic
12569da984 Merge branch 'master' into add-support-for-settings-alias 2023-02-05 16:08:57 +00:00
Antonio Andelic
85cfee4bb9 Better alias definition 2023-02-01 13:54:03 +00:00
Antonio Andelic
ec04cf6876 Merge branch 'master' into add-support-for-settings-alias 2023-02-01 09:01:01 +00:00
Antonio Andelic
714fad1529 Add support for settings alias 2023-01-26 14:06:46 +00:00
Alexander Tokmakov
a584ad0eb1 forbid runtime strings 2023-01-26 10:52:47 +01:00
Roman Vasin
16428b91ec Fix removing data on disk for table engines like Log for DatabaseMemory 2023-01-26 09:47:36 +00:00
Alexander Tokmakov
9b670946db Merge branch 'master' into exception_message_patterns5 2023-01-26 00:41:32 +01:00
Alexander Tokmakov
b9e5c586e6
Merge pull request #45566 from ClickHouse/resubmit_45493
Resubmit "Fix possible in-use table after DETACH"
2023-01-25 16:39:55 +03:00
Alexander Tokmakov
6eb557b2ba Merge branch 'master' into exception_message_patterns4 2023-01-25 13:49:17 +01:00
Kseniia Sumarokova
5da5327729
Merge pull request #45062 from kssenii/fix-sqlite-data-race-in-init-db
Fix data race in openSQLiteDB
2023-01-25 12:32:34 +01:00
Alexander Tokmakov
6ecae8388e Merge branch 'master' into exception_message_patterns4 2023-01-24 14:42:36 +01:00
Alexander Tokmakov
cd8c3bbcc5 fix 2023-01-24 14:36:30 +01:00
Alexander Tokmakov
42a976fe3d Revert "Revert "Merge pull request #45493 from azat/fix-detach""
This reverts commit 9dc4f02d15.
2023-01-24 14:15:51 +01:00
Alexander Tokmakov
9dc4f02d15 Revert "Merge pull request #45493 from azat/fix-detach"
This reverts commit a182a6b851, reversing
changes made to c47a29a089.
2023-01-24 12:20:37 +01:00
Alexander Tokmakov
bb4c8e169f check number of parameters in format string 2023-01-23 23:16:16 +01:00
Alexander Tokmakov
3f6594f4c6 forbid old ctor of Exception 2023-01-23 22:18:05 +01:00
Alexander Tokmakov
70d1adfe4b
Better formatting for exception messages (#45449)
* save format string for NetException

* format exceptions

* format exceptions 2

* format exceptions 3

* format exceptions 4

* format exceptions 5

* format exceptions 6

* fix

* format exceptions 7

* format exceptions 8

* Update MergeTreeIndexGin.cpp

* Update AggregateFunctionMap.cpp

* Update AggregateFunctionMap.cpp

* fix
2023-01-24 00:13:58 +03:00
Azat Khuzhin
ca8af3d18c Fix possible in-use table after DETACH
Right now in case of DETACH/ATTACH there can be a window when after the
table had been DETACH'ed someone will still use it, the common example
here is MVs handling.

It happens because TableExclusiveLockHolder does not guards the
shard_ptr of the IStorage, and so if someone holds it, then it can use
it. So if ATTACH will be done for this table then, you can have multiple
instances of it.

It is not possible for DROP, because before using a table, you should
lock it and after table had been DROP'ed you cannot lock it anymore.

So let's do the same for DETACH.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-22 13:18:56 +01:00
Roman Vasin
fa64203225 Add correct data path for temporary tables; Clean temp DB dir on server startup 2023-01-20 16:11:37 +00:00
Alexander Tokmakov
5cd90c1a3e Merge branch 'master' into exception_message_patterns 2023-01-17 20:04:04 +01:00
Alexander Tokmakov
522686f78b less empty patterns 2023-01-17 01:19:44 +01:00
Alexander Tokmakov
870cfcc36a less fmt::runtime usages 2023-01-17 00:11:59 +01:00
Alexander Tokmakov
6de4837580 fix 2023-01-13 16:07:20 +01:00
Alexander Tokmakov
b88aae9d5c Merge branch 'master' into fix_44496 2023-01-13 14:05:57 +01:00
kssenii
f412c76eba Fix data race in init sqlite db 2023-01-09 14:15:48 +01:00
Kseniia Sumarokova
573d3283b0
Merge pull request #44327 from kssenii/use-new-named-collections-code-2
Replace old named collections code with new (from #43147) part 2
2023-01-06 13:06:26 +01:00
Vitaly Baranov
8a5a2f5b3d Up the log level of tables dependencies graphs. 2023-01-06 00:46:49 +01:00
Nikita Mikhaylov
e9c7555365
Use TablesDependencyGraph in DatabaseReplicated recovery process (#44697) 2023-01-04 14:49:39 +01:00
Raúl Marín
0785bf6b29 Do not throw DB::Exception when folders do not exist 2023-01-03 17:05:54 +01:00
kssenii
67509aa2d5 Merge remote-tracking branch 'upstream/master' into use-new-named-collections-code-2 2023-01-03 16:41:30 +01:00
Alexander Tokmakov
4f73046520
Implement SYSTEM DROP DATABASE REPLICA (#42807) 2022-12-29 15:34:11 +01:00
alesapin
600bedbff4 Add setting to disallow arguments in ReplicatedMergeTree constructor for DatabaseReplicated 2022-12-24 18:38:14 +01:00
Alexander Tokmakov
9619f4a5f5 fix too aggressive evaluation of args in default column expr 2022-12-23 20:57:19 +01:00
kssenii
853f2ea123 Merge remote-tracking branch 'upstream/master' into use-new-named-collections-code-2 2022-12-23 11:49:02 +01:00
kssenii
a58b8b8e6c Fix tests 2022-12-22 12:27:42 +01:00
kssenii
d3db1dd6a7 Fix tests 2022-12-22 00:27:22 +01:00
kssenii
1d75f740d7 Fix tests 2022-12-20 22:33:54 +01:00
Alexander Tokmakov
a0d695e618
Update src/Databases/DatabaseOrdinary.cpp 2022-12-19 21:28:39 +03:00
alesapin
c8d9ccf3cd Lock table for share during startup for database ordinary 2022-12-19 18:51:46 +01:00
kssenii
6bb3d06c88 Replace old named collections code for postgresql 2022-12-17 01:30:55 +01:00
Vitaly Baranov
5c1f490b3a Implement referential dependencies for table engine "Distributed"
and for functions cluster() and clusterAllReplicas().
2022-12-13 11:09:42 +01:00
Vitaly Baranov
fc0f29821b Use constant evaluation when calculating referential dependencies. 2022-12-12 19:19:18 +01:00
Vitaly Baranov
efbf0f7398 Move DDLDependencyVisitor from header to cpp file. 2022-12-12 19:19:11 +01:00
Vitaly Baranov
0207637f6b Use query context instead of the global context in DDLDependencyVisitor. 2022-12-12 18:22:14 +01:00
Vitaly Baranov
78c433b79d Improve TablesDependencyGraph. 2022-12-12 18:22:04 +01:00