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
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