CMGDK r49-rc2
组合类型 | 宏定义 | 类型定义 | 枚举 | 函数 | 变量
K:/CMGDKv18/SDK/Source/SQL/MySQL/include/thr_lock.h文件参考
#include <my_pthread.h>
#include <my_list.h>

浏览该文件的源代码。

组合类型

struct  st_thr_lock_info
struct  st_thr_lock_owner
struct  st_thr_lock_data
struct  st_lock_list
struct  st_thr_lock

宏定义

#define thr_lock_owner_init(owner, info_arg)   (owner)->info= (info_arg)

类型定义

typedef struct st_thr_lock_info THR_LOCK_INFO
typedef struct st_thr_lock_owner THR_LOCK_OWNER
typedef struct st_thr_lock_data THR_LOCK_DATA
typedef struct st_thr_lock THR_LOCK

枚举

enum  thr_lock_type {
  TL_IGNORE = -1, TL_UNLOCK, TL_READ_DEFAULT, TL_READ,
  TL_READ_WITH_SHARED_LOCKS, TL_READ_HIGH_PRIORITY, TL_READ_NO_INSERT, TL_WRITE_ALLOW_WRITE,
  TL_WRITE_ALLOW_READ, TL_WRITE_CONCURRENT_INSERT, TL_WRITE_DELAYED, TL_WRITE_DEFAULT,
  TL_WRITE_LOW_PRIORITY, TL_WRITE, TL_WRITE_ONLY
}
enum  enum_thr_lock_result { THR_LOCK_SUCCESS = 0, THR_LOCK_ABORTED = 1, THR_LOCK_WAIT_TIMEOUT = 2, THR_LOCK_DEADLOCK = 3 }

函数

my_bool init_thr_lock (void)
void thr_lock_info_init (THR_LOCK_INFO *info)
void thr_lock_init (THR_LOCK *lock)
void thr_lock_delete (THR_LOCK *lock)
void thr_lock_data_init (THR_LOCK *lock, THR_LOCK_DATA *data, void *status_param)
enum enum_thr_lock_result thr_lock (THR_LOCK_DATA *data, THR_LOCK_OWNER *owner, enum thr_lock_type lock_type)
void thr_unlock (THR_LOCK_DATA *data)
enum enum_thr_lock_result thr_multi_lock (THR_LOCK_DATA **data, uint count, THR_LOCK_OWNER *owner)
void thr_multi_unlock (THR_LOCK_DATA **data, uint count)
void thr_lock_merge_status (THR_LOCK_DATA **data, uint count)
void thr_abort_locks (THR_LOCK *lock, my_bool upgrade_lock)
my_bool thr_abort_locks_for_thread (THR_LOCK *lock, my_thread_id thread)
void thr_print_locks (void)
my_bool thr_upgrade_write_delay_lock (THR_LOCK_DATA *data, enum thr_lock_type new_lock_type)
void thr_downgrade_write_lock (THR_LOCK_DATA *data, enum thr_lock_type new_lock_type)
my_bool thr_reschedule_write_lock (THR_LOCK_DATA *data)

变量

ulong locks_immediate
ulong locks_waited
ulong max_write_lock_count
ulong table_lock_wait_timeout
my_bool thr_lock_inited
enum thr_lock_type thr_upgraded_concurrent_insert_lock
LISTthr_lock_thread_list
pthread_mutex_t THR_LOCK_lock

宏定义文档

#define thr_lock_owner_init (   owner,
  info_arg 
)    (owner)->info= (info_arg)

类型定义文档

typedef struct st_thr_lock THR_LOCK

枚举类型文档

枚举值:
THR_LOCK_SUCCESS 
THR_LOCK_ABORTED 
THR_LOCK_WAIT_TIMEOUT 
THR_LOCK_DEADLOCK 

Lock types are used to request a lock on a table. Changes in this enumeration might affect transactional locks as well. Important: if a new lock type is added, a matching lock description must be added to sql_test.cc's lock_descriptions array.

参见:
set_handler_table_locks
read_lock_type_for_table
枚举值:
TL_IGNORE 
TL_UNLOCK 
TL_READ_DEFAULT 
TL_READ 
TL_READ_WITH_SHARED_LOCKS 
TL_READ_HIGH_PRIORITY 
TL_READ_NO_INSERT 
TL_WRITE_ALLOW_WRITE 
TL_WRITE_ALLOW_READ 
TL_WRITE_CONCURRENT_INSERT 
TL_WRITE_DELAYED 
TL_WRITE_DEFAULT 
TL_WRITE_LOW_PRIORITY 
TL_WRITE 
TL_WRITE_ONLY 

函数文档

my_bool init_thr_lock ( void  )
void thr_abort_locks ( THR_LOCK lock,
my_bool  upgrade_lock 
)
my_bool thr_abort_locks_for_thread ( THR_LOCK lock,
my_thread_id  thread 
)
void thr_downgrade_write_lock ( THR_LOCK_DATA data,
enum thr_lock_type  new_lock_type 
)
enum enum_thr_lock_result thr_lock ( THR_LOCK_DATA data,
THR_LOCK_OWNER owner,
enum thr_lock_type  lock_type 
)
void thr_lock_data_init ( THR_LOCK lock,
THR_LOCK_DATA data,
void *  status_param 
)
void thr_lock_delete ( THR_LOCK lock)
void thr_lock_info_init ( THR_LOCK_INFO info)
void thr_lock_init ( THR_LOCK lock)
void thr_lock_merge_status ( THR_LOCK_DATA **  data,
uint  count 
)
enum enum_thr_lock_result thr_multi_lock ( THR_LOCK_DATA **  data,
uint  count,
THR_LOCK_OWNER owner 
)
void thr_multi_unlock ( THR_LOCK_DATA **  data,
uint  count 
)
void thr_print_locks ( void  )
my_bool thr_reschedule_write_lock ( THR_LOCK_DATA data)
void thr_unlock ( THR_LOCK_DATA data)
my_bool thr_upgrade_write_delay_lock ( THR_LOCK_DATA data,
enum thr_lock_type  new_lock_type 
)

变量文档

pthread_mutex_t THR_LOCK_lock
 全部  名字空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义