Features: 1、Support WHERE/ORDER BY/LIMIT 2、Columns:TableName、CreatTime、FinishTime、State 3、Only “And” between conditions 4、TableName and State column only support "=" operator 5、CreateTime and FinishTime column support “=”,“>=”,"<=",">","<","!=" operators 6、CreateTime and FinishTime column support Date and DateTime string, eg:"2019-12-04" or "2019-12-04 17:18:00" TestCase: MySQL [haibotest]> show alter table column where State='FINISHED' and CreateTime > '2019-12-03' order by FinishTime desc limit 0,2; +-------+---------------+---------------------+---------------------+---------------+---------+---------------+---------------+---------------+----------+------+----------+---------+ | JobId | TableName | CreateTime | FinishTime | IndexName | IndexId | OriginIndexId | SchemaVersion | TransactionId | State | Msg | Progress | Timeout | +-------+---------------+---------------------+---------------------+---------------+---------+---------------+---------------+---------------+----------+------+----------+---------+ | 11134 | test_schema_2 | 2019-12-03 19:21:42 | 2019-12-03 19:22:11 | test_schema_2 | 11135 | 11059 | 1:192010000 | 3 | FINISHED | | N/A | 86400 | | 11096 | test_schema_3 | 2019-12-03 19:21:31 | 2019-12-03 19:21:51 | test_schema_3 | 11097 | 11018 | 1:2063361382 | 2 | FINISHED | | N/A | 86400 | +-------+---------------+---------------------+---------------------+---------------+---------+---------------+---------------+---------------+----------+------+----------+---------+ 2 rows in set (0.00 sec)
1.8 KiB
SHOW ALTER
Description
This statement is used to show the execution of various modification tasks currently under way. Grammar: SHOW ALTER [CLUSTER | TABLE [COLUMN | ROLLUP] [FROM db_name]];
Explain: TABLE COLUMN:Shows the task of alter table column. Support grammar [WHERE TableName|CreateTime|FinishTime|State] [ORDER BY] [LIMIT] TABLE ROLLUP: Shows the task of creating or deleting ROLLUP index If db_name is not specified, use the current default DB CLUSTER: Show the cluster operation related tasks (only administrators use! To be realized...
example
-
Show the task execution of all modified columns of default DB SHOW ALTER TABLE COLUMN;
-
Show the last task execution of modified columns of some table SHOW ALTER TABLE COLUMN WHERE TableName = "table1" ORDER BY CreateTime LIMIT 1;
-
Show the execution of tasks to create or delete ROLLUP index for specified DB SHOW ALTER TABLE ROLLUP FROM example_db;
-
Show cluster operations related tasks (only administrators use! To be realized... SHOW ALTER CLUSTER;
keyword
SHOW,ALTER