Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3(EOL), 10.11
-
Linux n.a.
Description
Recently while trouble shooting we have seen an interesting state in SHOW PROCESSLIST: "Reset for next command"
Google did not show much about this state. Investigating in the source code was showing that this stage exist beginning with 10.3 and at least until 10.11
This state is not documented in the documentation: https://mariadb.com/kb/en/thread-states/
So one should update the MariaDB documentation accordingly:
sql/mysqld.cc
PSI_stage_info stage_after_apply_event= { 0, "After apply log event", 0}; |
PSI_stage_info stage_after_create= { 0, "After create", 0}; |
PSI_stage_info stage_after_opening_tables= { 0, "After opening tables", 0}; |
PSI_stage_info stage_after_table_lock= { 0, "After table lock", 0}; |
PSI_stage_info stage_allocating_local_table= { 0, "Allocating local table", 0}; |
PSI_stage_info stage_alter_inplace_prepare= { 0, "Preparing for alter table", 0}; |
PSI_stage_info stage_alter_inplace= { 0, "Altering table", 0}; |
PSI_stage_info stage_alter_inplace_commit= { 0, "Committing alter table to storage engine", 0}; |
PSI_stage_info stage_apply_event= { 0, "Apply log event", 0}; |
PSI_stage_info stage_changing_master= { 0, "Changing master", 0}; |
PSI_stage_info stage_checking_master_version= { 0, "Checking master version", 0}; |
PSI_stage_info stage_checking_permissions= { 0, "Checking permissions", 0}; |
PSI_stage_info stage_checking_privileges_on_cached_query= { 0, "Checking privileges on cached query", 0}; |
PSI_stage_info stage_checking_query_cache_for_query= { 0, "Checking query cache for query", 0}; |
PSI_stage_info stage_cleaning_up= { 0, "Reset for next command", 0}; |
PSI_stage_info stage_closing_tables= { 0, "Closing tables", 0}; |
PSI_stage_info stage_connecting_to_master= { 0, "Connecting to master", 0}; |
PSI_stage_info stage_converting_heap_to_myisam= { 0, "Converting HEAP to " TMP_ENGINE_NAME, 0}; |
PSI_stage_info stage_copying_to_group_table= { 0, "Copying to group table", 0}; |
PSI_stage_info stage_copying_to_tmp_table= { 0, "Copying to tmp table", 0}; |
PSI_stage_info stage_copy_to_tmp_table= { 0, "Copy to tmp table", 0}; |
PSI_stage_info stage_creating_delayed_handler= { 0, "Creating delayed handler", 0}; |
PSI_stage_info stage_creating_sort_index= { 0, "Creating sort index", 0}; |
PSI_stage_info stage_creating_table= { 0, "Creating table", 0}; |
PSI_stage_info stage_creating_tmp_table= { 0, "Creating tmp table", 0}; |
PSI_stage_info stage_deleting_from_main_table= { 0, "Deleting from main table", 0}; |
PSI_stage_info stage_deleting_from_reference_tables= { 0, "Deleting from reference tables", 0}; |
PSI_stage_info stage_discard_or_import_tablespace= { 0, "Discard_or_import_tablespace", 0}; |
PSI_stage_info stage_enabling_keys= { 0, "Enabling keys", 0}; |
PSI_stage_info stage_end= { 0, "End of update loop", 0}; |
PSI_stage_info stage_executing= { 0, "Executing", 0}; |
PSI_stage_info stage_execution_of_init_command= { 0, "Execution of init_command", 0}; |
PSI_stage_info stage_explaining= { 0, "Explaining", 0}; |
PSI_stage_info stage_finding_key_cache= { 0, "Finding key cache", 0}; |
PSI_stage_info stage_finished_reading_one_binlog_switching_to_next_binlog= { 0, "Finished reading one binlog; switching to next binlog", 0}; |
PSI_stage_info stage_flushing_relay_log_and_master_info_repository= { 0, "Flushing relay log and master info repository.", 0}; |
PSI_stage_info stage_flushing_relay_log_info_file= { 0, "Flushing relay-log info file.", 0}; |
PSI_stage_info stage_freeing_items= { 0, "Freeing items", 0}; |
PSI_stage_info stage_fulltext_initialization= { 0, "Fulltext initialization", 0}; |
PSI_stage_info stage_got_handler_lock= { 0, "Got handler lock", 0}; |
PSI_stage_info stage_got_old_table= { 0, "Got old table", 0}; |
PSI_stage_info stage_init= { 0, "Init", 0}; |
PSI_stage_info stage_init_update= { 0, "Init for update", 0}; |
PSI_stage_info stage_insert= { 0, "Insert", 0}; |
PSI_stage_info stage_invalidating_query_cache_entries_table= { 0, "Invalidating query cache entries (table)", 0}; |
PSI_stage_info stage_invalidating_query_cache_entries_table_list= { 0, "Invalidating query cache entries (table list)", 0}; |
PSI_stage_info stage_killing_slave= { 0, "Killing slave", 0}; |
PSI_stage_info stage_logging_slow_query= { 0, "Logging slow query", 0}; |
PSI_stage_info stage_making_temp_file_append_before_load_data= { 0, "Making temporary file (append) before replaying LOAD DATA INFILE.", 0}; |
PSI_stage_info stage_making_temp_file_create_before_load_data= { 0, "Making temporary file (create) before replaying LOAD DATA INFILE.", 0}; |
PSI_stage_info stage_manage_keys= { 0, "Manage keys", 0}; |
PSI_stage_info stage_master_has_sent_all_binlog_to_slave= { 0, "Master has sent all binlog to slave; waiting for binlog to be updated", 0}; |
PSI_stage_info stage_opening_tables= { 0, "Opening tables", 0}; |
PSI_stage_info stage_optimizing= { 0, "Optimizing", 0}; |
PSI_stage_info stage_preparing= { 0, "Preparing", 0}; |
PSI_stage_info stage_purging_old_relay_logs= { 0, "Purging old relay logs", 0}; |
PSI_stage_info stage_query_end= { 0, "Query end", 0}; |
PSI_stage_info stage_starting_cleanup= { 0, "Starting cleanup", 0}; |
PSI_stage_info stage_rollback= { 0, "Rollback", 0}; |
PSI_stage_info stage_rollback_implicit= { 0, "Rollback_implicit", 0}; |
PSI_stage_info stage_commit= { 0, "Commit", 0}; |
PSI_stage_info stage_commit_implicit= { 0, "Commit_implicit", 0}; |
PSI_stage_info stage_queueing_master_event_to_the_relay_log= { 0, "Queueing master event to the relay log", 0}; |
PSI_stage_info stage_reading_event_from_the_relay_log= { 0, "Reading event from the relay log", 0}; |
PSI_stage_info stage_recreating_table= { 0, "Recreating table", 0}; |
PSI_stage_info stage_registering_slave_on_master= { 0, "Registering slave on master", 0}; |
PSI_stage_info stage_removing_duplicates= { 0, "Removing duplicates", 0}; |
PSI_stage_info stage_removing_tmp_table= { 0, "Removing tmp table", 0}; |
PSI_stage_info stage_rename= { 0, "Rename", 0}; |
PSI_stage_info stage_rename_result_table= { 0, "Rename result table", 0}; |
PSI_stage_info stage_requesting_binlog_dump= { 0, "Requesting binlog dump", 0}; |
PSI_stage_info stage_reschedule= { 0, "Reschedule", 0}; |
PSI_stage_info stage_searching_rows_for_update= { 0, "Searching rows for update", 0}; |
PSI_stage_info stage_sending_binlog_event_to_slave= { 0, "Sending binlog event to slave", 0}; |
PSI_stage_info stage_sending_cached_result_to_client= { 0, "Sending cached result to client", 0}; |
PSI_stage_info stage_sending_data= { 0, "Sending data", 0}; |
PSI_stage_info stage_setup= { 0, "Setup", 0}; |
PSI_stage_info stage_show_explain= { 0, "Show explain", 0}; |
PSI_stage_info stage_slave_has_read_all_relay_log= { 0, "Slave has read all relay log; waiting for the slave I/O thread to update it", 0}; |
PSI_stage_info stage_sorting= { 0, "Sorting", 0}; |
PSI_stage_info stage_sorting_for_group= { 0, "Sorting for group", 0}; |
PSI_stage_info stage_sorting_for_order= { 0, "Sorting for order", 0}; |
PSI_stage_info stage_sorting_result= { 0, "Sorting result", 0}; |
PSI_stage_info stage_statistics= { 0, "Statistics", 0}; |
PSI_stage_info stage_sql_thd_waiting_until_delay= { 0, "Waiting until MASTER_DELAY seconds after master executed event", 0 }; |
PSI_stage_info stage_storing_result_in_query_cache= { 0, "Storing result in query cache", 0}; |
PSI_stage_info stage_storing_row_into_queue= { 0, "Storing row into queue", 0}; |
PSI_stage_info stage_system_lock= { 0, "System lock", 0}; |
PSI_stage_info stage_unlocking_tables= { 0, "Unlocking tables", 0}; |
PSI_stage_info stage_table_lock= { 0, "Table lock", 0}; |
PSI_stage_info stage_filling_schema_table= { 0, "Filling schema table", 0}; |
PSI_stage_info stage_update= { 0, "Update", 0}; |
PSI_stage_info stage_updating= { 0, "Updating", 0}; |
PSI_stage_info stage_updating_main_table= { 0, "Updating main table", 0}; |
PSI_stage_info stage_updating_reference_tables= { 0, "Updating reference tables", 0}; |
PSI_stage_info stage_upgrading_lock= { 0, "Upgrading lock", 0}; |
PSI_stage_info stage_user_lock= { 0, "User lock", 0}; |
PSI_stage_info stage_user_sleep= { 0, "User sleep", 0}; |
PSI_stage_info stage_verifying_table= { 0, "Verifying table", 0}; |
PSI_stage_info stage_waiting_for_delay_list= { 0, "Waiting for delay_list", 0}; |
PSI_stage_info stage_waiting_for_gtid_to_be_written_to_binary_log= { 0, "Waiting for GTID to be written to binary log", 0}; |
PSI_stage_info stage_waiting_for_handler_insert= { 0, "Waiting for handler insert", 0}; |
PSI_stage_info stage_waiting_for_handler_lock= { 0, "Waiting for handler lock", 0}; |
PSI_stage_info stage_waiting_for_handler_open= { 0, "Waiting for handler open", 0}; |
PSI_stage_info stage_waiting_for_insert= { 0, "Waiting for INSERT", 0}; |
PSI_stage_info stage_waiting_for_master_to_send_event= { 0, "Waiting for master to send event", 0}; |
PSI_stage_info stage_waiting_for_master_update= { 0, "Waiting for master update", 0}; |
PSI_stage_info stage_waiting_for_relay_log_space= { 0, "Waiting for the slave SQL thread to free enough relay log space", 0}; |
PSI_stage_info stage_waiting_for_semi_sync_ack_from_slave= { 0, "Waiting for semi-sync ACK from slave", 0}; |
PSI_stage_info stage_waiting_for_semi_sync_slave={ 0, "Waiting for semi-sync slave connection", 0}; |
PSI_stage_info stage_reading_semi_sync_ack={ 0, "Reading semi-sync ACK from slave", 0}; |
PSI_stage_info stage_waiting_for_slave_mutex_on_exit= { 0, "Waiting for slave mutex on exit", 0}; |
PSI_stage_info stage_waiting_for_slave_thread_to_start= { 0, "Waiting for slave thread to start", 0}; |
PSI_stage_info stage_waiting_for_table_flush= { 0, "Waiting for table flush", 0}; |
PSI_stage_info stage_waiting_for_query_cache_lock= { 0, "Waiting for query cache lock", 0}; |
PSI_stage_info stage_waiting_for_the_next_event_in_relay_log= { 0, "Waiting for the next event in relay log", 0}; |
PSI_stage_info stage_waiting_for_the_slave_thread_to_advance_position= { 0, "Waiting for the slave SQL thread to advance position", 0}; |
PSI_stage_info stage_waiting_to_finalize_termination= { 0, "Waiting to finalize termination", 0}; |
PSI_stage_info stage_waiting_to_get_readlock= { 0, "Waiting to get readlock", 0}; |
PSI_stage_info stage_binlog_waiting_background_tasks= { 0, "Waiting for background binlog tasks", 0}; |
PSI_stage_info stage_binlog_write= { 0, "Writing to binlog", 0}; |
PSI_stage_info stage_binlog_processing_checkpoint_notify= { 0, "Processing binlog checkpoint notification", 0}; |
PSI_stage_info stage_binlog_stopping_background_thread= { 0, "Stopping binlog background thread", 0}; |
PSI_stage_info stage_waiting_for_work_from_sql_thread= { 0, "Waiting for work from SQL thread", 0}; |
PSI_stage_info stage_waiting_for_prior_transaction_to_commit= { 0, "Waiting for prior transaction to commit", 0}; |
PSI_stage_info stage_waiting_for_prior_transaction_to_start_commit= { 0, "Waiting for prior transaction to start commit before starting next transaction", 0}; |
PSI_stage_info stage_waiting_for_room_in_worker_thread= { 0, "Waiting for room in worker thread event queue", 0}; |
PSI_stage_info stage_waiting_for_workers_idle= { 0, "Waiting for worker threads to be idle", 0}; |
PSI_stage_info stage_waiting_for_ftwrl= { 0, "Waiting due to global read lock", 0}; |
PSI_stage_info stage_waiting_for_ftwrl_threads_to_pause= { 0, "Waiting for worker threads to pause for global read lock", 0}; |
PSI_stage_info stage_waiting_for_rpl_thread_pool= { 0, "Waiting while replication worker thread pool is busy", 0}; |
PSI_stage_info stage_waiting_for_deadlock_kill= { 0, "Waiting for parallel replication deadlock handling to complete", 0}; |
PSI_stage_info stage_master_gtid_wait_primary= { 0, "Waiting in MASTER_GTID_WAIT() (primary waiter)", 0}; |
PSI_stage_info stage_master_gtid_wait= { 0, "Waiting in MASTER_GTID_WAIT()", 0}; |
PSI_stage_info stage_gtid_wait_other_connection= { 0, "Waiting for other master connection to process GTID received on multiple master connections", 0}; |
PSI_stage_info stage_slave_background_process_request= { 0, "Processing requests", 0}; |
PSI_stage_info stage_slave_background_wait_request= { 0, "Waiting for requests", 0}; |
If I can help you somehow, please let me know...