MCPcopy Create free account
hub / github.com/DeNA/HandlerSocket-Plugin-for-MySQL / expr_user_lock

Class expr_user_lock

handlersocket/database.cpp:105–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103};
104
105struct expr_user_lock : private noncopyable {
106 expr_user_lock(THD *thd, int timeout)
107 : lck_key("handlersocket_wr", 16, &my_charset_latin1),
108 lck_timeout(timeout),
109 lck_func_get_lock(&lck_key, &lck_timeout),
110 lck_func_release_lock(&lck_key)
111 {
112 lck_key.fix_fields(thd, 0);
113 lck_timeout.fix_fields(thd, 0);
114 lck_func_get_lock.fix_fields(thd, 0);
115 lck_func_release_lock.fix_fields(thd, 0);
116 }
117 long long get_lock() {
118 return lck_func_get_lock.val_int();
119 }
120 long long release_lock() {
121 return lck_func_release_lock.val_int();
122 }
123 private:
124 Item_string lck_key;
125 Item_int lck_timeout;
126 Item_func_get_lock lck_func_get_lock;
127 Item_func_release_lock lck_func_release_lock;
128};
129
130struct dbcontext : public dbcontext_i, private noncopyable {
131 dbcontext(volatile database *d, bool for_write);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected