CUBRID Engine  latest
xasl_cache.h File Reference
#include "xasl.h"
Include dependency graph for xasl_cache.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  xcache_related_object
 
struct  xasl_clone
 
struct  execution_info
 
struct  xasl_cache_ent
 

Macros

#define XASL_CLONE_INITIALIZER   { NULL, NULL }
 
#define XASL_CLONE_AS_ARGS(clone)   (clone)->xasl, (clone)->xasl_buf
 
#define EXEINFO_HASH_TEXT_STRING(einfo)   ((einfo)->sql_hash_text ? (einfo)->sql_hash_text : "UNKNOWN HASH TEXT")
 
#define EXEINFO_USER_TEXT_STRING(einfo)   ((einfo)->sql_user_text ? (einfo)->sql_user_text : "UNKNOWN USER TEXT")
 
#define EXEINFO_PLAN_TEXT_STRING(einfo)   ((einfo)->sql_plan_text ? (einfo)->sql_plan_text : "UNKNOWN PLAN TEXT")
 
#define EXEINFO_AS_ARGS(einfo)   EXEINFO_USER_TEXT_STRING(einfo), EXEINFO_PLAN_TEXT_STRING(einfo), EXEINFO_HASH_TEXT_STRING(einfo)
 

Typedefs

typedef struct xcache_related_object XCACHE_RELATED_OBJECT
 
typedef enum xcache_cleanup_reason XCACHE_CLEANUP_REASON
 
typedef struct xasl_clone XASL_CLONE
 
typedef struct execution_info EXECUTION_INFO
 
typedef struct xasl_cache_ent XASL_CACHE_ENTRY
 
typedef enum xasl_cache_search_mode XASL_CACHE_SEARCH_MODE
 

Enumerations

enum  xcache_cleanup_reason { XCACHE_CLEANUP_NONE, XCACHE_CLEANUP_FULL, XCACHE_CLEANUP_TIMEOUT }
 
enum  xasl_cache_search_mode { XASL_CACHE_SEARCH_FOR_EXECUTE = 0, XASL_CACHE_SEARCH_FOR_PREPARE = 1, XASL_CACHE_SEARCH_GENERIC = XASL_CACHE_SEARCH_FOR_EXECUTE }
 
enum  xasl_cache_rt_check_result { XASL_CACHE_RECOMPILE_NOT_NEEDED = 0, XASL_CACHE_RECOMPILE_EXECUTE = 1, XASL_CACHE_RECOMPILE_PREPARE = 2 }
 

Functions

int xcache_initialize (THREAD_ENTRY *thread_p)
 
void xcache_finalize (THREAD_ENTRY *thread_p)
 
int xcache_find_sha1 (THREAD_ENTRY *thread_p, const SHA1Hash *sha1, const XASL_CACHE_SEARCH_MODE search_mode, XASL_CACHE_ENTRY **xcache_entry, xasl_cache_rt_check_result *rt_check)
 
int xcache_find_xasl_id_for_execute (THREAD_ENTRY *thread_p, const XASL_ID *xid, XASL_CACHE_ENTRY **xcache_entry, XASL_CLONE *xclone)
 
void xcache_unfix (THREAD_ENTRY *thread_p, XASL_CACHE_ENTRY *xcache_entry)
 
int xcache_insert (THREAD_ENTRY *thread_p, const compile_context *context, XASL_STREAM *stream, int n_oid, const OID *class_oids, const int *class_locks, const int *tcards, XASL_CACHE_ENTRY **xcache_entry)
 
void xcache_remove_by_oid (THREAD_ENTRY *thread_p, const OID *oid)
 
void xcache_drop_all (THREAD_ENTRY *thread_p)
 
void xcache_dump (THREAD_ENTRY *thread_p, FILE *fp)
 
bool xcache_can_entry_cache_list (XASL_CACHE_ENTRY *xcache_entry)
 
void xcache_retire_clone (THREAD_ENTRY *thread_p, XASL_CACHE_ENTRY *xcache_entry, XASL_CLONE *xclone)
 
int xcache_get_entry_count (void)
 
bool xcache_uses_clones (void)
 
int xcache_invalidate_qcaches (THREAD_ENTRY *thread_p, const OID *oid)
 

Macro Definition Documentation

#define EXEINFO_AS_ARGS (   einfo)    EXEINFO_USER_TEXT_STRING(einfo), EXEINFO_PLAN_TEXT_STRING(einfo), EXEINFO_HASH_TEXT_STRING(einfo)

