Commit Graph

1271 Commits

Author SHA1 Message Date
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
Nikita Taranov
408cea80eb impl 2022-12-03 22:58:46 +01:00
Vitaly Baranov
e1f7f04752
Referential dependencies for RESTORE (#43834)
* Rename DDLDependencyVisitor -> DDLLoadingDependencyVisitor.

* Move building a loading graph to TablesLoader.

* Implement referential dependencies for tables and use them
when restoring tables from a backup.

* Remove StorageID::operator < (because of its inconsistency with ==).

* Add new tests.

* Fix test.

* Fix memory leak.

Co-authored-by: Nikita Mikhaylov <mikhaylovnikitka@gmail.com>
2022-12-02 15:05:46 +01:00
Nikita Mikhaylov
9ef54c6ecc
Try to use exchanges during database replicated replica recovery process (#43628) 2022-12-01 13:50:56 +01:00
Alexey Milovidov
56f8c0b84b Fix typo 2022-11-21 15:10:15 +01:00
Vitaly Baranov
ae19af0015 Fix backup of Lazy databases. 2022-11-10 00:27:00 +01:00
Robert Schulze
cdaf0becfe
Merge branch 'master' into bitcast 2022-11-07 09:24:52 +01:00
Kseniia Sumarokova
cd5c6acbd2
Merge pull request #42960 from kssenii/fix-pg-db-datetime-table-attach
Fix postgres db engine attaching table with datetime
2022-11-06 22:39:15 +01:00
Robert Schulze
9c066e964d
Less use of CH-specific bit_cast()
Converted usage of CH-custom bit_cast to std::bit_cast if possible, i.e.
when
  sizeof(From) == sizeof(To).
(The CH-custom bit_cast is able to deal with sizeof(From) != sizeof(To).)

Motivation for this came from #42847 where it is not clear how the
internal bit_cast should behave on big endian systems, so we better
avoid that situation as much as possible.
2022-11-04 15:52:48 +00:00
Kseniia Sumarokova
6ada8e9e39
Update src/Databases/PostgreSQL/DatabasePostgreSQL.cpp
Co-authored-by: Nikolay Degterinsky <43110995+evillique@users.noreply.github.com>
2022-11-04 13:37:10 +01:00
kssenii
c9b4bc66b5 Fiux 2022-11-04 12:19:30 +01:00
Vitaly Baranov
c2cc2ccc99 Make as_table_function a child of ASTCreateQuery (to help writing visitors). 2022-10-31 10:50:33 +01:00
Azat Khuzhin
4e76629aaf Fixes for -Wshorten-64-to-32
- lots of static_cast
- add safe_cast
- types adjustments
  - config
  - IStorage::read/watch
  - ...
- some TODO's (to convert types in future)

P.S. That was quite a journey...

v2: fixes after rebase
v3: fix conflicts after #42308 merged
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:19 +02:00
Alexander Tokmakov
4b371bd20c fix 2022-10-10 16:38:35 +02:00
Alexander Tokmakov
fa1134f299 Merge branch 'master' into fix_loading_dependencies 2022-10-10 16:30:52 +02:00
Alexander Tokmakov
4175f8cde6 abort instead of __builtin_unreachable in debug builds 2022-10-07 21:49:08 +02:00
Alexander Tokmakov
014784a9ca Merge branch 'master' into fix_loading_dependencies 2022-10-07 18:58:11 +02:00
Alexander Tokmakov
690ec74bf2 better handling for expressions in dictGet 2022-10-05 20:58:27 +02:00
Robert Schulze
cc92a2d174
Merge branch 'master' into generated-file-cleanup 2022-09-30 09:56:31 +02:00
Nikita Mikhaylov
afe6c99e7d
Update DatabaseReplicated.cpp 2022-09-29 13:23:14 +02:00
Nikita Mikhaylov
ab97c60118 Done 2022-09-29 11:00:23 +00:00
Robert Schulze
fd86829824
Consolidate config_core.h into config.h
Less duplication, less confusion ...
2022-09-28 13:31:57 +00:00
Nikita Mikhaylov
bf4d675830
Fix backward incompatibility in Replicated database creation (#41875) 2022-09-28 13:22:19 +02:00
Alexander Tokmakov
922834ccde minor fixes 2022-09-26 19:31:08 +02:00
Frank Chen
a999212082 Update test cases to support both Replicated and non-Replicated database engine
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-24 11:34:42 +08:00
Alexander Tokmakov
65474830ac make tryEnqueueReplicatedDDL virtual 2022-09-16 16:25:32 +02:00
Alexander Tokmakov
03c193ccca fix ON CLUSTER with Replicated database cluster 2022-09-15 21:15:57 +02:00
Alexander Tokmakov
fc73134145 fix race between DROP and short form of ATTACH 2022-09-14 18:03:36 +02:00
Alexey Milovidov
05d0f48d17
Merge pull request #41173 from ClickHouse/remove-some-methods
Remove some methods
2022-09-11 07:19:52 +03:00
Alexey Milovidov
fd235919aa Remove some methods 2022-09-10 05:04:40 +02:00
Alexey Milovidov
4301b362ab Fix strange code in DatabaseReplicated 2022-09-10 02:34:37 +02:00
Kseniia Sumarokova
c5c48e44ea
Merge branch 'master' into fix-mysql-timeouts 2022-08-29 19:33:29 +02:00
kssenii
0a6c4b9265 Fix 2022-08-29 16:20:53 +02:00
alesapin
4f9faab924 Fix benign race in database replicated worker 2022-08-28 15:07:29 +02:00
Barum Rho
a61827fb78 Convert SQLite int8 column to ClickHouse int64
SQLite int8 column uses 64 bit integers.
2022-08-25 16:15:50 -04:00
Alexander Tokmakov
629690c32b fix "incorrect replica identifier" 2022-08-18 16:13:27 +02:00
Alexander Tokmakov
caa270b72a
Merge pull request #39933 from ClickHouse/auto_convert_ordinary_to_atomic
Add flag that enables automatic conversion from Ordinary to Atomic
2022-08-17 12:40:49 +03:00
Nikita Mikhaylov
a7c3f23dfb
Merge branch 'master' into auto_convert_ordinary_to_atomic 2022-08-17 00:38:25 +02:00
Alexander Tokmakov
832d7c6e7c Merge branch 'master' into replicated_database_improvements 2022-08-16 15:49:13 +02:00
Alexander Tokmakov
6f5a7c3bf7 fix a bug with symlinks detection 2022-08-15 12:30:47 +02:00
Alexander Tokmakov
848511affb take permanently detached tables into account 2022-08-08 16:06:08 +02:00
Alexander Tokmakov
624ccd5206 fix 2022-08-03 15:33:55 +02:00
Alexander Tokmakov
1a059035b8 fix logical error on connection loss 2022-08-03 14:13:01 +02:00
Alexander Tokmakov
bc10725f02 fix 2022-08-01 20:26:43 +02:00
Alexander Tokmakov
a11fad1561 fix 2022-07-29 20:41:23 +02:00
Alexander Tokmakov
6f88065cc1 check metadata consistency 2022-07-29 18:33:16 +02:00
Alexander Tokmakov
24725b5f95 fix synchronous queries 2022-07-27 19:15:00 +02:00
Alexander Tokmakov
5ca5a3697f better exception message for incorrect zk path 2022-07-22 18:41:41 +02:00
Alexander Tokmakov
df39af23a1 fix 2022-07-21 20:32:33 +02:00
Alexander Tokmakov
6e77155dc8 fix 2022-07-20 23:11:35 +02:00
Alexander Tokmakov
e295fd5090 Merge branch 'master' into replicated_database_improvements 2022-07-20 12:49:18 +02:00
Alexander Tokmakov
1fff3b24b8
Merge pull request #39337 from ClickHouse/minor_fix_for_ordinary_database
Do not start on unexpected Ordinary metadata
2022-07-19 13:30:56 +03:00
Kseniia Sumarokova
f168e0c5d0
Merge pull request #39272 from kssenii/fixes-for-materialized-pg
Fix segfault in materialised postgresql
2022-07-19 11:56:10 +02:00
Alexander Tokmakov
23312164bf do not start on unexpected Ordinary metadata 2022-07-18 17:05:03 +02:00
Alexander Tokmakov
966a59e617
Merge pull request #39315 from ClickHouse/tavplubix-patch-1
Update exception message
2022-07-18 15:16:49 +03:00
Kseniia Sumarokova
eb23491957
Merge branch 'master' into fixes-for-materialized-pg 2022-07-18 12:00:58 +02:00
Alexander Tokmakov
a193276737
Update DatabaseOnDisk.cpp 2022-07-18 12:50:49 +03:00
Kseniia Sumarokova
4b11a718cb
Update fetchPostgreSQLTableStructure.cpp 2022-07-17 11:55:34 +02:00
kssenii
9bba55110c Fix 2022-07-16 12:44:47 +02:00
kssenii
9f1d6814fc Fix 2022-07-15 18:01:54 +02:00
mergify[bot]
867ef24ecd
Merge branch 'master' into fix-attach-table-function-name-normalizer 2022-07-08 10:18:18 +00:00
Alexander Tokmakov
388872550a Merge branch 'master' into replicated_database_improvements 2022-07-06 19:54:53 +02:00
kssenii
cfff7c4c28 Merge master 2022-07-04 14:13:26 +02:00
Alexander Tokmakov
2e073b5cff Merge branch 'master' into replicated_database_improvements 2022-07-04 13:53:47 +02:00
Vitaly Baranov
cadb496894
Merge pull request #38537 from vitlibar/backup-improvements-8
Backup Improvements 8
2022-07-01 11:20:46 +02:00
Vitaly Baranov
e367d96964 Fix style. 2022-06-30 15:10:33 +02:00
Vitaly Baranov
aa97bf5125 Improve handling predefined databases and tables. 2022-06-30 08:37:17 +02:00
Vitaly Baranov
7689e0c36f Improve gathering metadata for backup - part 6. 2022-06-30 08:37:17 +02:00
Vitaly Baranov
44db346fea Improve gathering metadata for backup - part 3. 2022-06-30 08:37:17 +02:00
Vitaly Baranov
461a31f237 Improve gathering metadata for backup - part 2. 2022-06-30 08:37:17 +02:00
Vitaly Baranov
64b51a3772 Improve gathering metadata for backup. 2022-06-30 08:37:17 +02:00
alesapin
62e7a89f26 Proper fix for ipv4/ipv6 conversion error 2022-06-29 17:53:08 +02:00
Alexander Tokmakov
894acf0c5c fix tests 2022-06-29 16:27:21 +02:00
Alexander Tokmakov
c6c22409a2 Merge branch 'master' into replicated_database_improvements 2022-06-29 14:38:07 +02:00
Alexander Tokmakov
c3573532c0
Merge pull request #38487 from ClickHouse/add_some_tsa_annotations
Add some TSA annotations
2022-06-29 13:57:10 +03:00
Alexander Tokmakov
ceb66ade4b
Merge pull request #38335 from ClickHouse/deprecate_ordinary_database
Deprecate Ordinary database and old *MergeTree syntax
2022-06-29 13:42:59 +03:00
Robert Schulze
bb441faa42
Merge pull request #38491 from ClickHouse/clang-tidy-in-branches
Fix some clang-tidy warnings in headers
2022-06-29 10:22:04 +02:00
Robert Schulze
f692ead6ad
Don't use std::unique_lock unless we have to
Replace where possible by std::lock_guard which is more light-weight.
2022-06-28 19:19:06 +00:00
Alexander Tokmakov
4f54abf67f better names for macros 2022-06-28 16:27:18 +02:00
Robert Schulze
c22038d48b
More clang-tidy fixes 2022-06-28 11:50:05 +00:00
Alexander Tokmakov
851534c9f7 Merge branch 'master' into deprecate_ordinary_database 2022-06-27 23:47:49 +02:00
Alexander Tokmakov
f4883f1f7e add some TSA aanotations 2022-06-27 22:48:27 +02:00
Alexander Tokmakov
88dbbcb15d fix tests 2022-06-27 16:10:00 +02:00
Alexander Tokmakov
7c37079a96 Merge branch 'master' into deprecate_ordinary_database 2022-06-27 14:46:59 +02:00
kssenii
2c5aeaaa1a Add auto close for postgres connection 2022-06-27 13:46:52 +02:00
mergify[bot]
f63c959679
Merge branch 'master' into cleanup_garbage_in_store_dir 2022-06-26 13:35:10 +00:00
Kseniia Sumarokova
0d626982ee
Merge pull request #38369 from kssenii/fix-pg-compatibility
Fix postgres database engine possible incompatibility on upgrade
2022-06-25 11:18:46 +02:00
kssenii
a88ae9ca99 Review fix 2022-06-24 19:48:38 +02:00
Kseniia Sumarokova
d52dc32010
Update fetchPostgreSQLTableStructure.cpp 2022-06-24 19:31:41 +02:00
Alexander Tokmakov
379fecf7f9 try suppress failures with MaterializedPostgreSQL 2022-06-24 17:15:15 +02:00
kssenii
6cb1d60883 Fix 2022-06-24 03:24:54 +02:00
kssenii
a3823c67ee Fix 2022-06-24 02:44:22 +02:00
Alexander Tokmakov
74f38710a8 Merge branch 'master' into cleanup_garbage_in_store_dir 2022-06-23 21:43:28 +02:00
Alexander Tokmakov
dbf2763788 automatically convert system database to Atomic 2022-06-23 21:38:43 +02:00
Alexander Tokmakov
2c5a88faba deprecate Ordinary database 2022-06-23 10:20:14 +02:00
Alexander Tokmakov
ed8341025b make code less bad 2022-06-22 18:31:42 +02:00
Alexander Tokmakov
dc1f596326 fix 2022-06-22 00:50:16 +02:00
Alexander Tokmakov
8288b9fe60 fixes 2022-06-21 18:47:55 +02:00
Alexander Tokmakov
f3ea8ad745 support CREATE EMPTY AS SELECT 2022-06-21 15:03:58 +02:00
Alexander Tokmakov
ba0fcec993 add background cleanup of store/ subdirs 2022-06-21 12:35:47 +02:00
Vitaly Baranov
a6fc0dea4e Fix clang-tidy more. 2022-06-20 11:04:37 +02:00
Vitaly Baranov
8a7c970ce0 Fix style. 2022-06-19 15:58:26 +02:00
liyang830
701c687e79 fix : test error 2022-06-18 17:13:50 +08:00
liyang830
f091c8d1d8 fix: attach table normalizer, add test 2022-06-17 16:42:05 +08:00
Vitaly Baranov
c2c35fad82 Refactoring of the code getting create table queries for backup. 2022-06-15 20:32:35 +02:00
Vitaly Baranov
1198e86295 Fix storing temporary tables and skipping system tables while making a backup. 2022-06-15 20:32:34 +02:00
Vitaly Baranov
6590f82ec4 Fix tryGetCreateTableQuery() for system tables. 2022-06-15 20:32:34 +02:00
Vitaly Baranov
491ab58b3f Remove IF NOT EXISTS before storing create query in DatabaseMemory. 2022-06-15 20:32:34 +02:00
Vitaly Baranov
b2323991d6 BACKUP DATABASE now stores inner tables of matviews only if the corresponding matviews are stored. 2022-06-15 20:32:34 +02:00
Vitaly Baranov
6877b8f864 Fix renaming visitor. 2022-06-15 20:32:34 +02:00
Vitaly Baranov
592f568f83 Move backup/restore code to storages and databases - part 2. 2022-06-15 20:32:31 +02:00
Vitaly Baranov
724bc4dc57 Move backup/restore code to storages and databases - part 1. 2022-06-15 20:28:43 +02:00
kssenii
69cd3a2b10 Fix 2022-05-31 14:20:31 +02:00
Alexey Milovidov
c50791dd3b Fix clang-tidy-14, part 1 2022-05-27 22:52:14 +02:00
Alexander Tokmakov
281027e490 do not fail to start if replica seems dropped 2022-05-13 20:05:39 +02:00
Alexander Tokmakov
c806869040 fix sync database replica 2022-05-06 18:37:20 +02:00
Vitaly Baranov
dd51265218
Merge pull request #36864 from vitlibar/backup-improvements-4
Backup improvements
2022-05-05 15:37:51 +02:00
Robert Schulze
5dc06e6537
Fix build, pt. IV 2022-05-04 12:01:29 +02:00
Robert Schulze
45c0ec44b0
Fix build, pt. II 2022-05-04 10:15:25 +02:00
Vitaly Baranov
409edfd3fa Rework RestoreCoordination: make restore deterministic. 2022-05-03 11:01:44 +02:00
Robert Schulze
330212e0f4
Remove inherited create() method + disallow copying
The original motivation for this commit was that shared_ptr_helper used
std::shared_ptr<>() which does two heap allocations instead of
make_shared<>() which does a single allocation. Turned out that
1. the affected code (--> Storages/) is not on a hot path (rendering the
performance argument moot ...)
2. yet copying Storage objects is potentially dangerous and was
   previously allowed.

Hence, this change

- removes shared_ptr_helper and as a result all inherited create() methods,

- instead, Storage objects are now created using make_shared<>() by the
  caller (for that to work, many constructors had to be made public), and

- all Storage classes were marked as noncopyable using boost::noncopyable.

In sum, we are (likely) not making things faster but the code becomes
cleaner and harder to misuse.
2022-05-02 08:46:52 +02:00
Nikita Mikhaylov
93a65463d0
Added SYSTEM SYNC DATABASE query (#35944) 2022-05-01 15:40:18 +02:00
Amos Bird
4a5e4274f0
base should not depend on Common 2022-04-29 10:26:35 +08:00
Vitaly Baranov
641a5f5e35
Merge pull request #36198 from vitlibar/backup-improvements-3
Backup for replicated tables and other improvements
2022-04-28 09:23:53 +02:00
alesapin
92296484e7
Merge pull request #36348 from rschu1ze/erase_if3
Replace remove-erase idiom by C++20 erase()/erase_if()
2022-04-25 23:34:18 +02:00
Vitaly Baranov
129eca7307 CREATE queries generated by RESTORE command is now considered as internal. 2022-04-25 16:34:34 +02:00
Vitaly Baranov
68a020ecea Implement BACKUP/RESTORE ON CLUSTER. 2022-04-25 16:34:33 +02:00
tavplubix
2c54381520
Merge pull request #36200 from ClickHouse/fix_create_as_replicated_default_args
Fix CREATE AS for ReplicatedMergeTree with default arguments
2022-04-20 12:01:13 +03:00
Robert Schulze
b6d7367538
Merge remote-tracking branch 'origin/master' into erase_if3
Conflicts:
- Interpreters/ActionsDAG.cpp
2022-04-20 10:02:59 +02:00
Antonio Andelic
bbb0be6a44
Merge pull request #36402 from rschu1ze/clang-tidy-contains
Activate clang-tidy warning "readability-container-contains"
2022-04-20 08:15:46 +02:00
xiedeyantu
89d0c30f38
Fix the repeated call of func to get the table when drop table (#36248) 2022-04-19 13:51:51 +02:00
Robert Schulze
118e94523c
Activate clang-tidy warning "readability-container-contains"
This check suggests replacing <Container>.count() by
<Container>.contains() which is more speaking and in case of
multimaps/multisets also faster.
2022-04-18 23:53:11 +02:00
liyang830
b2e2b4cce7 fix attach table dictionaries function name normalizer 2022-04-18 19:58:57 +08:00
Alexey Milovidov
242919eddd Remove abbreviation 2022-04-18 01:02:49 +02:00
Robert Schulze
1e1df8e101
Replace remove-erase idiom by C++20 erase()/erase_if()
- makes the code less verbose while being as efficient
2022-04-17 12:04:47 +02:00
Alexander Tokmakov
819eac6297 fix 2022-04-14 14:48:24 +02:00
Alexander Tokmakov
40fea2b833 do not unfold {uuid} macro 2022-04-13 16:51:59 +02:00
Alexander Tokmakov
f2c4f88295 avoid moving replicated tables to Ordinary db 2022-04-13 14:38:20 +02:00
Raúl Marín
6e346a7fc3 Support atomic replace under OSX 2022-04-11 14:32:55 +02:00
tavplubix
2894672ecc
Update DatabaseReplicatedWorker.cpp 2022-04-08 22:12:57 +03:00
Alexander Tokmakov
7f54e7b422 Merge branch 'master' into mvcc_prototype 2022-04-07 15:14:06 +02:00
Alexander Tokmakov
37a06eec1a fixes 2022-04-05 17:36:53 +02:00
Alexander Tokmakov
4e9ec5dc2f make some replicated DDL faster 2022-04-05 00:51:48 +02:00
Alexander Tokmakov
5a50ad9de3 Merge branch 'master' into mvcc_prototype 2022-03-31 11:35:04 +02:00
Kruglov Pavel
771f34d793
Merge pull request #35691 from Avogar/fix-matview
Fix creating materialized view with subquery after server restart
2022-03-30 14:57:14 +02:00
Antonio Andelic
9990abb76a Use compile-time check for Exception messages, fix wrong messages 2022-03-29 13:16:11 +00:00
avogar
36ea9ef11f Fix creating materialized view with subquery after server restart 2022-03-28 19:52:10 +00:00
Alexander Tokmakov
208b242188 Merge branch 'master' into mvcc_prototype 2022-03-28 19:58:06 +02:00
Nikita Mikhaylov
64f79f0c69
Added an ability to specify cluster secret in replicated database (#35333) 2022-03-25 00:14:26 +01:00
Alexander Tokmakov
3c762f566d Merge branch 'master' into mvcc_prototype 2022-03-21 20:16:29 +01:00
Alexander Tokmakov
9e05b12d2c Merge branch 'master' into mvcc_prototype 2022-03-20 22:42:26 +01:00
Vitaly Baranov
ce25afb2e9 Storages and databases are hollow by default now. 2022-03-20 20:02:15 +01:00
Vitaly Baranov
5a883c6b5a Fixed checking access rights while producing backup, add IStorage::hasHollowBackup(). 2022-03-20 20:01:54 +01:00
kssenii
1b06a2033e Support uuid 2022-03-18 12:24:50 +01:00
Alexander Tokmakov
4b3e13a4fe Merge branch 'master' into mvcc_prototype 2022-03-16 21:06:19 +01:00
Kseniia Sumarokova
b4e03eda8b
Update DatabasePostgreSQL.cpp 2022-03-16 01:04:40 +01:00
kssenii
3a784fe611 Fix 2022-03-16 00:52:51 +01:00
Alexander Tokmakov
9702b5177d Merge branch 'master' into mvcc_prototype 2022-03-14 21:45:38 +01:00
Maksim Kita
1d674123a9 Fix clang-tidy warnings in Databases, DataTypes, Dictionaries folders 2022-03-14 18:17:35 +00:00
Maksim Kita
ad6b3693e1
Merge pull request #35123 from zhanghuajieHIT/fix_build_fail_with_gcc
fix build fail with gcc
2022-03-14 10:36:15 +01:00
zhanghuajie
53a8987b3b fix build fail with gcc --fix warnings without disabling some parameters 2022-03-11 21:59:19 +08:00
kssenii
3cd1da1e11 Fix 2022-03-10 11:11:59 +01:00
Alexander Tokmakov
8acfb8d27f Merge branch 'master' into mvcc_prototype 2022-03-07 17:40:15 +01:00
tavplubix
b7d4c78f13
Merge pull request #34487 from zzsmdfj/issue/32977_MaterializedMySQL_add_table_list_settings
MaterializedMySQL add materialized_mysql_tables_list settings
2022-03-03 12:44:51 +01:00
Maksim Kita
b1a956c5f1 clang-tidy check performance-move-const-arg fix 2022-03-02 18:15:27 +00:00
zzsmdfj
4d9bdfa58c to 32977_MaterializedMySQL_add_table_list_settings 2022-03-01 10:21:58 +08:00
mergify[bot]
b4574a777f
Merge branch 'master' into mvcc_prototype 2022-02-28 11:24:39 +00:00
Kseniia Sumarokova
ba6032a353
Update src/Databases/SQLite/SQLiteUtils.cpp
Co-authored-by: Vladimir C <vdimir@clickhouse.com>
2022-02-26 01:31:04 +01:00
kssenii
40075d4c6b Fix 2022-02-25 15:04:14 +01:00
Alexander Tokmakov
5a26f856d9 remove trash that shouldn't have been merged 2022-02-22 23:41:33 +03:00
Alexander Tokmakov
dae044f86b Merge branch 'master' into mvcc_prototype 2022-02-17 13:49:37 +03:00
Alexander Tokmakov
1e4e569151 Merge branch 'master' into mvcc_prototype 2022-02-15 02:26:47 +03:00
alesapin
89373155fc Merge branch 'master' into revert-34211-revert-34153-add_func_tests_over_s3 2022-02-13 21:07:54 +03:00
tavplubix
6d1fae834a
Merge pull request #34187 from qoega/default-table-engine
Default table engine
2022-02-11 18:14:29 +03:00
Alexander Tokmakov
07e66e690d Merge branch 'master' into mvcc_prototype 2022-02-11 15:53:32 +03:00
Alexander Tokmakov
9e893dfda7 fixes 2022-02-10 23:35:03 +03:00
zzsmdfj
a4f3dbf11c MaterializedMySQL add table_list_settings-fix-build 2022-02-10 23:27:42 +08:00
Anton Popov
298838f891 avoid unnecessary copying of Settings 2022-02-10 12:13:51 +03:00
zzsmdfj
ac264e33d5 MaterializedMySQL_add_table_list_settings 2022-02-10 13:52:13 +08:00
alesapin
02a93cb852 Merge branch 'master' into revert-34211-revert-34153-add_func_tests_over_s3 2022-02-08 19:42:27 +03:00
Alexey Milovidov
9f51fe1bef Fix wrong engine in SHOW CREATE DATABASE with engine Memory #34225 2022-02-06 03:47:40 +03:00
Alexander Tokmakov
ca5f951558 Merge branch 'master' into mvcc_prototype 2022-02-03 18:56:44 +03:00
alesapin
8e33427e19 Fix check for existing table 2022-02-03 15:17:55 +03:00
Azat Khuzhin
cf93732de9 DatabaseSQLite: fix fmt error in DatabaseSQLite::checkSQLiteTable()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-01 14:30:03 +03:00
Azat Khuzhin
bedf208cbd Use fmt::runtime() for LOG_* for non constexpr
Here is oneliner:

    $ gg 'LOG_\(DEBUG\|TRACE\|INFO\|TEST\|WARNING\|ERROR\|FATAL\)([^,]*, [a-zA-Z]' -- :*.cpp :*.h | cut -d: -f1 | sort -u | xargs -r sed -E -i 's#(LOG_[A-Z]*)\(([^,]*), ([A-Za-z][^,)]*)#\1(\2, fmt::runtime(\3)#'

Note, that I tried to do this with coccinelle (tool for semantic
patchin), but it cannot parse C++:

    $ cat fmt.cocci
    @@
    expression log;
    expression var;
    @@

    -LOG_DEBUG(log, var)
    +LOG_DEBUG(log, fmt::runtime(var))

I've also tried to use some macros/templates magic to do this implicitly
in logger_useful.h, but I failed to do so, and apparently it is not
possible for now.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

v2: manual fixes
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-01 14:30:03 +03:00
Alexander Tokmakov
2e4ae37d98 Merge branch 'master' into mvcc_prototype 2022-02-01 13:20:03 +03:00
Alexander Tokmakov
5fad3fdffc throw exception on non-transactional queries 2022-02-01 01:27:55 +03:00
Maksim Kita
5ef83deaa6 Update sort to pdqsort 2022-01-30 19:49:48 +00:00
tavplubix
9f1da9b8b8
Update MaterializedMySQLSyncThread.cpp 2022-01-25 17:25:34 +03:00
zzsmdfj
e380e59b16 MaterializeMySQL support SET YEAR TIME GEOMETRY dataType 2022-01-21 12:24:11 +08:00
Kseniia Sumarokova
6587cd0ec6
Merge pull request #33231 from kssenii/settings-changes-with-named-conf
Pass settings as key value or config for storage with settings
2022-01-11 12:30:41 +03:00
kssenii
1984a80750 Merge remote-tracking branch 'upstream/master' into materialized-postgresql-better-startup 2022-01-09 21:23:49 +03:00
kssenii
bfaab1356f Merge remote-tracking branch 'upstream/master' into settings-changes-with-named-conf 2022-01-09 17:56:44 +03:00
kssenii
61f85e9afc More fixes 2022-01-08 20:44:17 +03:00
kssenii
64538cf20f Merge remote-tracking branch 'upstream/master' into materialized-postgresql-better-startup 2022-01-08 00:49:08 +03:00
kssenii
90972e3752 Fix race 2022-01-08 00:27:29 +03:00
Kruglov Pavel
dd7f61b337
Merge branch 'master' into schema-inference 2021-12-29 12:59:05 +03:00
avogar
8112a71233 Implement schema inference for most input formats 2021-12-29 12:18:56 +03:00
Maksim Kita
9ef359ce2c Dictionaries fix comment 2021-12-28 23:50:48 +03:00
kssenii
55dfaef4de Settings changes as key value 2021-12-27 17:45:00 +03:00
kssenii
ef22ebad85 Better startup 2021-12-25 21:30:36 +03:00
kssenii
dd902b6875 Merge remote-tracking branch 'upstream/master' into table-override-pg 2021-12-17 22:03:58 +03:00
Kseniia Sumarokova
77b3ebe44e
Merge pull request #32734 from kssenii/mysql-fix-timeouts
Allow to control connection timeouts for mysql
2021-12-17 10:13:33 +03:00
alexey-milovidov
6d82644094
Update DatabaseMySQL.cpp 2021-12-16 02:02:36 +03:00
Alexander Tokmakov
07bfbc26d6 fix restarting with unavailable mysql 2021-12-15 15:08:08 +03:00
kssenii
47f549166d Table Override for PostgreSQL 2021-12-14 20:36:43 +03:00
kssenii
f0d0714e47 Pass timeouts for mysql 2021-12-13 22:12:33 +00:00
Kseniia Sumarokova
a9ca84ff7d
Merge pull request #32325 from stigsb/table-overrides
Add TABLE OVERRIDE feature for MaterializedMySQL databases
2021-12-13 20:39:42 +03:00
Azat Khuzhin
5fad4f6204 clickhouse-local: fix CREATE DATABASE with Atomic engine
Before it fails to create due to "metadata" directory had not been
created, since metadata_path is different for Atomic database, see
InterpreterCreateQuery.cpp.
2021-12-08 21:23:00 +03:00
Stig Bakken
bb521cd363 Add TABLE OVERRIDE feature for MaterializedMySQL databases 2021-12-07 09:45:02 +01:00
tavplubix
657db07795
Merge pull request #32288 from ClickHouse/fix_xml_dict_cyclic_dependency
Fix cyclic dependency with XML dictionary and StorageDictionary
2021-12-06 20:02:38 +03:00
Alexander Tokmakov
7797a72907 fix false-positive ciclyc dependency with XML dict 2021-12-06 16:35:43 +03:00
Alexander Tokmakov
90eba0c0f6 fix uncaught exception in DatabaseLazy 2021-12-03 17:45:53 +03:00
alexey-milovidov
6020188cc0
Merge pull request #31781 from havardk/tabletable
MaterializedMySQL: Fix issue with table named 'table'
2021-12-01 10:34:59 +03:00
kssenii
0e24eebc80 Merge branch 'master' of github.com:ClickHouse/ClickHouse into materialized-postgresql-fix 2021-11-30 12:26:10 +03:00
alesapin
9c4002658c
Merge pull request #31960 from ClickHouse/fix_segfault_in_materialized_mysql
Fix segfault in MaterializedMySQL
2021-11-30 10:16:27 +03:00
Alexander Tokmakov
b96fcd90e4 fix segfault in MaterializedMySQL 2021-11-29 22:02:32 +03:00
Raúl Marín
7781fc12ed Reduce dependencies on ASTSelectWithUnionQuery.h
521 -> 77 files requiring changes
2021-11-26 19:27:16 +01:00