CUBRID Engine  latest
locator.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Search Solution Corporation
3  * Copyright 2016 CUBRID Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 
20 /*
21  * locator.h - transaction object locator (at client and server)
22  *
23  */
24 
25 #ifndef _LOCATOR_H_
26 #define _LOCATOR_H_
27 
28 #ident "$Id$"
29 
31 #include "oid.h"
32 #include "storage_common.h"
33 #include "thread_compat.hpp"
34 
35 #define LC_AREA_ONEOBJ_PACKED_SIZE (OR_INT_SIZE * 4 + \
36  OR_HFID_SIZE + \
37  OR_OID_SIZE * 2)
38 
39 #define LC_MANYOBJS_PTR_IN_COPYAREA(copy_areaptr) \
40  ((LC_COPYAREA_MANYOBJS *) ((char *)(copy_areaptr)->mem + \
41  (copy_areaptr)->length - \
42  DB_SIZEOF(LC_COPYAREA_MANYOBJS)))
43 
44 #define LC_START_ONEOBJ_PTR_IN_COPYAREA(manyobjs_ptr) (&(manyobjs_ptr)->objs)
45 #define LC_LAST_ONEOBJ_PTR_IN_COPYAREA(manyobjs_ptr) \
46  (&(manyobjs_ptr)->objs - ((manyobjs_ptr)->num_objs - 1))
47 
48 #define LC_NEXT_ONEOBJ_PTR_IN_COPYAREA(oneobj_ptr) ((oneobj_ptr) - 1)
49 #define LC_PRIOR_ONEOBJ_PTR_IN_COPYAREA(oneobj_ptr) ((oneobj_ptr) + 1)
50 
51 #define LC_FIND_ONEOBJ_PTR_IN_COPYAREA(manyobjs_ptr, obj_num) \
52  (&(manyobjs_ptr)->objs - (obj_num))
53 
54 #define LC_RECDES_TO_GET_ONEOBJ(copy_area_ptr, oneobj_ptr, recdes_ptr) \
55  do { \
56  (recdes_ptr)->data = (char *) ((copy_area_ptr)->mem + \
57  (oneobj_ptr)->offset); \
58  (recdes_ptr)->length = (recdes_ptr)->area_size = (oneobj_ptr)->length; \
59  if (!OID_IS_ROOTOID (&((oneobj_ptr)->class_oid))) \
60  { \
61  (recdes_ptr)->area_size += \
62  (OR_MVCC_MAX_HEADER_SIZE - OR_MVCC_INSERT_HEADER_SIZE); \
63  } \
64  } while (0)
65 
66 #define LC_REPL_RECDES_FOR_ONEOBJ(copy_area_ptr, oneobj_ptr, key_length, recdes_ptr) \
67  do { \
68  (recdes_ptr)->data = (char *)((copy_area_ptr)->mem \
69  + (oneobj_ptr)->offset + (key_length)); \
70  (recdes_ptr)->length = (recdes_ptr)->area_size = (oneobj_ptr)->length \
71  - (key_length); \
72  } while (0)
73 
74 #define LC_RECDES_IN_COPYAREA(copy_area_ptr, recdes_ptr) \
75  do { \
76  (recdes_ptr)->data = (copy_area_ptr)->mem; \
77  (recdes_ptr)->area_size = \
78  (copy_area_ptr)->length - DB_SIZEOF(LC_COPYAREA_MANYOBJS); \
79  } while (0)
80 
81 #define LC_REQOBJ_PACKED_SIZE (OR_OID_SIZE + OR_INT_SIZE * 2)
82 #define LC_CLASS_OF_REQOBJ_PACKED_SIZE (OR_OID_SIZE + OR_INT_SIZE)
83 
84 #define LC_LOCKSET_PACKED_SIZE(req) \
85  (OR_INT_SIZE * 9 + \
86  LC_CLASS_OF_REQOBJ_PACKED_SIZE * req->max_reqobjs + \
87  LC_REQOBJ_PACKED_SIZE * req->max_reqobjs)
88 
89 #define LC_LOCKHINT_CLASS_PACKED_SIZE (OR_OID_SIZE + OR_INT_SIZE * 3)
90 
91 #define LC_LOCKHINT_PACKED_SIZE(lockhint) \
92  (OR_INT_SIZE * 4 + \
93  LC_LOCKHINT_CLASS_PACKED_SIZE * lockhint->max_classes)
94 
95 #define LC_COPY_ONEOBJ(new_obj, old_obj) \
96  do { \
97  (new_obj)->operation = (old_obj)->operation; \
98  (new_obj)->flag = (old_obj)->flag; \
99  HFID_COPY(&((new_obj)->hfid), &((old_obj)->hfid)); \
100  COPY_OID(&((new_obj)->class_oid), &((old_obj)->class_oid)); \
101  COPY_OID(&((new_obj)->oid), &((old_obj)->oid)); \
102  (new_obj)->length = (old_obj)->length; \
103  (new_obj)->offset = (old_obj)->offset; \
104  } while(0)
105 
106 typedef enum
107 {
120 
121 #define LC_IS_FLUSH_INSERT(operation) \
122  (operation == LC_FLUSH_INSERT || operation == LC_FLUSH_INSERT_PRUNE \
123  || operation == LC_FLUSH_INSERT_PRUNE_VERIFY)
124 
125 #define LC_IS_FLUSH_UPDATE(operation) \
126  (operation == LC_FLUSH_UPDATE || operation == LC_FLUSH_UPDATE_PRUNE \
127  || operation == LC_FLUSH_UPDATE_PRUNE_VERIFY)
128 
129 /*
130  * Currently, classes does not have versions. So, fetching current, MVCC or
131  * dirty version lead to same result when classes are fetched. However,
132  * using LC_FETCH_CURRENT_VERSION is recommended in this case.
133  *
134  * When need to read an instance (DB_FETCH_READ) for SELECT purpose, use MVCC
135  * version type. This means visible version for current transaction, without
136  * locking. In this way, we respect the rule "do not lock instances at select"
137  * (reader does not block writer and writer does not block reader)
138  *
139  * When need to read an instance (DB_FETCH_READ) for UPDATE purpose, use DIRTY
140  * version type. In this case, the updatable version will be S-locked, if.
141  * exists. This guarantees that the object can't be deleted by concurrent
142  * transaction. If we don't lock the object, unexpected results may be obtained.
143  * That's because we will try to update later an object which we consider
144  * "alive", but was deleted meanwhile by concurrent transaction. Also,
145  * "..does_exists.." functions must use this version type (the only way to know
146  * if the object exists, is to lock it). Also, there are other particular
147  * commands like ";trigger" that need to use this version type (need locking).
148  *
149  * In some particular cases, you can use current version when read an instance
150  * (DB_FETCH_READ). For instance, if the object was already locked, you can
151  * use CURRENT version instead DIRTY (if the current transaction hold an lock
152  * on OID -> is the last version of the object -> no need to lock it again
153  * or to apply snapshot).
154  *
155  * When need to update an instance (DB_FETCH_WRITE), and the instance is not
156  * locked yet, use MVCC version type. In this case the visible version is
157  * searched into MVCC chain. Then, if exists, starting from visible version,
158  * updatable version is searched and X-locked. This is similar with
159  * update/delete executed on server side.
160  *
161  * ODKU use find unique (dirty version with S-lock). Since the object is
162  * locked, will be fetched using current or dirty version not MVCC version.
163  *
164  * In read committed, if have S, SIX, X or SCH-M lock on class, the instance
165  * must be fetched with current or dirty version. In RR, MVCC snapshot must
166  * be used in order to allow SERIALIZABLE conflicts checking.
167  *
168  * If the instance is not locked and its class doesn't have shared or
169  * exclusive mode, use MVCC version.
170  *
171  * au_get_new_auth uses IX-lock with dirty version when fetch all _db_auth
172  * instances. Each instance is fetched using S-lock and if an error occur, the
173  * instance is skipped.
174  *
175  * Currently, CUBRID tools use MVCC version when need to read instances.
176  *
177  */
178 typedef enum
179 {
180  LC_FETCH_CURRENT_VERSION = 0x01, /* fetch current version */
181  LC_FETCH_MVCC_VERSION = 0x02, /* fetch MVCC - visible version */
182  LC_FETCH_DIRTY_VERSION = 0x03, /* fetch dirty version - S-locked */
183  LC_FETCH_CURRENT_VERSION_NO_CHECK = 0x04, /* fetch current version and not check server side */
185 
186 #define LC_FETCH_IS_MVCC_VERSION_NEEDED(fetch_type) \
187  ((fetch_type) == LC_FETCH_MVCC_VERSION)
188 
189 #define LC_FETCH_IS_DIRTY_VERSION_NEEDED(fetch_type) \
190  ((fetch_type) == LC_FETCH_DIRTY_VERSION)
191 
192 #define LC_FETCH_IS_CURRENT_VERSION_NEEDED(fetch_type) \
193  ((fetch_type) == LC_FETCH_CURRENT_VERSION)
194 
195 #define LC_FLAG_HAS_INDEX_MASK 0x05
196 #define LC_ONEOBJ_GET_INDEX_FLAG(obj) \
197  ((obj)->flag & LC_FLAG_HAS_INDEX_MASK)
198 
199 #define LC_FLAG_HAS_INDEX 0x01 /* Used for flushing, set if object has index */
200 #define LC_FLAG_UPDATED_BY_ME 0x02 /* Used by MVCC to identify that an object was updated by current transaction. */
201 #define LC_FLAG_HAS_UNIQUE_INDEX 0x04 /* Used for flushing, set if object has unique index */
202 
203 #define LC_ONEOBJ_SET_HAS_INDEX(obj) \
204  (obj)->flag |= LC_FLAG_HAS_INDEX
205 
206 #define LC_ONEOBJ_SET_HAS_UNIQUE_INDEX(obj) \
207  (obj)->flag |= LC_FLAG_HAS_UNIQUE_INDEX
208 
209 #define LC_ONEOBJ_IS_UPDATED_BY_ME(obj) \
210  (((obj)->flag & LC_FLAG_UPDATED_BY_ME) != 0)
211 
212 #define LC_ONEOBJ_SET_UPDATED_BY_ME(obj) \
213  (obj)->flag |= LC_FLAG_UPDATED_BY_ME
214 
215 
218 {
219  LC_COPYAREA_OPERATION operation; /* Insert, delete, update */
220  int flag; /* Info flag for the object */
221  HFID hfid; /* Valid only for flushing */
222  OID class_oid; /* Oid of the Class of the object */
223  OID oid; /* Oid of the object */
224  int length; /* Length of the object */
225  int offset; /* location in the copy area where the content of the object is stored */
226 };
227 
229 {
233 };
234 
237 {
239  int multi_update_flags; /* start/is/end/ for unique statistics gathering */
240  int num_objs; /* How many objects */
241 };
242 
243 /* Copy area for flushing and fetching */
244 typedef struct lc_copy_area LC_COPYAREA;
246 {
247  char *mem; /* Pointer to location of chunk of area */
248  int length; /* The size of the area */
249 };
250 
253 {
254  LC_COPYAREA_MANYOBJS *mobjs; /* Describe multiple objects in area */
255  LC_COPYAREA_ONEOBJ **obj; /* Describe on object in area */
256  int *offset; /* Place to store next object in area */
258 };
259 
260 /*
261  * Fetching multiple objects (vector fetch)
262  */
265 {
266  OID oid; /* Oid of the object */
267  int chn; /* Cache coherence number of the object */
268  int class_index; /* Where is the desired class. A value of -1 means that the class_oid is unknown. */
269 };
270 
273 {
274  OID oid; /* Class_oid */
275  int chn; /* Cache coherence of class */
276 };
277 
278 typedef struct lc_lock_set LC_LOCKSET;
280 { /* Fetch many area definition */
281  char *mem; /* Pointer to location of chunk of area where the desired objects and their classes are
282  * described */
283  int length; /* Length of the area */
284 
285  /* *** Things related to requested objects *** */
286  int max_reqobjs; /* Max number of requested objects */
287  int num_reqobjs; /* Number of requested objects to fetch and lock. An object can be an instance or a
288  * class */
289  int num_reqobjs_processed; /* Number of instances processed by the server */
290  int last_reqobj_cached; /* Last requested object that has been cached by workspace manager. Used only by
291  * client. Don't need to be send to server or from server. */
292  LOCK reqobj_inst_lock; /* Lock to acquire for the requested objects that are instances */
293  LOCK reqobj_class_lock; /* Lock to acquire for the requested objects that are classes */
294 
295  /* *** Things related to classes of the requested objects *** */
296  int num_classes_of_reqobjs; /* Number of known classes for the requested objects. */
297  int num_classes_of_reqobjs_processed; /* Number of classes processed by the server */
298  int last_classof_reqobjs_cached; /* Last requested object that has been cached by workspace manger. Used only bt
299  * client. Don't need to be send to server or from server. */
300  int quit_on_errors; /* Quit when errors are found */
301  int packed_size; /* Size of packed lock request area */
302  char *packed; /* Ptr to packed lock request area */
303  LC_LOCKSET_CLASSOF *classes; /* Description of set of classes. The number of class structures are num_classes.. Ptr
304  * into mem */
305  LC_LOCKSET_REQOBJ *objects; /* Description of requested objects. The number of structures are num_reqobjs */
306  bool first_fetch_lockset_call; /* First client call to fetch_request */
307 };
308 
311 {
312  OID oid; /* Class_oid */
313  int chn; /* Cache coherence of class */
314  LOCK lock; /* The desired lock */
315  int need_subclasses; /* Are subclasses needed ? */
316 };
317 
318 typedef struct lc_lock_hint LC_LOCKHINT;
320 { /* Fetch many area definition */
321  char *mem; /* Pointer to location of chunk of area where the prefetched classes are described */
322  int length; /* Length of the area */
323  int max_classes; /* Max number of classes */
324  int num_classes; /* Number of classes to prefetch and lock. */
325  int num_classes_processed; /* Number of classes that have been processed */
326  int quit_on_errors; /* Quit when errors are found */
327  int packed_size; /* Size of packed lock lockhint area */
328  char *packed; /* Ptr to packed lock lockhint area */
329  LC_LOCKHINT_CLASS *classes; /* Description of set of classes. The number of class structures are num_classes.. Ptr
330  * into mem */
331  bool first_fetch_lockhint_call; /* First client call to fetch_lockhint */
332 };
333 
335 {
336  LC_PREF_FLAG_LOCK = 0x00000001,
338 };
340 
341 
342 
343 typedef struct lc_oidmap LC_OIDMAP;
344 struct lc_oidmap
345 {
346  struct lc_oidmap *next;
347  /* Appendages for client side use, locator_unpack_oid_set must leave these unchanged when unpacking into an existing
348  * structure. */
349  void *mop;
350  void *client_data;
351 
353  int est_size;
354 };
355 
356 /* LC_CLASS_OIDSET
357  *
358  * Information about the permanent OID's that need to be assigned for a
359  * particular class. This will be embedded inside the LC_OIDSET structure.
360  */
361 
364 {
369  int num_oids;
370 
371  /* set if oids is allocated as a linked list */
372  bool is_list;
373 };
374 
375 /* LC_OIDSET
376  *
377  * Structure used to hold information about permanent OID's that need
378  * to be assigned. OIDS for multiple classes can be assigned.
379  */
380 
381 typedef struct lc_oidset LC_OIDSET;
382 struct lc_oidset
383 {
387 
388  /* set if classes is allocated as a linked list */
389  bool is_list;
390 };
391 
392 #if defined (ENABLE_UNUSED_FUNCTION)
393 extern LC_COPYAREA *locator_allocate_copyarea (DKNPAGES npages);
394 #endif
396 extern LC_COPYAREA *locator_reallocate_copy_area_by_length (LC_COPYAREA * old_area, int new_length);
397 
398 extern void locator_free_copy_area (LC_COPYAREA * copyarea);
399 extern char *locator_pack_copy_area_descriptor (int num_objs, LC_COPYAREA * copyarea, char *desc, int desc_len);
400 extern char *locator_unpack_copy_area_descriptor (int num_objs, LC_COPYAREA * copyarea, char *desc);
401 extern int locator_send_copy_area (LC_COPYAREA * copyarea, char **contents_ptr, int *contents_length, char **desc_ptr,
402  int *desc_length);
403 #if defined(SERVER_MODE)
404 extern LC_COPYAREA *locator_recv_allocate_copyarea (int num_objs, char **contents_ptr, int contents_length);
405 #else /* SERVER_MODE */
406 extern LC_COPYAREA *locator_recv_allocate_copyarea (int num_objs, char **packed_desc, int packed_desc_length,
407  char **contents_ptr, int contents_length);
408 #endif /* SERVER_MODE */
409 extern LC_LOCKSET *locator_allocate_lockset (int max_reqobjs, LOCK reqobj_inst_lock, LOCK reqobj_class_lock,
410  int quit_on_errors);
411 #if defined (ENABLE_UNUSED_FUNCTION)
412 extern LC_LOCKSET *locator_allocate_lockset_by_length (int length);
413 #endif
414 extern LC_LOCKSET *locator_reallocate_lockset (LC_LOCKSET * lockset, int max_reqobjs);
415 extern void locator_free_lockset (LC_LOCKSET * lockset);
416 extern LC_LOCKSET *locator_allocate_and_unpack_lockset (char *unpacked, int unpacked_size, bool unpack_classes,
417  bool unpack_objects, bool reg_unpacked);
418 extern int locator_pack_lockset (LC_LOCKSET * lockset, bool pack_classes, bool pack_objects);
419 extern int locator_unpack_lockset (LC_LOCKSET * lockset, bool unpack_classes, bool unpack_objects);
420 extern LC_LOCKHINT *locator_allocate_lockhint (int max_classes, bool quit_on_errors);
421 extern LC_LOCKHINT *locator_reallocate_lockhint (LC_LOCKHINT * lockhint, int max_classes);
422 extern void locator_free_lockhint (LC_LOCKHINT * lockhint);
423 extern int locator_pack_lockhint (LC_LOCKHINT * lockhint, bool pack_classes);
424 extern int locator_unpack_lockhint (LC_LOCKHINT * lockhint, bool unpack_classes);
425 extern LC_LOCKHINT *locator_allocate_and_unpack_lockhint (char *unpacked, int unpacked_size, bool unpack_classes,
426  bool reg_unpacked);
427 extern void locator_initialize_areas (void);
428 extern void locator_free_areas (void);
429 
430 extern LC_OIDSET *locator_make_oid_set (void);
431 extern void locator_clear_oid_set (THREAD_ENTRY * thrd, LC_OIDSET * oidset);
432 extern void locator_free_oid_set (THREAD_ENTRY * thread_p, LC_OIDSET * oidset);
433 extern LC_OIDMAP *locator_add_oid_set (THREAD_ENTRY * thrd, LC_OIDSET * set, HFID * heap, OID * class_oid,
434  OID * obj_oid);
435 extern int locator_get_packed_oid_set_size (LC_OIDSET * oidset);
436 extern char *locator_pack_oid_set (char *buffer, LC_OIDSET * oidset);
437 extern LC_OIDSET *locator_unpack_oid_set_to_new (THREAD_ENTRY * thread_p, char *buffer);
438 extern bool locator_unpack_oid_set_to_exist (char *buffer, LC_OIDSET * use);
439 
440 extern bool locator_manyobj_flag_is_set (LC_COPYAREA_MANYOBJS * copyarea, enum MULTI_UPDATE_FLAG muf);
441 extern void locator_manyobj_flag_remove (LC_COPYAREA_MANYOBJS * copyarea, enum MULTI_UPDATE_FLAG muf);
442 extern void locator_manyobj_flag_set (LC_COPYAREA_MANYOBJS * copyarea, enum MULTI_UPDATE_FLAG muf);
443 
444 /* For Debugging */
445 #if defined(CUBRID_DEBUG)
446 extern void locator_dump_copy_area (FILE * out_fp, const LC_COPYAREA * copyarea, int print_rec);
447 extern void locator_dump_lockset (FILE * out_fp, LC_LOCKSET * lockset);
448 extern void locator_dump_lockhint (FILE * out_fp, LC_LOCKHINT * lockhint);
449 #endif
450 #endif /* _LOCATOR_H_ */
LC_FETCH_VERSION_TYPE
Definition: locator.h:178
LC_OIDSET * locator_unpack_oid_set_to_new(THREAD_ENTRY *thread_p, char *buffer)
Definition: locator.c:2499
void locator_manyobj_flag_set(LC_COPYAREA_MANYOBJS *copyarea, enum MULTI_UPDATE_FLAG muf)
Definition: locator.c:2610
LC_LOCKSET_CLASSOF * classes
Definition: locator.h:303
LC_COPYAREA * locator_recv_allocate_copyarea(int num_objs, char **packed_desc, int packed_desc_length, char **contents_ptr, int contents_length)
Definition: locator.c:755
LC_LOCKHINT * locator_allocate_and_unpack_lockhint(char *unpacked, int unpacked_size, bool unpack_classes, bool reg_unpacked)
Definition: locator.c:1876
LC_LOCKSET * locator_allocate_and_unpack_lockset(char *unpacked, int unpacked_size, bool unpack_classes, bool unpack_objects, bool reg_unpacked)
Definition: locator.c:1302
LC_LOCKHINT * locator_allocate_lockhint(int max_classes, bool quit_on_errors)
Definition: locator.c:1629
PAGEID DKNPAGES
char * packed
Definition: locator.h:328
char * mem
Definition: locator.h:247
char * packed
Definition: locator.h:302
int locator_unpack_lockhint(LC_LOCKHINT *lockhint, bool unpack_classes)
Definition: locator.c:2083
int num_classes_processed
Definition: locator.h:325
int est_size
Definition: locator.h:353
char * locator_pack_copy_area_descriptor(int num_objs, LC_COPYAREA *copyarea, char *desc, int desc_len)
Definition: locator.c:577
char * locator_pack_oid_set(char *buffer, LC_OIDSET *oidset)
Definition: locator.c:2400
LC_LOCKSET * locator_reallocate_lockset(LC_LOCKSET *lockset, int max_reqobjs)
Definition: locator.c:1091
void locator_free_lockset(LC_LOCKSET *lockset)
Definition: locator.c:1140
void locator_free_copy_area(LC_COPYAREA *copyarea)
Definition: locator.c:534
enum lc_prefetch_flags LC_PREFETCH_FLAGS
Definition: locator.h:339
void locator_manyobj_flag_remove(LC_COPYAREA_MANYOBJS *copyarea, enum MULTI_UPDATE_FLAG muf)
Definition: locator.c:2603
LC_LOCKSET_REQOBJ * objects
Definition: locator.h:305
bool locator_manyobj_flag_is_set(LC_COPYAREA_MANYOBJS *copyarea, enum MULTI_UPDATE_FLAG muf)
Definition: locator.c:2597
int packed_size
Definition: locator.h:327
LC_LOCKSET * locator_allocate_lockset(int max_reqobjs, LOCK reqobj_inst_lock, LOCK reqobj_class_lock, int quit_on_errors)
Definition: locator.c:955
int length
Definition: locator.h:248
LOCK reqobj_inst_lock
Definition: locator.h:292
lc_prefetch_flags
Definition: locator.h:334
LC_CLASS_OIDSET * classes
Definition: locator.h:386
void THREAD_ENTRY
char * mem
Definition: locator.h:281
LOCK
int quit_on_errors
Definition: locator.h:326
MULTI_UPDATE_FLAG
Definition: locator.h:228
LC_LOCKHINT * locator_reallocate_lockhint(LC_LOCKHINT *lockhint, int max_classes)
Definition: locator.c:1731
int length
Definition: locator.h:322
int locator_get_packed_oid_set_size(LC_OIDSET *oidset)
Definition: locator.c:2363
bool first_fetch_lockhint_call
Definition: locator.h:331
int last_reqobj_cached
Definition: locator.h:290
struct lc_oidmap * next
Definition: locator.h:346
void * client_data
Definition: locator.h:350
char * mem
Definition: locator.h:321
void locator_clear_oid_set(THREAD_ENTRY *thrd, LC_OIDSET *oidset)
Definition: locator.c:2153
struct lc_class_oidset * next
Definition: locator.h:365
LC_COPYAREA_ONEOBJ ** obj
Definition: locator.h:255
int max_classes
Definition: locator.h:323
RECDES * recdes
Definition: locator.h:257
LC_OIDMAP * oids
Definition: locator.h:366
int total_oids
Definition: locator.h:384
int num_reqobjs
Definition: locator.h:287
int num_classes
Definition: locator.h:385
bool is_list
Definition: locator.h:389
int quit_on_errors
Definition: locator.h:300
LC_COPYAREA_OPERATION
Definition: locator.h:106
LC_OIDSET * locator_make_oid_set(void)
Definition: locator.c:2116
int max_reqobjs
Definition: locator.h:286
int length
Definition: locator.h:283
int locator_pack_lockset(LC_LOCKSET *lockset, bool pack_classes, bool pack_objects)
Definition: locator.c:1429
char * locator_unpack_copy_area_descriptor(int num_objs, LC_COPYAREA *copyarea, char *desc)
Definition: locator.c:619
LC_COPYAREA * locator_allocate_copy_area_by_length(int length)
Definition: locator.c:407
int locator_send_copy_area(LC_COPYAREA *copyarea, char **contents_ptr, int *contents_length, char **desc_ptr, int *desc_length)
Definition: locator.c:664
int locator_pack_lockhint(LC_LOCKHINT *lockhint, bool pack_classes)
Definition: locator.c:1970
void locator_free_areas(void)
Definition: locator.c:206
OID oid
Definition: locator.h:352
void locator_free_lockhint(LC_LOCKHINT *lockhint)
Definition: locator.c:1765
void * mop
Definition: locator.h:349
int packed_size
Definition: locator.h:301
int num_classes_of_reqobjs_processed
Definition: locator.h:297
void locator_free_oid_set(THREAD_ENTRY *thread_p, LC_OIDSET *oidset)
Definition: locator.c:2227
LC_COPYAREA_MANYOBJS * mobjs
Definition: locator.h:254
int locator_unpack_lockset(LC_LOCKSET *lockset, bool unpack_classes, bool unpack_objects)
Definition: locator.c:1588
int num_classes_of_reqobjs
Definition: locator.h:296
LOCK reqobj_class_lock
Definition: locator.h:293
int num_reqobjs_processed
Definition: locator.h:289
bool first_fetch_lockset_call
Definition: locator.h:306
LC_COPYAREA * locator_reallocate_copy_area_by_length(LC_COPYAREA *old_area, int new_length)
Definition: locator.c:467
int num_classes
Definition: locator.h:324
LC_COPYAREA_ONEOBJ objs
Definition: locator.h:238
LC_COPYAREA_OPERATION operation
Definition: locator.h:219
void locator_initialize_areas(void)
Definition: locator.c:166
int last_classof_reqobjs_cached
Definition: locator.h:298
LC_LOCKHINT_CLASS * classes
Definition: locator.h:329
bool locator_unpack_oid_set_to_exist(char *buffer, LC_OIDSET *use)
Definition: locator.c:2445
LC_OIDMAP * locator_add_oid_set(THREAD_ENTRY *thrd, LC_OIDSET *set, HFID *heap, OID *class_oid, OID *obj_oid)
Definition: locator.c:2255