CUBRID Engine
latest
|
#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_CONTEXT * | showstmt_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_VALUE * | showstmt_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 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.
SHOWSTMT_ARRAY_CONTEXT* showstmt_alloc_array_context | ( | THREAD_ENTRY * | thread_p, |
int | num_total, | ||
int | num_cols | ||
) |
Definition at line 336 of file show_scan.c.
References db_private_alloc, db_private_free, NULL, showstmt_array_context::num_cols, showstmt_array_context::num_total, showstmt_array_context::num_used, on_error, and showstmt_array_context::tuples.
Referenced by csect_start_scan(), css_user_access_status_start_scan(), logtb_descriptors_start_scan(), pgbuf_start_scan(), thread_start_scan(), tz_full_timezones_start_scan(), and tz_timezones_start_scan().
DB_VALUE* showstmt_alloc_tuple_in_context | ( | THREAD_ENTRY * | thread_p, |
SHOWSTMT_ARRAY_CONTEXT * | ctx | ||
) |
Definition at line 402 of file show_scan.c.
References db_make_null(), db_private_alloc, db_private_realloc, i, NULL, showstmt_array_context::num_cols, showstmt_array_context::num_total, showstmt_array_context::num_used, and showstmt_array_context::tuples.
Referenced by csect_start_scan(), css_make_access_status_exist_user(), css_user_access_status_start_scan(), css_wp_core_job_scan_mapper(), logtb_descriptors_start_scan(), pgbuf_start_scan(), showstmt_array_end_scan(), tz_full_timezones_start_scan(), and tz_timezones_start_scan().
|
static |
Definition at line 477 of file show_scan.c.
References assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, db_localdatetime_msec(), db_make_bigint(), db_make_datetime(), db_make_int(), db_make_null(), db_make_string(), db_make_string_copy(), er_errid(), er_get_area_error(), er_get_ermsg_from_area_error(), error(), if(), LOCK_TO_LOCKMODE_STRING, lock_wait_state_to_string(), net_server_request_name(), NO_ERROR, NULL, OR_ALIGNED_BUF, OR_ALIGNED_BUF_START, private_heap_id, showstmt_alloc_tuple_in_context(), showstmt_free_array_context(), thread_resume_status_to_string(), THREAD_SCAN_COLUMN_COUNT, thread_status_to_string(), thread_type_to_string(), and trim().
Referenced by showstmt_scan_init().
|
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().
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().
void showstmt_free_array_context | ( | THREAD_ENTRY * | thread_p, |
SHOWSTMT_ARRAY_CONTEXT * | ctx | ||
) |
Definition at line 373 of file show_scan.c.
References assert, db_private_free, i, NULL, showstmt_array_context::num_cols, showstmt_array_context::num_used, pr_clear_value(), and showstmt_array_context::tuples.
Referenced by csect_start_scan(), css_user_access_status_start_scan(), logtb_descriptors_start_scan(), pgbuf_start_scan(), showstmt_array_end_scan(), thread_start_scan(), tz_full_timezones_start_scan(), and tz_timezones_start_scan().
SCAN_CODE showstmt_next_scan | ( | THREAD_ENTRY * | thread_p, |
SCAN_ID * | s_id | ||
) |
Definition at line 250 of file show_scan.c.
References assert, showstmt_scan_id::ctx, showstmt_scan_id::cursor, i, show_request::next_func, NULL, showstmt_scan_id::out_cnt, showstmt_scan_id::out_values, pr_clear_value(), scan_id_struct::s, S_END, show_request::show_type, showstmt_scan_id::show_type, and scan_id_struct::stsid.
Referenced by scan_next_showstmt_scan().
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().
int showstmt_start_scan | ( | THREAD_ENTRY * | thread_p, |
SCAN_ID * | s_id | ||
) |
Definition at line 283 of file show_scan.c.
References showstmt_scan_id::arg_cnt, showstmt_scan_id::arg_values, assert, showstmt_scan_id::ctx, error(), NO_ERROR, NULL, scan_id_struct::s, show_request::show_type, showstmt_scan_id::show_type, show_request::start_func, and scan_id_struct::stsid.
Referenced by scan_start_scan().
int thread_start_scan | ( | THREAD_ENTRY * | thread_p, |
int | type, | ||
DB_VALUE ** | arg_values, | ||
int | arg_cnt, | ||
void ** | ptr | ||
) |
Definition at line 813 of file show_scan.c.
References ASSERT_ERROR, ASSERT_ERROR_AND_SET, error(), cubthread::manager::map_entries(), NO_ERROR, NULL, showstmt_alloc_array_context(), showstmt_free_array_context(), thread_get_manager(), thread_num_total_threads(), and THREAD_SCAN_COLUMN_COUNT.
Referenced by showstmt_scan_init().
|
static |
Definition at line 92 of file show_scan.c.
|
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().