Alexey Milovidov
b1b09ed5ae
Fix SQL injection
2021-01-15 23:14:51 +03:00
Alexey Milovidov
52cfc1d110
Minor changes
2021-01-15 23:09:31 +03:00
Alexey Milovidov
ba1921f380
Minor changes
2021-01-15 22:59:49 +03:00
Alexey Milovidov
a19e7edd14
Merge branch 'master' into kssenii-pg2ch
2021-01-15 17:33:19 +03:00
kssenii
38a9cba850
Fix
2021-01-11 10:55:38 +00:00
kssenii
c6c6b2d23c
Fix style and types check
2021-01-10 13:01:15 +00:00
kssenii
d952b0897e
Minor adjustments
2021-01-10 12:06:18 +00:00
kssenii
fc9de76f7d
Fix incorrect getCreateTableQueryImpl with multidim arrays
2021-01-10 09:00:35 +00:00
Alexey Milovidov
76149947ef
Remove useless headers
2021-01-10 05:48:57 +03:00
kssenii
0088d66d59
Hopefully better array conversions for insert query
2021-01-09 22:42:42 +00:00
Alexey Milovidov
8af19c3251
Fix Arcadia
2021-01-07 15:29:02 +03:00
Alexey Milovidov
60d4db421c
Fix Arcadia
2021-01-07 06:45:12 +03:00
alexey-milovidov
72b142a00a
Merge branch 'master' into pg2ch
2021-01-06 23:18:59 +03:00
kssenii
e100aec086
Fix typos check
2020-12-31 11:15:05 +00:00
kssenii
62b06de97e
Try fix build
2020-12-30 16:00:05 +00:00
spongedc
494c9ac809
Merge remote-tracking branch 'origin/master' into support_show_create_view
2020-12-29 10:20:06 +08:00
kssenii
fa3297bf72
Fix build, update libpq
2020-12-28 19:16:10 +00:00
kssenii
9b25890674
Generate ya.make, fix fast test
2020-12-28 12:54:52 +00:00
kssenii
8f8920a7ee
Add table cache, better drop table
2020-12-27 15:52:15 +00:00
kssenii
00a37404ca
Add postgresql database engine
2020-12-27 12:26:29 +00:00
Alexander Tokmakov
42911e2438
implement CREATE OR REPLACE TABLE
2020-12-25 19:32:09 +03:00
Yatsishin Ilya
ce1e2b18a3
Fix codespell warnings. Split style checks. Update style checks docker
2020-12-24 13:17:52 +03:00
spongedc
a277308ac6
Merge remote-tracking branch 'origin/master' into support_show_create_view
2020-12-23 11:56:46 +08:00
Alexander Tokmakov
52ef4289fe
enable optimize_on_insert for MaterializeMySQL
2020-12-17 16:05:38 +03:00
tavplubix
7e73b6acd8
Merge pull request #17642 from filimonov/detach-permanently
...
DETACH TABLE PERMANENTLY
2020-12-17 14:26:51 +03:00
Nikolai Kochetov
44d2194326
Try fix integration tests.
2020-12-16 11:52:04 +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
Mikhail Filimonov
9df7ecb8e6
fixes
2020-12-15 18:06:23 +01:00
Mikhail Filimonov
27ff3a5214
Rework using a separate flag file instead of renames
2020-12-15 15:46:13 +01:00
spongedc
dc27e0a4fd
Fix error code
2020-12-15 20:29:26 +08:00
spongedc
8b2feaeca2
Support SHOW CREATE VIEW Syntax
2020-12-14 22:37:25 +08:00
Mikhail Filimonov
24abcc970b
Tests and fixes
2020-12-14 15:31:13 +01:00
Mikhail Filimonov
87ea1528cb
support for Lazy database
2020-12-14 15:31:13 +01:00
Mikhail Filimonov
4ba80996b0
Detach permanently for DatabaseConnectionMySQL
2020-12-14 15:31:12 +01:00
Mikhail Filimonov
799141362d
Prevent attempts to recreate the table which was detached permanently
2020-12-14 15:31:11 +01:00
Mikhail Filimonov
f6097cf818
Adding DETACH TABLE PERMANENTLY
2020-12-14 15:28:59 +01:00
Alexander Tokmakov
58a31e4882
Merge branch 'master' into allow_atomic_database_inside_materialize_mysql
2020-12-11 16:14:03 +03:00
tavplubix
5f78280aec
Merge pull request #17915 from zhang2014/better_exception_message
...
Better exception message for MaterializeMySQL
2020-12-10 19:26:20 +03:00
tavplubix
f13de96afc
Merge pull request #17366 from zhang2014/fix/ISSUES-16835
...
ISSUES-16835 try fix miss match header with MySQL SHOW statement
2020-12-09 23:12:47 +03:00
zhang2014
bf30aa5ff1
Code style
2020-12-09 16:50:40 +08:00
zhang2014
ef15b1f1fb
Better exception message for MaterializeMySQL
2020-12-09 16:46:54 +08:00
Ivan
0ba712a2d3
Merge branch 'master' into allow_atomic_database_inside_materialize_mysql
2020-12-08 16:45:51 +03:00
Winter Zhang
972cb41fae
Merge branch 'master' into fix/ISSUES-16835
2020-12-08 15:32:58 +08:00
Alexander Tokmakov
39532f7d9e
slightly better DDLWorker initialization and restarting
2020-12-03 21:14:27 +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
19c8399eb0
Merge branch 'master' into database_replicated
2020-12-01 17:33:07 +03:00
Vasily Nemkov
87945fb68b
Merge branch 'master' into HEAD
2020-11-30 23:25:57 +03:00
Alexander Tokmakov
ab197a49c8
better code, fixes
2020-11-30 23:12:43 +03:00
Alexander Tokmakov
f1a52a609b
separate DatabaseReplicatedDDLWorker
2020-11-27 17:04:03 +03:00
zhang2014
a74235397e
ISSUES-16835 try fix miss match header with MySQL SHOW statement
2020-11-24 23:31:43 +08:00
Alexander Tokmakov
e82c63e05c
fixes
2020-11-24 15:28:54 +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
Alexander Tokmakov
dad21ee684
maintain metadata in zk
2020-11-24 13:24:39 +03:00
taichong
a6c2a90756
modify integration test materialize mysql database
...
1. fix asan test err
2. reset pymysql conn if ping err
3. finish mysql & ck killed test
4. modify check_query
2020-11-23 17:55:07 +08:00
Alexey Milovidov
fbbf439338
Merge branch 'master' into Enmk-DateTime64_fixes_comparison
2020-11-23 05:46:17 +03:00
tavplubix
5cc9cb01cd
Merge pull request #16751 from amosbird/globalcontext
...
Make global_context consistent.
2020-11-22 18:46:17 +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
Alexander Tokmakov
7ab4445e99
try another approach
2020-11-20 19:06:27 +03:00
tavplubix
3e335c1e95
Merge pull request #17091 from zhang2014/fix/binlog_checksum
...
Fix MaterializeMySQL SYNC failure when modify binlog_checksum
2020-11-20 13:25:14 +03:00
Amos Bird
1d9d586e20
Make global_context consistent.
2020-11-20 18:23:14 +08:00
Alexander Tokmakov
2283906a11
try support replica recovery
2020-11-19 13:34:45 +03:00
Ivan Lezhankin
fdd1c182ab
Merge remote-tracking branch 'upstream/master' into tcp-port
2020-11-18 16:22:00 +03:00
Ivan Lezhankin
f897f7c93f
Refactor IFunction to execute with const arguments
2020-11-17 16:24:45 +03:00
alexey-milovidov
b494b18748
Merge pull request #17108 from ClickHouse/ya-make-owners
...
Add "OWNER" to ya.make files.
2020-11-17 05:19:46 +03:00
Alexey Milovidov
24f4fa6edf
Follow Arcadia ya.make rules
2020-11-17 00:16:50 +03:00
Alexey Milovidov
3df04ce0c2
Follow Arcadia ya.make rules
2020-11-16 21:24:58 +03:00
Winter Zhang
f6a205d64b
Merge branch 'master' into fix/binlog_checksum
2020-11-16 21:53:22 +08:00
zhang2014
6ef93ac73c
Try fix MaterializeMySQL SYNC with modify binlog_checksum
2020-11-16 21:46:36 +08:00
Vasily Nemkov
63d168d34e
Fixed MySQL and DateTime64 integration.
...
Also updated other places, like type helpers/dispatchers where DateTime64
was implicitly supported before as Decimal64.
2020-11-16 09:02:41 +03:00
Alexander Tokmakov
b0262b3d06
better replica creation
2020-11-13 21:35:45 +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
taichong
010e12eb4b
Replace std::*stringstreams
2020-11-12 13:49:56 +08:00
TCeason
3912ed4965
Merge branch 'master' into add_sync_user_privs_exception
2020-11-12 09:34:08 +08:00
taichong
e2a9fe44b0
modify test error
2020-11-12 08:17:13 +08:00
taichong
5c1a01897a
Revise the code according to the review
2020-11-11 19:27:37 +08:00
taichong
d907afa77e
throw exception when mysql sync user privs error.
2020-11-11 19:27:37 +08:00
Alexander Tokmakov
b94cc5c4e5
remove more stringstreams
2020-11-10 21:22:26 +03:00
Alexander Tokmakov
62ff00ee8b
use WriteBuffer in formatAST(...)
2020-11-09 19:05:40 +03:00
tavplubix
6fb077c2f3
Merge pull request #16704 from TCeason/make_sync_ddl_execute_atomic
...
sync MySQL DDL atomicly
2020-11-09 13:47:02 +03:00
Alexey Milovidov
fd84d16387
Fix "server failed to start" error
2020-11-07 03:14:53 +03:00
taichong
9ce6c4dcb8
according to review modify code
2020-11-06 15:04:05 +08:00
Alexey Milovidov
b56486510f
Improve Arcadia
2020-11-05 12:55:01 +03:00
taichong
fb5e03ebaf
sync MySQL DDL atomicly
...
Now ClickHouse will write metadata and then execute DDL from MySQL.
But If ClickHouse is crashed and it just begin to execute DDL, we
restart the server and then the sync will may be stopped.
e.g.:
MySQL : create table foo.a(id int key); uuid1:1
ClickHouse : write uuid1:1 to .metadata -> server crashed;
Because of ClickHouse's metadata records: uuid1:1, if MySQL run a
query:`insert into foo.a values(1);` ClickHouse will throw a exception:
the table foo.a is not exist.
2020-11-05 17:01:14 +08:00
Alexander Tokmakov
d8ae9fcdb4
fixes, add shard name
2020-11-03 14:30:53 +03:00
Alexander Tokmakov
ac32809b6a
fix #16482
2020-11-02 19:40:39 +03:00
Maxim Akhmedov
3627fabfb9
Remove -g0 form Arcadia build settings.
2020-10-29 17:37:23 +03:00
alexey-milovidov
bf3acecf6f
Merge pull request #16032 from Avogar/mysql_bug
...
Don't touch MySQL database if it's unnecessary
2020-10-29 04:14:26 +03:00
tavplubix
22847613d1
Merge pull request #16437 from ClickHouse/addition_to_16127
...
Addition to #16127
2020-10-28 13:03:13 +03:00
alesapin
8a6be1602b
Merge pull request #16364 from ClickHouse/fix_uuid_mapping_exists
...
Minor improvements in DatabaseCatalog
2020-10-28 10:54:39 +03:00
Alexander Tokmakov
b5ccb5ed5b
review suggestions
2020-10-27 23:52:49 +03:00
Alexander Tokmakov
dba8c85ae4
do not wait while holding lock
2020-10-27 22:56:54 +03:00
Alexander Kuzmenkov
6509f1eb39
Merge branch 'master' into minumum
2020-10-27 21:38:23 +03:00
Mikhail Filimonov
41971e073a
Fix typos reported by codespell
2020-10-27 12:04:03 +01:00
Alexander Tokmakov
cd14f095ab
fix tests
2020-10-26 18:12:16 +03:00
Alexander Tokmakov
636da1318b
Merge branch 'master' into database_replicated
2020-10-26 15:00:43 +03:00
Alexey Milovidov
d5e277f080
Better exceptions rethrow
2020-10-26 06:35:57 +03:00
Alexander Tokmakov
f8f2d62d70
minor improvements in DatabaseCatalog
2020-10-25 20:27:21 +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
Azat Khuzhin
32c449c34f
Add IDatabaseTablesIterator::reset() interface
2020-10-19 00:16:10 +03:00
alesapin
0bb4480fee
Merge pull request #16031 from ClickHouse/database_atomic_patch
...
Minor fix for DatabaseAtomic
2020-10-16 10:08:04 +03:00
Alexander Tokmakov
2f9611f1ae
fix logical error with explicit UUIDs
2020-10-15 19:01:23 +03:00
Pavel Kruglov
ee8a9d2cf1
Don't touch MySQL database if it's unnecessary
2020-10-15 18:57:17 +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
alexey-milovidov
f60ccb4edf
Merge pull request #14295 from ClickHouse/write_structure_of_table_functions
...
Write structure of table functions to metadata
2020-10-13 23:56:09 +03:00
Azat Khuzhin
d16adddb41
Fix drop of materialized view with inner table in Atomic database
...
Materialized view drop the inner table (if any) drop the drop() method,
and this will lead to essure recursive drop() from the drop worker
thread, which will hang:
3 std::__1::condition_variable::wait<> ()
4 DB::DatabaseCatalog::waitTableFinallyDropped (this=0x7ffff7831500, uuid=...) at ../src/Interpreters/DatabaseCatalog.cpp:828
5 DB::InterpreterDropQuery::executeToTable (this=this@entry=0x7fff16ff88a0, table_id_=..., query=...) at ../src/Interpreters/InterpreterDropQuery.cpp:135
6 DB::InterpreterDropQuery::execute (this=this@entry=0x7fff16ff88a0) at ../contrib/libcxx/include/string:1474
7 DB::executeDropQuery (kind=kind@entry=DB::ASTDropQuery::Drop, global_context=..., target_table_id=...) at ../src/Storages/StorageMaterializedView.cpp:156
8 DB::StorageMaterializedView::drop (this=0x7ffefc348f40) at ../src/Storages/StorageMaterializedView.cpp:169
9 DB::DatabaseCatalog::dropTableFinally (this=this@entry=0x7ffff7831500, table=...) at ../src/Interpreters/DatabaseCatalog.cpp:775
10 DB::DatabaseCatalog::dropTableDataTask (this=0x7ffff7831500) at ../src/Interpreters/DatabaseCatalog.cpp:745
Fix this by dropping the inner table just before scheduling job the the
drop worker thread.
2020-10-12 21:46:07 +03:00
Alexey Milovidov
269b6383f5
Check for #pragma once in headers
2020-10-10 21:37:02 +03: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
tavplubix
2f95609f98
Merge pull request #15448 from ClickHouse/allow_synchronous_drop_for_atomic_db
...
Allow synchronous DROP/DETACH TABLE for Atomic
2020-10-01 01:14:31 +03:00
tavplubix
c9eeb149fd
Merge pull request #15384 from zhang2014/fix/ISSUES-15365
...
ISSUES-15365 fix attach mysql database database
2020-09-30 11:27:15 +03:00
Alexander Tokmakov
e156e6115e
add setting
2020-09-30 01:30:34 +03:00
Alexander Tokmakov
5d19ed04f6
allow synchronous drop/detach table for Atomic
2020-09-29 16:47:08 +03:00
zhang2014
9e94c077e7
IESSUES-15365 try fix integration test
2020-09-29 10:39:30 +08:00
zhang2014
e5a6d06820
ISSUES-15365 try fix integration test failure
2020-09-28 21:15:02 +08:00
zhang2014
e40d23cfe5
ISSUES-15365 add ya make
2020-09-28 19:11:40 +08:00
zhang2014
d3047d0783
ISSUES-15365 fix attach mysql database failure
2020-09-28 18:02:30 +08: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
alexey-milovidov
e29c4c3cc4
Merge pull request #15024 from ClickHouse/fix_renameat2_einval_on_macos
...
Fix EINVAL in renameat2 on MacOS
2020-09-21 21:08:17 +03:00
tavplubix
7f629c8185
Update DatabaseMemory.cpp
2020-09-21 14:12:45 +03:00
alesapin
5ffee8808a
Alter remove column properties and TTLs ( #14742 )
2020-09-20 16:27:33 +03:00
Alexander Tokmakov
46aa307d0a
fix EINVAL in renameat2 on MacOS
2020-09-19 17:19:06 +03:00
tavplubix
6e0bdaf46d
Merge pull request #14535 from zhang2014/fix/datetime
...
ISSUES-4006 support decimal data type for MaterializedMySQL
2020-09-19 14:05:32 +03:00
Alexander Tokmakov
1ca9a92b21
Merge branch 'master' into write_structure_of_table_functions
2020-09-18 21:09:23 +03:00
tavplubix
0597ad3150
fix typo
2020-09-17 21:47:21 +03:00
Alexander Tokmakov
1c37ac7c9d
fix
2020-09-17 21:19:02 +03:00
Alexander Tokmakov
41e99cf261
Merge branch 'master' into allow_atomic_database_inside_materialize_mysql
2020-09-17 20:28:50 +03:00
zhang2014
64032e22a2
Merge branch 'master' into fix/datetime
2020-09-18 00:28:09 +08:00
zhang2014
c5b56c24f8
ISSUES-14894 fix MaterializeMySQL temp metadata file exists
2020-09-17 14:44:05 +08:00
Alexander Tokmakov
0ecf8e595f
cleanup code, add test
2020-09-15 16:41:53 +03:00
Artem Zuikov
51ba12c2c3
Try speedup build ( #14809 )
2020-09-15 12:55:57 +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
BohuTANG
00b8d91eb8
Fix mysql replication TableMapEvent optional metadata ignore
2020-09-10 19:46:59 +08:00
zhang2014
094897fe69
Merge branch 'master' into fix/datetime
2020-09-09 23:37:54 +08:00
Alexander Tokmakov
d278d849e4
Merge branch 'master' into write_structure_of_table_functions
2020-09-09 17:12:35 +03:00
Vasily Nemkov
3973a17530
MySql datatypes dateTime64 and decimal ( #11512 )
2020-09-09 15:18:02 +03:00
Winter Zhang
18b4c5997d
Merge branch 'master' into fix/datetime
2020-09-08 11:32:48 +08:00
Alexey Milovidov
e3924b8057
Fix "Arcadia"
2020-09-08 01:14:13 +03:00
zhang2014
b7e9d5e72d
ISSUES-4006 support decimal for MaterializedMySQL engine
2020-09-07 17:43:25 +08:00
Alexander Tokmakov
b840d741d0
Merge branch 'master' into write_structure_of_table_functions
2020-09-04 13:00:07 +03:00
zhang2014
dd0feeeaa1
ISSUES-4006 support datetime with precision
2020-09-03 11:03:28 +08:00
Alexey Milovidov
96038e9d54
Fix for Lazy database
2020-09-03 04:06:12 +03:00