Documentation Home
HeatWave User Guide
Related Documentation Download this Manual
PDF (US Ltr) - 2.5Mb
PDF (A4) - 2.5Mb


2.20.1.6 task_status

The task_status routine returns the task status.

The application-level variant for this routine is app_task_status.

This topic contains the following sections:

Syntax
Press CTRL+C to copy
mysql> SELECT mysql_tasks.task_status(IN 'task_id' VARCHAR(36));

The task_id (VARCHAR 36) parameter specifies the unique task ID (UUID) of the task whose information is required.

Syntax Example
Press CTRL+C to copy
mysql> SELECT JSON_PRETTY(mysql_tasks.task_status(@task_id));

This example returns the status of the asynchronous task with task ID stored in the session variable @task_id. The output is similar to the following:

Press CTRL+C to copy
| { "id": "17efb56b-52a1-11f0-bca4-020017205654", "data": { "Async Task completed at": "2025-06-26 15:20:34.000000" }, "name": "DemoAsyncTask", "alias": "Thu-7", "status": "COMPLETED", "message": "Execution finished.", "progress": 100, "row_hash": "fa701b650afd8638049f8fd436a500f5", "task_data": { "mysqlMetadata": { "autoGc": true, "events": [ "`demo_db`.`17ef9cf8-52a1-11f0-bca4-020017205654`" ] } }, "task_type": "Async_SQL", "server_uuid": "5172a252-8a06-11ef-b3bb-02001727ecef", "progress_bar": "##########", "connection_id": 65220, "starting_time": "2025-06-26 15:20:29.000000", "scheduled_time": "2025-06-26 15:20:29.000000", "estimated_remaining_time": 0.00000, "estimated_completion_time": "2025-06-26 15:20:34.000000" } |