CUBRID Engine
latest
|
#include "config.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>
#include <ctype.h>
#include "authenticate.h"
#include "show_meta.h"
#include "error_manager.h"
#include "parser.h"
#include "schema_manager.h"
#include "dbtype.h"
#include "error_code.h"
#include "db.h"
Go to the source code of this file.
Enumerations | |
enum | { ARG_REQUIRED = false, ARG_OPTIONAL = true } |
enum | { ORDER_DESC = false, ORDER_ASC = true } |
enum | SHOW_ONLY_ALL { SHOW_ONLY, SHOW_ALL } |
Variables | |
static bool | show_Inited = false |
static SHOWSTMT_METADATA * | show_Metas [SHOWSTMT_END] |
anonymous enum |
Enumerator | |
---|---|
ARG_REQUIRED | |
ARG_OPTIONAL |
Definition at line 44 of file show_meta.c.
anonymous enum |
Enumerator | |
---|---|
ORDER_DESC | |
ORDER_ASC |
Definition at line 50 of file show_meta.c.
enum SHOW_ONLY_ALL |
Enumerator | |
---|---|
SHOW_ONLY | |
SHOW_ALL |
Definition at line 56 of file show_meta.c.
|
static |
Definition at line 911 of file show_meta.c.
References classobj_free_attribute(), NULL, sm_attribute::order_link, and showstmt_metadata::showstmt_attrs.
Referenced by showstmt_metadata_final(), and showstmt_metadata_init().
|
static |
Definition at line 849 of file show_meta.c.
References assert, classobj_free_attribute(), classobj_make_attribute(), showstmt_metadata::cols, er_errid(), i, ID_ATTRIBUTE, showstmt_column::name, NO_ERROR, NULL, showstmt_metadata::num_cols, on_error, sm_attribute::order_link, pt_string_to_db_domain(), showstmt_metadata::showstmt_attrs, tp_domain_cache(), showstmt_column::type, and tp_domain::type.
Referenced by showstmt_metadata_init().
|
static |
Definition at line 275 of file show_meta.c.
References NULL, ORDER_ASC, pt_check_access_status(), and SHOWSTMT_ACCESS_STATUS.
Referenced by showstmt_metadata_init().
|
static |
Definition at line 131 of file show_meta.c.
References ARG_OPTIONAL, AVT_STRING, NULL, and SHOWSTMT_ACTIVE_LOG_HEADER.
Referenced by showstmt_metadata_init().
|
static |
Definition at line 188 of file show_meta.c.
References ARG_OPTIONAL, AVT_STRING, NULL, and SHOWSTMT_ARCHIVE_LOG_HEADER.
Referenced by showstmt_metadata_init().
|
static |
Definition at line 563 of file show_meta.c.
References NULL, ORDER_ASC, and SHOWSTMT_FULL_TIMEZONES.
Referenced by showstmt_metadata_init().
|
static |
Definition at line 490 of file show_meta.c.
References NULL, ORDER_ASC, and SHOWSTMT_GLOBAL_CRITICAL_SECTIONS.
Referenced by showstmt_metadata_init().
|
static |
Definition at line 346 of file show_meta.c.
References ARG_REQUIRED, AVT_IDENTIFIER, NULL, ORDER_ASC, pt_check_table_in_show_heap(), SHOW_ALL, SHOWSTMT_ALL_HEAP_CAPACITY, and SHOWSTMT_HEAP_CAPACITY.
Referenced by showstmt_metadata_init().
|
static |
Definition at line 297 of file show_meta.c.
References ARG_REQUIRED, AVT_IDENTIFIER, NULL, ORDER_ASC, pt_check_table_in_show_heap(), SHOW_ALL, SHOWSTMT_ALL_HEAP_HEADER, and SHOWSTMT_HEAP_HEADER.
Referenced by showstmt_metadata_init().
|
static |
Definition at line 440 of file show_meta.c.
References ARG_REQUIRED, AVT_IDENTIFIER, NULL, ORDER_ASC, pt_check_show_index(), SHOW_ALL, SHOWSTMT_ALL_INDEXES_CAPACITY, and SHOWSTMT_INDEX_CAPACITY.
Referenced by showstmt_metadata_init().
|
static |
Definition at line 394 of file show_meta.c.
References ARG_REQUIRED, AVT_IDENTIFIER, NULL, ORDER_ASC, pt_check_show_index(), SHOW_ALL, SHOWSTMT_ALL_INDEXES_HEADER, and SHOWSTMT_INDEX_HEADER.
Referenced by showstmt_metadata_init().
|
static |
Definition at line 520 of file show_meta.c.
References NULL, ORDER_ASC, and SHOWSTMT_JOB_QUEUES.
Referenced by showstmt_metadata_init().
|
static |
Definition at line 693 of file show_meta.c.
References NULL, ORDER_ASC, and SHOWSTMT_PAGE_BUFFER_STATUS.
Referenced by showstmt_metadata_init().
|
static |
Definition at line 214 of file show_meta.c.
References ARG_REQUIRED, AVT_INTEGER, NULL, and SHOWSTMT_SLOTTED_PAGE_HEADER.
Referenced by showstmt_metadata_init().
|
static |
Definition at line 245 of file show_meta.c.
References ARG_REQUIRED, AVT_INTEGER, NULL, ORDER_ASC, and SHOWSTMT_SLOTTED_PAGE_SLOTS.
Referenced by showstmt_metadata_init().
|
static |
Definition at line 650 of file show_meta.c.
References NULL, ORDER_ASC, and SHOWSTMT_THREADS.
Referenced by showstmt_metadata_init().
|
static |
Definition at line 543 of file show_meta.c.
References NULL, ORDER_ASC, and SHOWSTMT_TIMEZONES.
Referenced by showstmt_metadata_init().
|
static |
Definition at line 586 of file show_meta.c.
References NULL, ORDER_ASC, and SHOWSTMT_TRAN_TABLES.
Referenced by showstmt_metadata_init().
|
static |
Definition at line 93 of file show_meta.c.
References ARG_REQUIRED, AVT_INTEGER, NULL, and SHOWSTMT_VOLUME_HEADER.
Referenced by showstmt_metadata_init().
|
static |
Definition at line 1011 of file show_meta.c.
References assert, au_is_dba_group_member(), Au_user, db_make_oid(), pt_spec_info::derived_table, ER_AU_DBA_ONLY, er_errid(), er_msg(), pt_select_info::from, parser_node::info, MSGCAT_SET_ERROR, NO_ERROR, NULL, vid_oid::oid, db_object::oid_info, parser_append_node(), pt_dbval_to_value(), PT_ERRORc, PT_ERRORmf, pt_query_info::q, pt_statement_info::query, pt_query_info::select, pt_showstmt_info::show_args, pt_statement_info::showstmt, sm_find_class(), and pt_statement_info::spec.
Referenced by metadata_of_access_status().
|
static |
Definition at line 1054 of file show_meta.c.
References assert, AU_DISABLE, AU_ENABLE, au_fetch_class_force(), AU_FETCH_READ, parser_varchar::bytes, classobj_find_constraint_by_name(), pt_value_info::data_value, DB_MAX_IDENTIFIER_LENGTH, DB_NOT_PARTITIONED_CLASS, pt_spec_info::derived_table, ER_LC_UNKNOWN_CLASSNAME, er_msg(), ER_OBJ_NOT_A_CLASS, ER_SM_NO_INDEX, error(), pt_select_info::from, parser_node::info, parser_varchar::length, MSGCAT_SET_ERROR, parser_node::next, NO_ERROR, parser_node::node_type, NULL, parser_append_node(), PT_ERRORc, PT_ERRORm, PT_ERRORmf, PT_INTERNAL_ERROR, pt_make_integer_value(), PT_SELECT, PT_TYPE_CHAR, PT_VALUE, pt_query_info::q, pt_statement_info::query, pt_query_info::select, pt_showstmt_info::show_args, pt_showstmt_info::show_type, pt_statement_info::showstmt, SHOWSTMT_ALL_INDEXES_CAPACITY, SHOWSTMT_ALL_INDEXES_HEADER, SHOWSTMT_INDEX_CAPACITY, SHOWSTMT_INDEX_HEADER, sm_class_constraints(), SM_CLASS_CT, sm_find_class(), sm_get_class_type(), sm_partitioned_class_type(), pt_statement_info::spec, pt_data_value::str, parser_node::type_enum, and pt_statement_info::value.
Referenced by metadata_of_index_capacity(), and metadata_of_index_header().
|
static |
Definition at line 770 of file show_meta.c.
References assert, AU_DISABLE, AU_ENABLE, au_fetch_class_force(), AU_FETCH_READ, parser_varchar::bytes, pt_value_info::data_value, DB_NOT_PARTITIONED_CLASS, ER_LC_UNKNOWN_CLASSNAME, er_msg(), ER_OBJ_NOT_A_CLASS, error(), pt_select_info::from, parser_node::info, MSGCAT_SET_ERROR, NO_ERROR, parser_node::node_type, NULL, parser_append_node(), PT_ERRORc, PT_ERRORm, PT_ERRORmf, PT_INTERNAL_ERROR, pt_make_integer_value(), PT_SELECT, PT_TYPE_CHAR, PT_VALUE, pt_query_info::q, pt_statement_info::query, pt_query_info::select, pt_showstmt_info::show_args, pt_statement_info::showstmt, SHOWSTMT_ALL_HEAP_CAPACITY, SHOWSTMT_ALL_HEAP_HEADER, SHOWSTMT_HEAP_CAPACITY, SHOWSTMT_HEAP_HEADER, SM_CLASS_CT, sm_find_class(), sm_get_class_type(), sm_partitioned_class_type(), pt_data_value::str, parser_node::type_enum, and pt_statement_info::value.
Referenced by metadata_of_heap_capacity(), and metadata_of_heap_header().
DB_ATTRIBUTE* showstmt_get_attributes | ( | SHOWSTMT_TYPE | show_type | ) |
Definition at line 753 of file show_meta.c.
References NULL, showstmt_metadata::showstmt_attrs, and showstmt_get_metadata().
Referenced by pt_get_all_showstmt_attributes_and_types().
const SHOWSTMT_METADATA* showstmt_get_metadata | ( | SHOWSTMT_TYPE | show_type | ) |
Definition at line 734 of file show_meta.c.
References assert_release, NULL, showstmt_metadata::show_type, SHOWSTMT_END, and SHOWSTMT_START.
Referenced by pt_make_query_showstmt(), pt_print_showstmt(), pt_semantic_check_local(), and showstmt_get_attributes().
void showstmt_metadata_final | ( | void | ) |
Definition at line 994 of file show_meta.c.
References free_db_attribute_list(), i, and show_Inited.
Referenced by boot_client_all_finalize(), boot_initialize_client(), and boot_restart_client().
int showstmt_metadata_init | ( | void | ) |
Definition at line 937 of file show_meta.c.
References error(), free_db_attribute_list(), i, init_db_attribute_list(), metadata_of_access_status(), metadata_of_active_log_header(), metadata_of_archive_log_header(), metadata_of_full_timezones(), metadata_of_global_critical_sections(), metadata_of_heap_capacity(), metadata_of_heap_header(), metadata_of_index_capacity(), metadata_of_index_header(), metadata_of_job_queues(), metadata_of_page_buffer_status(), metadata_of_slotted_page_header(), metadata_of_slotted_page_slots(), metadata_of_threads(), metadata_of_timezones(), metadata_of_tran_tables(), metadata_of_volume_header(), NO_ERROR, on_error, SHOW_ALL, show_Inited, SHOW_ONLY, 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_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, and SHOWSTMT_VOLUME_HEADER.
Referenced by boot_restart_client().
|
static |
Definition at line 62 of file show_meta.c.
Referenced by showstmt_metadata_final(), and showstmt_metadata_init().
|
static |
Definition at line 63 of file show_meta.c.