Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support mydumper dump data #8500

Merged
merged 2 commits into from Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/query/service/src/servers/mysql/mysql_federated.rs
Expand Up @@ -217,8 +217,13 @@ impl MySQLFederated {
None,
),
// mydumper.
("(?i)^(/\\*!80003 SET(.*) \\*/)$", None),
("(?i)^(SHOW MASTER STATUS)", None),
("(?i)^(SHOW ALL SLAVES STATUS)", None),
("(?i)^(LOCK BINLOG FOR BACKUP)", None),
("(?i)^(LOCK TABLES FOR BACKUP)", None),
("(?i)^(UNLOCK BINLOG(.*))", None),
("(?i)^(/\\*!40101 SET(.*) \\*/)$", None),
// DBeaver.
("(?i)^(SHOW WARNINGS)", None),
("(?i)^(/\\* ApplicationName=(.*)SHOW WARNINGS)", None),
Expand Down
Expand Up @@ -15,6 +15,7 @@ DB.Table: 'system'.'columns', Table: columns-table_id:1, ver:0, Engine: SystemCo
| cluster_by | system | tables_with_history | VARCHAR | | | false | |
| cluster_id | system | query_log | VARCHAR | | | false | |
| columns | system | query_log | VARCHAR | | | false | |
| command | system | processes | VARCHAR | | | false | |
| comment | system | columns | VARCHAR | | | false | |
| comment | system | stages | VARCHAR | | | false | |
| copy_options | system | stages | VARCHAR | | | false | |
Expand Down Expand Up @@ -123,7 +124,6 @@ DB.Table: 'system'.'columns', Table: columns-table_id:1, ver:0, Engine: SystemCo
| stage_params | system | stages | VARCHAR | | | false | |
| stage_type | system | stages | VARCHAR | | | false | |
| start_time | system | clustering_history | TIMESTAMP | | | false | |
| state | system | processes | VARCHAR | | | false | |
| status | system | processes | VARCHAR | | | false | |
| syntax | system | functions | VARCHAR | | | false | |
| table | system | clustering_history | VARCHAR | | | false | |
Expand Down
Expand Up @@ -50,7 +50,8 @@ impl ColumnsTable {
NULL AS collation_name,
NULL AS domain_catalog,
NULL AS domain_schema,
NULL AS domain_name
NULL AS domain_name,
NULL AS extra
FROM system.columns;";

let mut options = BTreeMap::new();
Expand Down
2 changes: 1 addition & 1 deletion src/query/storages/preludes/src/system/processes_table.rs
Expand Up @@ -126,7 +126,7 @@ impl ProcessesTable {
DataField::new("type", Vu8::to_data_type()),
DataField::new_nullable("host", Vu8::to_data_type()),
DataField::new("user", Vu8::to_data_type()),
DataField::new("state", Vu8::to_data_type()),
DataField::new("command", Vu8::to_data_type()),
DataField::new("database", Vu8::to_data_type()),
DataField::new("extra_info", Vu8::to_data_type()),
DataField::new("memory_usage", i64::to_data_type()),
Expand Down
@@ -1,5 +1,5 @@
statement query TT
select state, database from system.processes;
select command, database from system.processes;

----
Query default
Expand Down
Expand Up @@ -79,6 +79,7 @@ collation_name NULL NO NULL
domain_catalog NULL NO NULL
domain_schema NULL NO NULL
domain_name NULL NO NULL
extra NULL NO NULL

statement ok
DROP TABLE IF EXISTS t;
Expand Down