CUBRID Engine  latest
show_meta.c File Reference
#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"
Include dependency graph for show_meta.c:

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 }
 

Functions

static int init_db_attribute_list (SHOWSTMT_METADATA *md)
 
static void free_db_attribute_list (SHOWSTMT_METADATA *md)
 
static PT_NODEpt_check_access_status (PARSER_CONTEXT *parser, PT_NODE *node)
 
static PT_NODEpt_check_table_in_show_heap (PARSER_CONTEXT *parser, PT_NODE *node)
 
static PT_NODEpt_check_show_index (PARSER_CONTEXT *parser, PT_NODE *node)
 
static SHOWSTMT_METADATAmetadata_of_volume_header (void)
 
static SHOWSTMT_METADATAmetadata_of_access_status (void)
 
static SHOWSTMT_METADATAmetadata_of_active_log_header (void)
 
static SHOWSTMT_METADATAmetadata_of_archive_log_header (void)
 
static SHOWSTMT_METADATAmetadata_of_slotted_page_header (void)
 
static SHOWSTMT_METADATAmetadata_of_slotted_page_slots (void)
 
static SHOWSTMT_METADATAmetadata_of_heap_header (SHOW_ONLY_ALL flag)
 
static SHOWSTMT_METADATAmetadata_of_heap_capacity (SHOW_ONLY_ALL flag)
 
static SHOWSTMT_METADATAmetadata_of_index_header (SHOW_ONLY_ALL flag)
 
static SHOWSTMT_METADATAmetadata_of_index_capacity (SHOW_ONLY_ALL flag)
 
static SHOWSTMT_METADATAmetadata_of_global_critical_sections (void)
 
static SHOWSTMT_METADATAmetadata_of_job_queues (void)
 
static SHOWSTMT_METADATAmetadata_of_timezones (void)
 
static SHOWSTMT_METADATAmetadata_of_full_timezones (void)
 
static SHOWSTMT_METADATAmetadata_of_tran_tables (void)
 
static SHOWSTMT_METADATAmetadata_of_threads (void)
 
static SHOWSTMT_METADATAmetadata_of_page_buffer_status (void)
 
const SHOWSTMT_METADATAshowstmt_get_metadata (SHOWSTMT_TYPE show_type)
 
DB_ATTRIBUTEshowstmt_get_attributes (SHOWSTMT_TYPE show_type)
 
int showstmt_metadata_init (void)
 
void showstmt_metadata_final (void)
 

Variables

static bool show_Inited = false
 
static SHOWSTMT_METADATAshow_Metas [SHOWSTMT_END]
 

Enumeration Type Documentation

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.

Enumerator
SHOW_ONLY 
SHOW_ALL 

Definition at line 56 of file show_meta.c.

Function Documentation

static void free_db_attribute_list ( SHOWSTMT_METADATA md)
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().

Here is the caller graph for this function:

static SHOWSTMT_METADATA * metadata_of_access_status ( void  )
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().

Here is the caller graph for this function:

static SHOWSTMT_METADATA * metadata_of_active_log_header ( void  )
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().

Here is the caller graph for this function:

static SHOWSTMT_METADATA * metadata_of_archive_log_header ( void  )
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().

Here is the caller graph for this function:

static SHOWSTMT_METADATA * metadata_of_full_timezones ( void  )
static

Definition at line 563 of file show_meta.c.

References NULL, ORDER_ASC, and SHOWSTMT_FULL_TIMEZONES.

Referenced by showstmt_metadata_init().

Here is the caller graph for this function:

static SHOWSTMT_METADATA * metadata_of_global_critical_sections ( void  )
static

Definition at line 490 of file show_meta.c.

References NULL, ORDER_ASC, and SHOWSTMT_GLOBAL_CRITICAL_SECTIONS.

Referenced by showstmt_metadata_init().

Here is the caller graph for this function:

static SHOWSTMT_METADATA * metadata_of_heap_capacity ( SHOW_ONLY_ALL  flag)
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().

Here is the caller graph for this function:

static SHOWSTMT_METADATA * metadata_of_heap_header ( SHOW_ONLY_ALL  flag)
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().

Here is the caller graph for this function:

static SHOWSTMT_METADATA * metadata_of_index_capacity ( SHOW_ONLY_ALL  flag)
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().

Here is the caller graph for this function:

static SHOWSTMT_METADATA * metadata_of_index_header ( SHOW_ONLY_ALL  flag)
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().

Here is the caller graph for this function:

static SHOWSTMT_METADATA * metadata_of_job_queues ( void  )
static

Definition at line 520 of file show_meta.c.

References NULL, ORDER_ASC, and SHOWSTMT_JOB_QUEUES.

Referenced by showstmt_metadata_init().

Here is the caller graph for this function:

static SHOWSTMT_METADATA * metadata_of_page_buffer_status ( void  )
static

Definition at line 693 of file show_meta.c.

References NULL, ORDER_ASC, and SHOWSTMT_PAGE_BUFFER_STATUS.

Referenced by showstmt_metadata_init().

Here is the caller graph for this function:

static SHOWSTMT_METADATA * metadata_of_slotted_page_header ( void  )
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().

Here is the caller graph for this function:

static SHOWSTMT_METADATA * metadata_of_slotted_page_slots ( void  )
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().

Here is the caller graph for this function:

static SHOWSTMT_METADATA * metadata_of_threads ( void  )
static

Definition at line 650 of file show_meta.c.

References NULL, ORDER_ASC, and SHOWSTMT_THREADS.

Referenced by showstmt_metadata_init().

Here is the caller graph for this function:

static SHOWSTMT_METADATA * metadata_of_timezones ( void  )
static

Definition at line 543 of file show_meta.c.

References NULL, ORDER_ASC, and SHOWSTMT_TIMEZONES.

Referenced by showstmt_metadata_init().

Here is the caller graph for this function:

static SHOWSTMT_METADATA * metadata_of_tran_tables ( void  )
static

Definition at line 586 of file show_meta.c.

References NULL, ORDER_ASC, and SHOWSTMT_TRAN_TABLES.

Referenced by showstmt_metadata_init().

Here is the caller graph for this function:

static SHOWSTMT_METADATA * metadata_of_volume_header ( void  )
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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

Variable Documentation

bool show_Inited = false
static

Definition at line 62 of file show_meta.c.

Referenced by showstmt_metadata_final(), and showstmt_metadata_init().

SHOWSTMT_METADATA* show_Metas[SHOWSTMT_END]
static

Definition at line 63 of file show_meta.c.