For the complete documentation index, see llms.txt. This page is also available as Markdown.

KILL Statement Service

Plugin API reference: KILL Statement Service. Generated from the MariaDB server headers by doxygen and moxygen.

Plugin API / Services for Plugins / Plugin Services

This service provides functions that allow plugins to support the KILL statement.

In MySQL support for the KILL statement is cooperative. The KILL statement only sets a "killed" flag. This function returns the value of that flag. A thread should check it often, especially inside time-consuming loops, and gracefully abort the operation if it is non-zero.

Classes

Macros

Name
Description

Backward compatibility helper

Check if a KILL statement was issued for the given thread.


thd_killed

#define thd_killed(THD, THD) (thd_kill_level(THD) == THD_ABORT_ASAP)

Defined in service_kill_statement.h:62

Backward compatibility helper

Parameters

Parameter
Type
Description

THD

thread handle

THD

thread handle

Return Values

Value
Description

0

No KILL statement was issued, continue normally

1

There was a KILL statement, abort the execution.


thd_kill_level

Defined in service_kill_statement.h:73

Check if a KILL statement was issued for the given thread.

Returns

thd_kill_levels values

Parameters

Parameter
Type
Description

THD

thread handle

THD

thread handle

Enumerations

Name
Description

thd_kill_levels

Defined in service_kill_statement.h:45

Value
Description

THD_IS_NOT_KILLED

THD_ABORT_SOFTLY

abort when possible, don't leave tables corrupted

THD_ABORT_ASAP

abort asap

Variables


thd_kill_statement_service

Type: struct kill_statement_service_st *

Defined in service_kill_statement.h:53

Class Definitions

kill_statement_service_st

Defined in service_kill_statement.h:51

Public Attributes

Return
Name
Description

thd_kill_level_func

Defined in service_kill_statement.h:1

This page is licensed: GPLv2

spinner

Last updated

Was this helpful?