Commit Graph

26 Commits

Author SHA1 Message Date
alesapin
efba3a2113 Add more logging and touch test for materialize mysql 2023-07-31 14:32:09 +02:00
Val Doroshchuk
bd09ad6736 MaterializedMySQL: Fix typos in tests 2023-07-25 16:20:24 +02:00
Kseniia Sumarokova
e05e0ec557
Merge pull request #52318 from valbok/utf8-names
MaterializedMySQL: Support unquoted utf-8 strings in DDL
2023-07-24 21:49:33 +02:00
Alexander Tokmakov
c3e2077449
Merge branch 'master' into comment-db 2023-07-24 20:53:46 +03:00
Val Doroshchuk
efa638ef3c MaterializedMySQL: Support unquoted utf-8 strings in DDL
Since ClickHouse does not support unquoted utf-8 strings but MySQL does.

Instead of fixing Lexer to recognize utf-8 chars as TokenType::BareWord,
suggesting to quote all unrecognized tokens before applying any DDL.

Actual parsing and validating the syntax will be done by particular Parser.

If there is any TokenType::Error, the query is unable to be parsed anyway.
Quoting such tokens can provide the support of utf-8 names.

See `tryQuoteUnrecognizedTokens` and `QuoteUnrecognizedTokensTest`.

mysql> CREATE TABLE 道.渠(...

is converted to

CREATE TABLE `道`.`渠`(...

Also fixed the bug with missing * while doing SELECT in full sync because db or table name are back quoted when not needed.
2023-07-24 11:12:10 +02:00
robot-ch-test-poll4
1d6e85da91
Merge pull request #52084 from valbok/conv-charsets
MaterializedMySQL: Introduce charset conversion
2023-07-23 18:36:30 +02:00
Val Doroshchuk
d16d444943 MaterializedMySQL: Add support of double quoted comments 2023-07-20 13:59:01 +02:00
Song Liyong
7837559dbf MaterializedMySQL: Support CREATE TABLE AS SELECT 2023-07-19 13:33:02 +02:00
Song Liyong
6ae5207819 MaterializedMySQL: Introduce charset conversion 2023-07-18 15:55:55 +02:00
Val Doroshchuk
24e2bae7bd MaterializedMySQL: Rename materialize_with_ddl.py -> materialized_with_ddl.py
Make it more consistent to current names.
Keep some tests with `ENGINE = MaterializeMySQL` to test BC.
2023-06-16 10:16:11 +02:00
Val Doroshchuk
879db5098a MaterializedMySQL: Add test_named_collections 2023-06-13 10:09:12 +02:00
zzsmdfj
a0f391745d to 15357_MaterializeMySQL_support_drop_mulit_table-fix style-black 2022-11-21 11:48:57 +08:00
zzsmdfj
e177927efb to 15357_MaterializeMySQL_support_drop_mulit_table-fix code-style 2022-11-19 12:05:27 +08:00
zzsmdfj
6a998917b0 to MaterializeMySQL_support_drop_mulit_table 2022-11-18 21:29:13 +08:00
Stig Bakken
9020631826 Ignore SAVEPOINT queries in MaterializedMySQL 2022-11-10 23:27:21 +01:00
Mikhail f. Shiryaev
e6f5a3f98b
Apply black formatter to all *.py files in the repo 2022-03-22 17:39:58 +01:00
alesapin
1eefdc8df6 Fix more test 2022-03-15 17:31:33 +01:00
zzsmdfj
67b9f81104 to #31469_MaterializedMysql_mysqlDate2CkDate32 2022-03-08 18:17:22 +08:00
zzsmdfj
ac264e33d5 MaterializedMySQL_add_table_list_settings 2022-02-10 13:52:13 +08:00
zzsmdfj
e9eed1f927 to #15182_MaterializeMySQL_support_bit_type 2021-12-17 15:03:24 +08:00
Stig Bakken
bb521cd363 Add TABLE OVERRIDE feature for MaterializedMySQL databases 2021-12-07 09:45:02 +01:00
Haavard Kvaalen
fa7b547212 Always quote table name
This fixes an issue if the database contained a table named 'table'.
We would previously generate a query that ClickHouse could not parse.
2021-11-25 11:49:23 +01:00
Stig Bakken
ff46e8bb51 Drop support for DatabaseOrdinary in MaterializedMySQL
1. Dropped support for DatabaseOrdinary for MaterializeMySQL. It
   is marked as experimental, and dropping support makes the code
   more maintaible, and speeds up integration tests by 50%.

2. Get rid of thread name logic for StorageMaterializeMySQL wrapping,
   use setInternalQuery instead (similar to MaterializedPostgreSQL).
2021-11-18 11:46:51 +01:00
Stig Bakken
3eac620d4d Handle CREATE TABLE LIKE in MaterializedMySQL 2021-11-15 14:43:50 +01:00
Haavard Kvaalen
c41923c595 MaterializedMySQL: Update GTID set at end of transaction
We would update the set of seen GTIDs as soon as we saw a GTID_EVENT,
which arrives before a transaction.  This would mostly work fine, but
if we lost the connection to MySQL in the middle of a large transaction
we would persist that the transaction had been processed as soon as the
transaction had started.  When the connection was reestablished, we
would not process the transaction again, which meant that we only
applied parts of it.

Fix this by updating the seen GTIDs at the end of the transaction
instead.
2021-10-07 14:09:00 +02:00
Alexander Tokmakov
63ab38ee09 rename MaterializeMySQL to MaterializedMySQL 2021-07-26 21:17:28 +03:00