[MDEV-4065] thd_kill_statement service Created: 2013-01-17  Updated: 2013-01-21  Resolved: 2013-01-21

Status: Closed
Project: MariaDB Server
Component/s: None
Fix Version/s: 5.5.29

Type: Task Priority: Major
Reporter: Sergei Golubchik Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: plugins

Issue Links:
Blocks

 Description   

Add the thd_kill_statement service that provides read access to the thd->killed flag.

This service will obsolete thd_killed() from the plugin.h, we'll remove this declaration, but keep the function in the sql_class.cc until the text major plugin API version change.

The service can look like this:

enum thd_kill_levels {
  THD_IS_NOT_KILLED=0,
  THD_ABORT_SOFTLY=50, /**< abort when possible, don't leave tables corrupted */
  THD_ABORT_ASAP=100, /**< abort asap */
};
 
#define thd_killed(THD)   (thd_kill_level(THD) == THD_ABORT_ASAP)
 
enum thd_kill_levels thd_kill_level(const MYSQL_THD);

it maps the internal bitmap of various kill states into few levels that a plugin needs to care about.


Generated at Thu Feb 08 06:53:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.