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

Support traffic statements in parser #57807

Open
Tracked by #57767
djshow832 opened this issue Nov 28, 2024 · 0 comments · May be fixed by #57808
Open
Tracked by #57767

Support traffic statements in parser #57807

djshow832 opened this issue Nov 28, 2024 · 0 comments · May be fixed by #57808
Assignees

Comments

@djshow832
Copy link
Contributor

djshow832 commented Nov 28, 2024

Support SQL to capture and replay traffic using TiProxy. This is a parser issue.

TRAFFIC CAPTURE TO "/tmp/traffic" DURATION="1h" ENCRYPTION_METHOD="aes256-ctr" COMPRESS=false
TRAFFIC REPLAY FROM "/tmp/traffic" USER="u1" PASSWORD="123456" SPEED=1.0
CANCEL TRAFFIC JOBS
SHOW TRAFFIC JOBS

Refer to similar statements:

PLAN REPLAYER DUMP EXPLAIN select * from t;
PLAN REPLAYER LOAD 'file_name';
PLAN REPLAYER CAPTURE 'sql_digest' '*';
SELECT * FROM mysql.plan_replayer_task;    # query plan replayer tasks

BACKUP DATABASE `test` TO 's3://backup/' COMPRESSION_LEVEL=3 ENCRYPTION_METHOD='aes256';
SHOW BACKUPS;
RESTORE DATABASE * FROM 's3://backup/'  CONCURRENCY = 64 CHECKSUM = FALSE;
SHOW RESTORES;
KILL 5857102839209263511;   # kill backup/restore job
SHOW BR JOB 1;
CANCEL BR JOB 1;

IMPORT INTO t FROM '/path/to/file.csv' WITH SKIP_ROWS=1 THREAD=10;
SHOW IMPORT JOBS;
CANCEL IMPORT JOB 1;

ADMIN CANCEL DDLS;
ADMIN SHOW DDL JOBS;

SET @@global.tidb_ttl_job_enable = OFF;     # cancel all ttl jobs
SELECT * FROM mysql.tidb_ttl_table_status;    # query ttl jobs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant