Commit Graph

372 Commits

Author SHA1 Message Date
Alexander Tokmakov
9c7cf9e92e remove some debug code 2021-02-15 13:26:34 +03:00
Alexander Tokmakov
78c1d69b8c better code 2021-02-08 22:36:17 +03:00
Alexander Tokmakov
91d0924665 write dictionaries metadata to zk 2021-02-08 12:46:30 +03:00
Alexander Tokmakov
7ce0ef2561 show clusters for replicated db 2021-02-08 12:14:17 +03:00
Alexander Tokmakov
18f6b5bbad add timeouts 2021-02-04 22:41:44 +03:00
Alexander Tokmakov
6456ccf0da better test 2021-02-02 22:39:04 +03:00
Alexander Tokmakov
9da445e740 execute initial query in the same thread 2021-02-01 22:29:47 +03:00
Alexander Tokmakov
a57456a3fd fix 2021-01-28 22:02:39 +03:00
Alexander Tokmakov
52e5c0aad7 fix thread status 2021-01-28 16:48:17 +03:00
Alexander Tokmakov
3146a1a954 fix 2021-01-25 21:59:23 +03:00
sundy-li
22c5fa0974 Merge branch 'master' into system-querylog-map 2021-01-20 23:00:22 +08:00
Alexander Tokmakov
7f97a11c84 Merge branch 'master' into database_replicated 2021-01-18 17:09:39 +03:00
sundy-li
cef8bcc011 (feature) Use Map data type for system logs tables 2021-01-05 10:10:19 +00:00
Alexey Milovidov
4b3ae495d6 Merge branch 'master' into CurtizJ-multiple-nested 2021-01-02 00:25:16 +03:00
spongedc
494c9ac809 Merge remote-tracking branch 'origin/master' into support_show_create_view 2020-12-29 10:20:06 +08:00
Alexander Tokmakov
2836936079 fix 2020-12-25 20:43:03 +03:00
Alexander Tokmakov
42911e2438 implement CREATE OR REPLACE TABLE 2020-12-25 19:32:09 +03:00
spongedc
a277308ac6 Merge remote-tracking branch 'origin/master' into support_show_create_view 2020-12-23 11:56:46 +08:00
Anton Popov
b6ff6300b2 Merge remote-tracking branch 'upstream/master' into HEAD 2020-12-22 18:06:21 +03:00
Amos Bird
2a28c127eb
Better code for real 2020-12-18 14:13:59 +08:00
Anton Popov
a42b00c9aa Merge remote-tracking branch 'upstream/master' into HEAD 2020-12-17 20:43:23 +03:00
tavplubix
7e73b6acd8
Merge pull request #17642 from filimonov/detach-permanently
DETACH TABLE PERMANENTLY
2020-12-17 14:26:51 +03:00
spongedc
38c0827881 Merge remote-tracking branch 'origin/master' into support_show_create_view 2020-12-16 12:26:56 +08:00
spongedc
a0083e23d6 Fix compile error 2020-12-16 12:07:50 +08:00
spongedc
81b0fa2989 1. rename is_view to is_ordinary_view 2. add more tests 2020-12-16 11:19:38 +08:00
Anton Popov
c78861e86e Merge remote-tracking branch 'upstream/master' into HEAD 2020-12-15 01:45:01 +03:00
Anton Popov
afc2d7099b add conversion from array to map 2020-12-15 01:16:04 +03:00
Mikhail Filimonov
f6097cf818
Adding DETACH TABLE PERMANENTLY 2020-12-14 15:28:59 +01:00
Alexander Tokmakov
0c80fce7f0 Merge branch 'master' into allow_atomic_database_inside_materialize_mysql 2020-12-13 17:56:50 +03:00
Alexander Tokmakov
f9f7da5f97 fix 2020-12-11 15:06:19 +03:00
Alexander Tokmakov
04ceaa66f2 implement ATTACH TABLE name FROM 'path/to/data/ 2020-12-08 17:15:23 +03:00
Ivan
0ba712a2d3
Merge branch 'master' into allow_atomic_database_inside_materialize_mysql 2020-12-08 16:45:51 +03:00
Anton Popov
d7aad3bf79 Merge remote-tracking branch 'upstream/master' into HEAD 2020-12-07 19:13:01 +03:00
Ivan
315ff4f0d9
ANTLR4 Grammar for ClickHouse and new parser (#11298) 2020-12-04 05:15:44 +03:00
Alexander Tokmakov
a0ef3a113a Merge branch 'master' into allow_atomic_database_inside_materialize_mysql 2020-12-02 18:29:02 +03:00
Alexander Tokmakov
1a4bd67736 fixes 2020-12-01 20:20:42 +03:00
Alexander Tokmakov
c955542dce run functional tests with Replicated engine 2020-11-30 23:22:25 +03:00
Alexander Tokmakov
ab197a49c8 better code, fixes 2020-11-30 23:12:43 +03:00
Alexander Tokmakov
9e3fd3c170 Merge branch 'master' into database_replicated 2020-11-27 17:08:34 +03:00
Alexander Tokmakov
dce0bf8efc Merge branch 'master' into allow_atomic_database_inside_materialize_mysql 2020-11-24 15:28:31 +03:00
Alexander Tokmakov
5ccf975a4a Merge branch 'master' into database_replicated 2020-11-24 14:38:02 +03:00
Anton Popov
b384beb564 Merge remote-tracking branch 'upstream/master' into HEAD 2020-11-23 17:46:51 +03:00
Alexander Tokmakov
60a5782c75 fix AST formatting in log messages 2020-11-22 20:23:12 +03:00
Anton Popov
1f65478b49 implement nested with multiple nesting 2020-11-21 20:27:42 +03:00
Nikolai Kochetov
bac1def5f9
Merge pull request #17134 from abyss7/tcp-port
Implement tcpPort() function for tests
2020-11-20 20:32:55 +03:00
Ivan Lezhankin
fdd1c182ab Merge remote-tracking branch 'upstream/master' into tcp-port 2020-11-18 16:22:00 +03:00
Ivan Lezhankin
1787cd89a7 Implement tcpPort() function literal 2020-11-17 16:24:13 +03:00
tavplubix
3de32279ca
Update InterpreterCreateQuery.cpp 2020-11-16 14:03:27 +03:00
Alexander Tokmakov
8352e5d202 fix crash in CREATE AS 2020-11-16 13:14:12 +03:00
Alexander Tokmakov
0731bfb7be Merge branch 'master' into database_replicated 2020-11-12 21:04:18 +03:00
Alexander Tokmakov
2a6c0b9180 try reuse DDLWorker in DatabaseReplicated 2020-11-12 20:35:29 +03:00
tavplubix
e0dc004b95
Merge pull request #16885 from amosbird/dd
Disable ATTACH/DETACH TABLE <DICTIONARY>
2020-11-12 16:34:21 +03:00
Amos Bird
134786afd5
Disable ATTACH/DETACH TABLE <DICTIONARY> 2020-11-11 23:04:49 +08:00
Alexander Tokmakov
62ff00ee8b use WriteBuffer in formatAST(...) 2020-11-09 19:05:40 +03:00
Alexey Milovidov
fd84d16387 Fix "server failed to start" error 2020-11-07 03:14:53 +03:00
Alexander Tokmakov
cbcdee0cf9 split DDLWorker.cpp 2020-11-03 16:47:26 +03:00
Alexey Milovidov
e6d8ab2270 Fix possible name collision in ALTER 2020-11-02 21:37:23 +03:00
Alexander Tokmakov
cd14f095ab fix tests 2020-10-26 18:12:16 +03:00
Alexander Tokmakov
478eb0b8a5 fix 2020-10-22 23:32:47 +03:00
Alexander Tokmakov
72dbb43235 Merge branch 'master' into fork-valbaturin-replication-db-engine 2020-10-20 19:14:54 +03:00
Alexander Tokmakov
72b1339656 Revert "Revert "Write structure of table functions to metadata""
This reverts commit c65d1e5c70.
2020-10-14 15:19:29 +03:00
tavplubix
c65d1e5c70
Revert "Write structure of table functions to metadata" 2020-10-14 13:59:29 +03:00
zhang2014
a00bcbb8ba ISSUES-15265 try fix crash when create failure 2020-10-14 13:26:28 +08:00
Alexander Tokmakov
6b2da861dc Merge branch 'master' into write_structure_of_table_functions 2020-10-02 20:46:58 +03:00
Alexander Tokmakov
32776da69a Merge branch 'master' into allow_atomic_database_inside_materialize_mysql 2020-10-02 20:09:37 +03:00
Alexander Tokmakov
b0d99217fb Merge branch 'master' into write_structure_of_table_functions 2020-09-27 14:26:47 +03:00
Alexander Tokmakov
aa5e5013f2 Merge branch 'master' into allow_atomic_database_inside_materialize_mysql 2020-09-27 14:11:53 +03:00
Alexander Tokmakov
34addcf61f add review suggestions 2020-09-26 22:18:28 +03:00
Alexander Tokmakov
a8266a3d3c fix DDDL with cross-replication and Atomic 2020-09-23 21:28:59 +03:00
Alexander Tokmakov
91cbd49e85 fix tests 2020-09-22 00:09:50 +03:00
Alexander Tokmakov
1ca9a92b21 Merge branch 'master' into write_structure_of_table_functions 2020-09-18 21:09:23 +03:00
Alexander Tokmakov
1c37ac7c9d fix 2020-09-17 21:19:02 +03:00
Alexander Tokmakov
3671c91c37 Merge branch 'master' into allow_atomic_database_inside_materialize_mysql 2020-09-15 12:43:01 +03:00
Alexander Tokmakov
a812f7eb75 allow using Atomic database inside MaterializeMySQL 2020-09-14 22:25:02 +03:00
Alexander Tokmakov
b68782d285 enable more tests with Atomic database 2020-09-09 16:32:50 +03:00
Alexander Tokmakov
98963deed3 fix 2020-09-04 19:31:37 +03:00
Alexander Tokmakov
c233be29c5 fix 2020-09-04 16:29:43 +03:00
Alexander Tokmakov
ee7b8a797a better code, fix Distributed format of StorageFile 2020-09-02 18:07:53 +03:00
Alexander Tokmakov
56695727b2 Merge branch 'master' into write_structure_of_table_functions 2020-09-01 20:15:13 +03:00
Alexander Tokmakov
3a9779adb4 slightly better code 2020-09-01 17:41:49 +03:00
bharatnc
caed8cd474 change error code to BAD_ARGUMENTS (36) 2020-08-31 09:00:32 -07:00
bharatnc
6bb575fae9 fix style check 2020-08-31 00:39:58 -07:00
bharatnc
5c83b09a2f disallow CODEC setting for column type ALIAS
This commit adds checks in place during table creation
and updates to ensure that we don't allow `CODEC` for
ALIAS (`default_type` column) like:

```sql
CREATE TABLE compression_codec_on_alias
(
    `c0` ALIAS c1 CODEC(ZSTD),
    `c1` UInt64
)
ENGINE = MergeTree()
PARTITION BY c0
ORDER BY c1;
```

After these safeguards in place, when trying to create/update column
codec, we will get excaptions like this:

```sql

-- create

CREATE TABLE compression_codec_on_alias
(
    `c0` ALIAS c1 CODEC(ZSTD),
    `c1` UInt64
)
ENGINE = MergeTree()
PARTITION BY c0
ORDER BY c1

Received exception from server (version 20.8.1):
Code: 377. DB::Exception: Received from localhost:9000. DB::Exception: Cannot specify codec for column type ALIAS.

0 rows in set. Elapsed: 0.006 sec.

-- modify

ALTER TABLE compression_codec_on_alias
    ADD COLUMN `c3` ALIAS c2 CODEC(ZSTD) AFTER c2

Received exception from server (version 20.8.1):
Code: 377. DB::Exception: Received from localhost:9000. DB::Exception: Cannot specify codec for column type ALIAS.

0 rows in set. Elapsed: 0.005 sec.

```
2020-08-30 23:45:53 -07:00
alesapin
10c7a6c45e
Add ability to specify Default codec for columns (#14049)
* Add ability to specify DefaultCompression codec which correspond to settings specified in config.xml

* Fix style

* Rename DefaultCompression to simple Default

* Fix compression codec

* Better codec description representation

* Less strange code and one method

* Fix delta
2020-08-28 20:40:45 +03:00
Alexey Milovidov
651fb3539c Fix creation of tables with named tuples #13027 2020-08-27 00:57:42 +03:00
Alexander Tokmakov
969940b4c9 write table tructure for table function remote(...) 2020-08-26 23:55:40 +03:00
Artem Zuikov
becc186c91
Add support for extended precision integers and decimals (#13097) 2020-08-19 14:52:17 +03:00
Alexander Tokmakov
e686616756 add exclusive DDLGuard for database 2020-08-18 18:15:27 +03:00
Alexander Tokmakov
a6ff049eec use Atomic for system database 2020-08-12 23:40:13 +03:00
tavplubix
4aff48dc3f
Merge pull request #10851 from zhang2014/feature/materialize_mysql_database
ISSUES-4006 support MaterializeMySQL database engine
2020-08-12 15:59:28 +03:00
Alexander Tokmakov
829f7e65de try fix sync, add experimetal flag 2020-08-12 00:59:46 +03:00
Alexey Milovidov
0c15f3b6c8 Allow server to startup if there are leftovers from unsuccessfull database creations 2020-08-10 05:58:08 +03:00
Alexey Milovidov
0cbbe153cd Fix typos, the last 1% 2020-08-08 04:21:04 +03:00
Alexey Milovidov
12f66fa82c Fix 99% of typos 2020-08-08 04:01:47 +03:00
zhang2014
e496225641 ISSUES-4006 try fix build failure & review comment 2020-08-07 12:53:33 +08:00
Vxider
c78dd2cd79 Merged with master 2020-07-27 18:11:26 +08:00
Alexander Tokmakov
237accd154 Merge branch 'master' into database_atomic_improvements 2020-07-23 06:33:20 +03:00
Artem Zuikov
2afd123eda
Refactoring: extract TreeOptimizer from SyntaxAnalyzer (#12645) 2020-07-22 20:13:05 +03:00
Alexander Tokmakov
99f0adad0a fixes 2020-07-17 21:17:04 +03:00
Alexander Tokmakov
c27de9b424 fixes 2020-07-17 16:11:44 +03:00
Vxider
61b15e6f6d merged with master 2020-07-15 22:38:50 +08:00
Alexander Tokmakov
2fe2833a0d fix build 2020-07-15 13:18:30 +03:00
Alexander Tokmakov
31e62e713e write uuid for ddl dictionaries 2020-07-14 00:21:01 +03:00
Alexander Tokmakov
04c3e7cab6 add implicit uuid macro 2020-07-13 16:18:38 +03:00
Alexander Tokmakov
77289146ab fix tests 2020-07-09 20:47:42 +03:00
Alexander Tokmakov
445acd0294 Merge branch 'master' into database_atomic_improvements 2020-07-09 16:02:54 +03:00
Alexander Tokmakov
9c4efa1f36 fix, add test 2020-07-09 01:50:15 +03:00
Alexander Tokmakov
d1be5ec641 fix symlinks, add short syntax of attach database 2020-07-06 16:41:43 +03:00
Val
e591fe5014 database replicated feedback mechanism prototype 2020-07-04 19:32:23 +03:00
Alexander Tokmakov
383c583bdd add uuid to atomic databases 2020-07-02 23:39:31 +03:00
Alexey Milovidov
d97cb1e7b4 Fix constraints check for constant columns 2020-06-30 01:54:20 +03:00
Val
d293e002a7 address pr comments 2020-06-27 17:04:11 +03:00
Val
f928c897cf change replication algorithm, remove zk lock
In this version of the databaseReplicated sequential persistent zk nodes
are used to order DDL queries. Db replicated ddl queries are executed
in the backgrould pool no matter whether it's proposed by the same
replica or not.
2020-06-27 17:02:03 +03:00
Val
31910e9bf1 Use ClientInf::QueryKind to distinguish replicated db log queries 2020-06-27 17:01:18 +03:00
Val
cbcd1bea0e provide better comments and information 2020-06-27 17:00:44 +03:00
Val
f103e24a09 make db replicated inherited from atomic 2020-06-27 16:52:35 +03:00
Val
d7a354b24d create query fix for replicated dbs 2020-06-27 16:51:47 +03:00
Val
0a860c0c2b log based replicated 2020-06-27 16:51:36 +03:00
Val
319256ef4f an attempt to replicated create query from create query 2020-06-27 16:49:40 +03:00
Vxider
add49518f3 Merged with master 2020-06-19 23:12:25 +08:00
alesapin
d79982f497 Better locks in Storages 2020-06-18 19:10:47 +03:00
alesapin
ccc2bda666 getConstraints() in StorageInMemoryMetadata (suspicious commit, but pretend to work) 2020-06-16 19:55:04 +03:00
Alexander Tokmakov
6a439a5eb5 fixes 2020-06-14 19:39:06 +03:00
Alexander Tokmakov
5f9739fbf9 Merge branch 'master' into fork-potya/null_data_mods 2020-06-14 18:11:55 +03:00
Vxider
ab160a3d92 Merged with master 2020-06-09 16:48:04 +08:00
Alexey Milovidov
a0fd9b021a Fix MSan failure in MergeTree 2020-06-04 01:11:06 +03:00
alesapin
254d55f2ab Better method name 2020-06-01 15:02:36 +03:00
alesapin
663e92b1c5 Rename to methods 2020-06-01 14:29:11 +03:00
alesapin
3847ea892d Merge branch 'master' into consistent_metadata3 2020-06-01 13:17:59 +03:00
alexey-milovidov
bebc6f82fc
Merge pull request #10678 from livace/add_geo_types
Add geo data types Point and Polygon
2020-05-31 17:25:15 +03:00
Alexey Ilyukhov
3b78b010e5 Add empty line 2020-05-30 18:30:09 +03:00
Alexey Ilyukhov
b84c8fcbd8 Add allow_experimental_geo_types; add test 2020-05-30 18:26:19 +03:00
tavplubix
a4e40fb5f2
Merge pull request #11269 from ClickHouse/add_context_to_idatabase_methods
Add context to IDatabase methods
2020-05-29 21:15:35 +03:00
Alexey Milovidov
23d7947549 Fix constraints for DEFAULT fields; fix constraints for temporary tables; improve performance of INSERT for small blocks 2020-05-29 05:08:48 +03:00
Alexander Tokmakov
c071e0a473 add context to DatabaseCatalog methods 2020-05-29 02:01:18 +03:00
Alexander Tokmakov
3cff070f89 add context to IDatabase methods 2020-05-28 23:10:45 +03:00
alesapin
f5e5290c0a Better naming 2020-05-28 16:09:03 +03:00
alesapin
26a9829e04 Indices description as vector 2020-05-28 15:47:17 +03:00
alesapin
52ca6b2051 I'm able to build it 2020-05-28 15:37:05 +03:00
potya
df13694a03 Fix style errors 2020-05-27 15:32:39 +03:00
potya
d5840688a1 Fix style errors 2020-05-27 15:22:12 +03:00
potya
1fbcdbb58a Fix error 2020-05-25 22:09:14 +03:00
potya
c9b1d6a6cc Merge remote-tracking branch 'origin/null_data_mods' into null_data_mods
# Conflicts:
#	src/Interpreters/InterpreterCreateQuery.cpp
2020-05-25 22:03:24 +03:00
potya
2974d81b2e Fix erros and add test 2020-05-25 21:58:30 +03:00
potya
70fac9c068 Fix problems 2020-05-25 14:22:52 +03:00
potya
1ae82df3c0 at start 2020-05-25 14:20:33 +03:00
potya
bee14177cd Fix NOT nULL modifier 2020-05-23 17:32:47 +03:00
potya
8a9064cef2 at start 2020-05-20 21:23:35 +03:00
potya
d8bb98bbcf Add NULL and NOY NULL modifiers for data types in create query 2020-05-20 04:22:32 +03:00
Alexey Milovidov
99c18c5a09 Check for suspicious codecs #4966 2020-05-04 03:11:49 +03:00
alesapin
18c550df15 Better virtuals logic 2020-04-27 16:55:30 +03:00
Alexander Tokmakov
f413061e0d remove Context from some IDatabase methods 2020-04-23 19:51:48 +03:00
Alexander Tokmakov
04d6b59ac0 Merge branch 'master' into database_atomic 2020-04-23 17:31:37 +03:00
alexey-milovidov
1ecfa27cd3
Merge pull request #10441 from ClickHouse/remove_casts_from_defaults
Remove CAST from DEFAULT expressions during table creation.
2020-04-23 12:36:12 +03:00
alesapin
45b8cb5b37 Remove casts from table creation by default 2020-04-22 17:29:38 +03:00
Alexey Milovidov
0a7edce036 Checkpoint 2020-04-22 09:01:33 +03:00
Alexander Tokmakov
b29bddac12 Merge branch 'master' into database_atomic 2020-04-20 14:09:09 +03:00
Vitaly Baranov
d62345bbaa Show information about not loaded dictionaries in system.columns, system.tables
and in "SHOW TABLES" executed in any database with the "Dictionary" engine.
2020-04-18 12:50:54 +03:00
Alexey Milovidov
cdeda4ab91 Fix usage of max_parser_depth setting; remove harmful default function arguments 2020-04-16 04:06:10 +03:00
Alexander Tokmakov
20e6593f96 disable by default 2020-04-12 21:52:59 +03:00
Alexander Tokmakov
5e6d4b9449 Merge branch 'master' into database_atomic 2020-04-12 16:35:44 +03:00
Alexander Kazakov
497df3086f Merge branch 'master' into timed_rwlock
Change-Id: I620bfde2121ff013773b001d514b40b1e796a58b
2020-04-10 11:38:20 +03:00
Alexander Kazakov
26dd6140b2 Added new config settings to control timeouts
* "lock_acquire_timeout" controls for how long a query will continue to
acquire each lock on its argument tables
 * "lock_acquire_timeout_for_background_operations" is a per-table
setting for storages of *MergeTree family
2020-04-09 21:10:27 +03:00
Vxider
a8cd174fc4 merged with master 2020-04-09 22:34:02 +08:00
Alexander Tokmakov
dd1590830b Merge branch 'master' into database_atomic 2020-04-08 22:00:46 +03:00
Alexander Tokmakov
135197aa75 fixes 2020-04-08 04:02:00 +03:00
Vitaly Baranov
e573549945 Rework access rights for table functions. 2020-04-07 23:31:59 +03:00
Alexander Tokmakov
4c48b7dd80 better rename 2020-04-07 18:31:33 +03:00
Alexander Tokmakov
a2101c9b1c better code 2020-04-07 02:22:44 +03:00
Alexander Tokmakov
08bae4668d Merge branch 'master' into database_atomic 2020-04-06 16:18:07 +03:00
Vxider
2fb9138505 merged with master 2020-04-06 17:36:44 +08:00
Ivan Lezhankin
06446b4f08 dbms/ → src/ 2020-04-03 18:14:31 +03:00