Definition at line 84 of file xasl_cache.h.

#define EXEINFO_HASH_TEXT_STRING (   einfo)    ((einfo)->sql_hash_text ? (einfo)->sql_hash_text : "UNKNOWN HASH TEXT")

Definition at line 80 of file xasl_cache.h.

#define EXEINFO_PLAN_TEXT_STRING (   einfo)    ((einfo)->sql_plan_text ? (einfo)->sql_plan_text : "UNKNOWN PLAN TEXT")

Definition at line 82 of file xasl_cache.h.

#define EXEINFO_USER_TEXT_STRING (   einfo)    ((einfo)->sql_user_text ? (einfo)->sql_user_text : "UNKNOWN USER TEXT")

Definition at line 81 of file xasl_cache.h.

#define XASL_CLONE_AS_ARGS (   clone)    (clone)->xasl, (clone)->xasl_buf

Definition at line 68 of file xasl_cache.h.

#define XASL_CLONE_INITIALIZER   { NULL, NULL }

Definition at line 67 of file xasl_cache.h.

Referenced by xqmgr_execute_query().

Typedef Documentation

Definition at line 73 of file xasl_cache.h.

Definition at line 89 of file xasl_cache.h.

Definition at line 145 of file xasl_cache.h.

typedef struct xasl_clone XASL_CLONE

Definition at line 61 of file xasl_cache.h.

Definition at line 56 of file xasl_cache.h.

Definition at line 42 of file xasl_cache.h.

Enumeration Type Documentation

Enumerator
XASL_CACHE_RECOMPILE_NOT_NEEDED 
XASL_CACHE_RECOMPILE_EXECUTE 
XASL_CACHE_RECOMPILE_PREPARE 

Definition at line 147 of file xasl_cache.h.

Enumerator
XASL_CACHE_SEARCH_FOR_EXECUTE 
XASL_CACHE_SEARCH_FOR_PREPARE 
XASL_CACHE_SEARCH_GENERIC 

Definition at line 138 of file xasl_cache.h.

Enumerator
XCACHE_CLEANUP_NONE 
XCACHE_CLEANUP_FULL 
XCACHE_CLEANUP_TIMEOUT 

Definition at line 50 of file xasl_cache.h.

Function Documentation

bool xcache_can_entry_cache_list ( XASL_CACHE_ENTRY xcache_entry)

Definition at line 2004 of file xasl_cache.c.

References xasl_id::cache_flag, NULL, xasl_cache_ent::xasl_id, xcache_Enabled, and XCACHE_ENTRY_FLAGS_MASK.

Referenced by xqmgr_execute_query().

Here is the caller graph for this function:

void xcache_drop_all ( THREAD_ENTRY thread_p)

Definition at line 1890 of file xasl_cache.c.

References NULL, xcache_check_logging, xcache_Enabled, xcache_invalidate_entries(), xcache_log, XCACHE_LOG_TRAN_ARGS, and XCACHE_LOG_TRAN_TEXT.

Referenced by xqmgr_drop_all_query_plans().

Here is the caller graph for this function:

void xcache_finalize ( THREAD_ENTRY thread_p)

Definition at line 344 of file xasl_cache.c.

References bh_destroy(), db_change_private_heap(), NULL, xcache_check_logging, xcache_Cleanup_bh, xcache_Enabled, xcache_Hashmap, and xcache_log.

Referenced by boot_restart_server(), and xboot_shutdown_server().

Here is the caller graph for this function:

int xcache_get_entry_count ( void  )

Definition at line 2457 of file xasl_cache.c.

References xcache::entry_count.

Referenced by perfmon_get_peek_stats().

Here is the caller graph for this function:

int xcache_insert ( THREAD_ENTRY thread_p,
const compile_context context,
XASL_STREAM stream,
int  n_oid,
const OID class_oids,
const int *  class_locks,
const int *  tcards,
XASL_CACHE_ENTRY **  xcache_entry 
)
int xcache_invalidate_qcaches ( THREAD_ENTRY thread_p,
const OID oid 
)
bool xcache_uses_clones ( void  )

Definition at line 2468 of file xasl_cache.c.

References xcache_Max_clones.

Referenced by qexec_clear_regu_var(), qexec_clear_xasl_head(), xcache_dump(), xcache_find_xasl_id_for_execute(), and xcache_retire_clone().

Here is the caller graph for this function: