CUBRID Engine  latest
show_scan.c File Reference
#include <cinttypes>
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "error_manager.h"
#include "memory_alloc.h"
#include "query_manager.h"
#include "object_primitive.h"
#include "object_representation.h"
#include "scan_manager.h"
#include "show_scan.h"
#include "disk_manager.h"
#include "log_manager.h"
#include "slotted_page.h"
#include "heap_file.h"
#include "btree.h"
#include "connection_support.h"
#include "critical_section.h"
#include "tz_support.h"
#include "db_date.h"
#include "network.h"
#include "porting.h"
#include "server_support.h"
#include "dbtype.h"
#include "thread_manager.hpp"

Go to the source code of this file.

Classes

struct  show_request
 

Typedefs

typedef SCAN_CODE(* NEXT_SCAN_FUNC) (THREAD_ENTRY *thread_p, int cursor, DB_VALUE **out_values, int out_cnt, void *ctx)
 
typedef int(* START_SCAN_FUNC) (THREAD_ENTRY *thread_p, int show_type, DB_VALUE **arg_values, int arg_cnt, void **ctx)
 
typedef int(* END_SCAN_FUNC) (THREAD_ENTRY *thread_p, void **ctx)
 
typedef struct show_request SHOW_REQUEST
 

Functions

static SCAN_CODE showstmt_array_next_scan (THREAD_ENTRY *thread_p, int cursor, DB_VALUE **out_values, int out_cnt, void *ptr)
 
static int showstmt_array_end_scan (THREAD_ENTRY *thread_p, void **ptr)
 
void showstmt_scan_init (void)
 
SCAN_CODE showstmt_next_scan (THREAD_ENTRY *thread_p, SCAN_ID *s_id)
 
int showstmt_start_scan (THREAD_ENTRY *thread_p, SCAN_ID *s_id)
 
int showstmt_end_scan (THREAD_ENTRY *thread_p, SCAN_ID *s_id)
 
SHOWSTMT_ARRAY_CONTEXTshowstmt_alloc_array_context (THREAD_ENTRY *thread_p, int num_total, int num_cols)
 
void showstmt_free_array_context (THREAD_ENTRY *thread_p, SHOWSTMT_ARRAY_CONTEXT *ctx)
 
DB_VALUEshowstmt_alloc_tuple_in_context (THREAD_ENTRY *thread_p, SHOWSTMT_ARRAY_CONTEXT *ctx)
 
int thread_start_scan (THREAD_ENTRY *thread_p, int type, DB_VALUE **arg_values, int arg_cnt, void **ptr)
 

Variables

const size_t THREAD_SCAN_COLUMN_COUNT = 26
 
static bool show_scan_Inited = false
 
static SHOW_REQUEST show_Requests [SHOWSTMT_END]
 

Typedef Documentation

typedef int(* END_SCAN_FUNC) (THREAD_ENTRY *thread_p, void **ctx)

Definition at line 68 of file show_scan.c.

typedef SCAN_CODE(* NEXT_SCAN_FUNC) (THREAD_ENTRY *thread_p, int cursor, DB_VALUE **out_values, int out_cnt, void *ctx)

Definition at line 64 of file show_scan.c.

typedef struct show_request SHOW_REQUEST

Definition at line 70 of file show_scan.c.

typedef int(* START_SCAN_FUNC) (THREAD_ENTRY *thread_p, int show_type, DB_VALUE **arg_values, int arg_cnt, void **ctx)

Definition at line 66 of file show_scan.c.

Function Documentation

static SCAN_CODE showstmt_array_next_scan ( THREAD_ENTRY thread_p,
int  cursor,
DB_VALUE **  out_values,
int  out_cnt,
void *  ptr 
)
static

Definition at line 447 of file show_scan.c.

References assert, i, NULL, showstmt_array_context::num_cols, showstmt_array_context::num_used, pr_clone_value(), S_END, S_SUCCESS, and showstmt_array_context::tuples.

Referenced by showstmt_scan_init().

Here is the caller graph for this function:

int showstmt_end_scan ( THREAD_ENTRY thread_p,
SCAN_ID s_id 
)

Definition at line 309 of file show_scan.c.

References assert, showstmt_scan_id::ctx, show_request::end_func, error(), NO_ERROR, NULL, scan_id_struct::s, show_request::show_type, showstmt_scan_id::show_type, and scan_id_struct::stsid.

Referenced by scan_end_scan().

Here is the caller graph for this function:

void showstmt_scan_init ( void  )

Definition at line 100 of file show_scan.c.

References btree_index_end_scan(), btree_index_next_scan(), btree_index_start_scan(), csect_start_scan, css_job_queues_start_scan(), css_user_access_status_start_scan(), disk_volume_header_end_scan(), disk_volume_header_next_scan(), disk_volume_header_start_scan(), show_request::end_func, heap_capacity_next_scan(), heap_header_capacity_end_scan(), heap_header_capacity_start_scan(), heap_header_next_scan(), log_active_log_header_end_scan(), log_active_log_header_next_scan(), log_active_log_header_start_scan(), log_archive_log_header_end_scan(), log_archive_log_header_next_scan(), log_archive_log_header_start_scan(), logtb_descriptors_start_scan(), show_request::next_func, pgbuf_start_scan(), show_scan_Inited, show_request::show_type, SHOWSTMT_ACCESS_STATUS, SHOWSTMT_ACTIVE_LOG_HEADER, SHOWSTMT_ALL_HEAP_CAPACITY, SHOWSTMT_ALL_HEAP_HEADER, SHOWSTMT_ALL_INDEXES_CAPACITY, SHOWSTMT_ALL_INDEXES_HEADER, SHOWSTMT_ARCHIVE_LOG_HEADER, showstmt_array_end_scan(), showstmt_array_next_scan(), SHOWSTMT_END, SHOWSTMT_FULL_TIMEZONES, SHOWSTMT_GLOBAL_CRITICAL_SECTIONS, SHOWSTMT_HEAP_CAPACITY, SHOWSTMT_HEAP_HEADER, SHOWSTMT_INDEX_CAPACITY, SHOWSTMT_INDEX_HEADER, SHOWSTMT_JOB_QUEUES, SHOWSTMT_PAGE_BUFFER_STATUS, SHOWSTMT_SLOTTED_PAGE_HEADER, SHOWSTMT_SLOTTED_PAGE_SLOTS, SHOWSTMT_THREADS, SHOWSTMT_TIMEZONES, SHOWSTMT_TRAN_TABLES, SHOWSTMT_VOLUME_HEADER, spage_header_end_scan(), spage_header_next_scan(), spage_header_start_scan(), spage_slots_end_scan(), spage_slots_next_scan(), spage_slots_start_scan(), show_request::start_func, thread_start_scan(), tz_full_timezones_start_scan(), and tz_timezones_start_scan().

Referenced by xboot_register_client().

Here is the caller graph for this function:

int showstmt_start_scan ( THREAD_ENTRY thread_p,
SCAN_ID s_id 
)
int thread_start_scan ( THREAD_ENTRY thread_p,
int  type,
DB_VALUE **  arg_values,
int  arg_cnt,
void **  ptr 
)

Variable Documentation

SHOW_REQUEST show_Requests[SHOWSTMT_END]
static

Definition at line 92 of file show_scan.c.

bool show_scan_Inited = false
static

Definition at line 90 of file show_scan.c.

Referenced by showstmt_scan_init().

const size_t THREAD_SCAN_COLUMN_COUNT = 26

Definition at line 79 of file show_scan.c.

Referenced by showstmt_array_end_scan(), and thread_start_scan().