CUBRID Engine  latest
query_dump.c File Reference
#include "config.h"
#include <stdio.h>
#include "jansson.h"
#include "query_dump.h"
#include "object_primitive.h"
#include "system_parameter.h"
#include "dbtype.h"
#include "xasl.h"
#include "xasl_aggregate.hpp"
#include "xasl_predicate.hpp"
Include dependency graph for query_dump.c:

Go to the source code of this file.

Classes

struct  qdump_xasl_check_node
 

Macros

#define foutput   stdout
 
#define HASH_NUMBER   128
 
#define HAVE_SUBQUERY_PROC(xasl_p)
 

Typedefs

typedef struct qdump_xasl_check_node QDUMP_XASL_CHECK_NODE
 

Enumerations

enum  { ARITH_EXP = 0, AGG_EXP = 1 }
 

Functions

static bool qdump_print_xasl_type (XASL_NODE *xasl)
 
static bool qdump_print_db_value_array (DB_VALUE **array, int cnt)
 
static bool qdump_print_column (const char *title_p, int col_count, int *column_p)
 
static bool qdump_print_list_merge_info (QFILE_LIST_MERGE_INFO *ptr)
 
static bool qdump_print_merge_list_proc_node (MERGELIST_PROC_NODE *ptr)
 
static bool qdump_print_update_proc_node (UPDATE_PROC_NODE *ptr)
 
static bool qdump_print_delete_proc_node (DELETE_PROC_NODE *ptr)
 
static bool qdump_print_insert_proc_node (INSERT_PROC_NODE *ptr)
 
static const char * qdump_target_type_string (TARGET_TYPE type)
 
static const char * qdump_access_method_string (ACCESS_METHOD access)
 
static bool qdump_print_access_spec (ACCESS_SPEC_TYPE *spec_list)
 
static const char * qdump_key_range_string (RANGE range)
 
static bool qdump_print_key_info (KEY_INFO *key_info)
 
static const char * qdump_range_type_string (RANGE_TYPE range_type)
 
static bool qdump_print_index (INDX_INFO *indexptr)
 
static bool qdump_print_btid (BTID id)
 
static bool qdump_print_class (CLS_SPEC_TYPE *ptr)
 
static bool qdump_print_hfid (HFID id)
 
static bool qdump_print_vfid (VFID id)
 
static bool qdump_print_list (LIST_SPEC_TYPE *ptr)
 
static bool qdump_print_showstmt (SHOWSTMT_SPEC_TYPE *ptr)
 
static bool qdump_print_outlist (const char *title, OUTPTR_LIST *outlist)
 
static bool qdump_print_list_id (QFILE_LIST_ID *idptr)
 
static bool qdump_print_type_list (QFILE_TUPLE_VALUE_TYPE_LIST *typeptr)
 
static bool qdump_print_domain_list (int cnt, TP_DOMAIN **ptr)
 
static bool qdump_print_sort_list (SORT_LIST *sorting_list)
 
static bool qdump_print_attribute_id (ATTR_DESCR attr)
 
static bool qdump_print_tuple_value_position (QFILE_TUPLE_VALUE_POSITION pos)
 
static bool qdump_print_value_list (VAL_LIST *vallist)
 
static bool qdump_print_regu_variable_list (REGU_VARIABLE_LIST varlist)
 
static const char * qdump_option_string (int option)
 
static bool qdump_print_db_value (DB_VALUE *value)
 
static const char * qdump_regu_type_string (REGU_DATATYPE type)
 
static bool qdump_print_regu_type (REGU_VARIABLE *value)
 
static const char * qdump_data_type_string (DB_TYPE type)
 
static bool qdump_print_value (REGU_VARIABLE *value)
 
static bool qdump_print_function_value (REGU_VARIABLE *regu)
 
static bool qdump_print_value_type_addr (REGU_VARIABLE *value)
 
static bool qdump_print_oid (OID *oidptr)
 
static bool qdump_print_predicate (PRED_EXPR *predptr)
 
static const char * qdump_relation_operator_string (int op)
 
static const char * qdump_arith_operator_string (OPERATOR_TYPE opcode)
 
static bool qdump_print_arith_expression (ARITH_TYPE *arith_p)
 
static bool qdump_print_aggregate_expression (AGGREGATE_TYPE *aggptr)
 
static bool qdump_print_arith (int type, void *ptr)
 
static bool qdump_print_term (PRED_EXPR *pred_ptr)
 
static const char * qdump_bool_operator_string (BOOL_OP bool_op)
 
static bool qdump_print_lhs_predicate (PRED_EXPR *pred_p)
 
static bool qdump_print_attribute (const char *action_p, int attr_count, int *attr_ids_p)
 
const char * qdump_operator_type_string (OPERATOR_TYPE optype)
 
static bool qdump_print_comp_eval_term (EVAL_TERM *term_p)
 
static bool qdump_print_alsm_eval_term (EVAL_TERM *term_p)
 
static bool qdump_print_like_eval_term (EVAL_TERM *term_p)
 
static bool qdump_print_rlike_eval_term (EVAL_TERM *term_p)
 
static bool qdump_print_eval_term (PRED_EXPR *pred_p)
 
static bool qdump_print_fetch_node (XASL_NODE *xasl_p)
 
static bool qdump_print_build_list_node (XASL_NODE *xasl_p)
 
static bool qdump_print_build_value_node (XASL_NODE *xasl_p)
 
static bool qdump_print_connect_by_proc_node (XASL_NODE *xasl_p)
 
bool qdump_print_xasl (xasl_node *xasl_p)
 

Macro Definition Documentation

#define HASH_NUMBER   128

Definition at line 48 of file query_dump.c.

Referenced by qdump_print_arith().

#define HAVE_SUBQUERY_PROC (   xasl_p)
Value:
((xasl_p)->type != MERGELIST_PROC && (xasl_p)->type != UNION_PROC \
&& (xasl_p)->type != INTERSECTION_PROC && (xasl_p)->type != DIFFERENCE_PROC)

Definition at line 50 of file query_dump.c.

Referenced by qdump_print_xasl().

Typedef Documentation

Definition at line 54 of file query_dump.c.

Enumeration Type Documentation

anonymous enum
Enumerator
ARITH_EXP 
AGG_EXP 

Definition at line 42 of file query_dump.c.

Function Documentation

static const char * qdump_access_method_string ( ACCESS_METHOD  access)
static

Definition at line 435 of file query_dump.c.

References ACCESS_METHOD_INDEX, ACCESS_METHOD_SEQUENTIAL, ACCESS_METHOD_SEQUENTIAL_PAGE_SCAN, and ACCESS_METHOD_SEQUENTIAL_RECORD_INFO.

Referenced by qdump_print_access_spec().

Here is the caller graph for this function:

static const char * qdump_arith_operator_string ( OPERATOR_TYPE  opcode)
static

Definition at line 1673 of file query_dump.c.

References T_ADD, T_BIT_AND, T_BIT_NOT, T_BIT_OR, T_BIT_XOR, T_BITSHIFT_LEFT, T_BITSHIFT_RIGHT, T_DIV, T_INTDIV, T_INTMOD, T_MUL, T_STRCAT, and T_SUB.

Referenced by qdump_print_arith_expression().

Here is the caller graph for this function:

static const char * qdump_bool_operator_string ( BOOL_OP  bool_op)
static

Definition at line 1529 of file query_dump.c.

References B_AND, B_IS, B_IS_NOT, B_OR, and B_XOR.

Referenced by qdump_print_lhs_predicate().

Here is the caller graph for this function:

static const char * qdump_key_range_string ( RANGE  range)
static

Definition at line 538 of file query_dump.c.

References EQ_NA, GE_INF, GE_LE, GE_LT, GT_INF, GT_LE, GT_LT, INF_INF, INF_LE, INF_LT, and NA_NA.

Referenced by qdump_print_key_info().

Here is the caller graph for this function:

const char* qdump_operator_type_string ( OPERATOR_TYPE  optype)

Definition at line 1016 of file query_dump.c.

References NULL, and T_TO_CHAR.

Referenced by catcls_get_or_value_from_attribute(), and qexec_execute_build_columns().

Here is the caller graph for this function:

static const char * qdump_option_string ( int  option)
static

Definition at line 990 of file query_dump.c.

References Q_ALL, and Q_DISTINCT.

Referenced by qdump_print_aggregate_expression().

Here is the caller graph for this function:

static bool qdump_print_arith_expression ( ARITH_TYPE arith_p)
static
static bool qdump_print_attribute ( const char *  action_p,
int  attr_count,
int *  attr_ids_p 
)
static

Definition at line 300 of file query_dump.c.

References foutput, and i.

Referenced by qdump_print_insert_proc_node(), and qdump_print_update_proc_node().

Here is the caller graph for this function:

static bool qdump_print_attribute_id ( ATTR_DESCR  attr)
static

Definition at line 897 of file query_dump.c.

References foutput, attr_descr_node::id, qdump_data_type_string(), and attr_descr_node::type.

Referenced by qdump_print_value().

Here is the caller graph for this function:

static bool qdump_print_btid ( BTID  id)
static

Definition at line 668 of file query_dump.c.

References vfid::fileid, and foutput.

Referenced by qdump_print_aggregate_expression(), and qdump_print_index().

Here is the caller graph for this function:

static bool qdump_print_column ( const char *  title_p,
int  col_count,
int *  column_p 
)
static

Definition at line 210 of file query_dump.c.

References foutput, and i.

Referenced by qdump_print_list_merge_info().

Here is the caller graph for this function:

static bool qdump_print_db_value ( DB_VALUE value)
static
static bool qdump_print_db_value_array ( DB_VALUE **  array,
int  cnt 
)
static

Definition at line 188 of file query_dump.c.

References cubregex::count(), foutput, i, NULL, and qdump_print_db_value().

Referenced by qdump_print_build_list_node().

Here is the caller graph for this function:

static bool qdump_print_delete_proc_node ( DELETE_PROC_NODE ptr)
static
static bool qdump_print_domain_list ( int  cnt,
TP_DOMAIN **  ptr 
)
static

Definition at line 837 of file query_dump.c.

References foutput, i, NULL, qdump_data_type_string(), and TP_DOMAIN_TYPE.

Referenced by qdump_print_type_list().

Here is the caller graph for this function:

static bool qdump_print_fetch_node ( XASL_NODE xasl_p)
static
static bool qdump_print_function_value ( REGU_VARIABLE regu)
static

Definition at line 1288 of file query_dump.c.

References fcode_get_uppercase_name(), foutput, NULL, qdump_print_regu_variable_list(), REGU_VARIABLE_HIDDEN_COLUMN, and REGU_VARIABLE_IS_FLAGED().

Referenced by qdump_print_value().

Here is the caller graph for this function:

static bool qdump_print_hfid ( HFID  id)
static

Definition at line 699 of file query_dump.c.

References foutput, and qdump_print_vfid().

Referenced by qdump_print_class(), qdump_print_delete_proc_node(), qdump_print_insert_proc_node(), and qdump_print_update_proc_node().

Here is the caller graph for this function:

static bool qdump_print_index ( INDX_INFO indexptr)
static

Definition at line 636 of file query_dump.c.

References indx_info::btid, foutput, indx_info::key_info, NULL, qdump_print_btid(), qdump_print_key_info(), qdump_range_type_string(), and indx_info::range_type.

Referenced by qdump_print_access_spec().

Here is the caller graph for this function:

static bool qdump_print_insert_proc_node ( INSERT_PROC_NODE ptr)
static
static bool qdump_print_lhs_predicate ( PRED_EXPR pred_p)
static
static bool qdump_print_like_eval_term ( EVAL_TERM term_p)
static
static bool qdump_print_list_id ( QFILE_LIST_ID idptr)
static
static bool qdump_print_oid ( OID oidptr)
static

Definition at line 1376 of file query_dump.c.

References foutput, db_identifier::pageid, db_identifier::slotid, and db_identifier::volid.

Referenced by qdump_print_delete_proc_node(), qdump_print_update_proc_node(), and qdump_print_xasl().

Here is the caller graph for this function:

static bool qdump_print_outlist ( const char *  title,
OUTPTR_LIST outlist 
)
static
static bool qdump_print_regu_type ( REGU_VARIABLE value)
static

Definition at line 1076 of file query_dump.c.

References DB_VALUE_DOMAIN_TYPE, foutput, qdump_data_type_string(), qdump_regu_type_string(), and TYPE_DBVAL.

Referenced by qdump_print_value_type_addr().

Here is the caller graph for this function:

static bool qdump_print_regu_variable_list ( REGU_VARIABLE_LIST  varlist)
static
static bool qdump_print_showstmt ( SHOWSTMT_SPEC_TYPE ptr)
static

Definition at line 746 of file query_dump.c.

References showstmt_spec_node::arg_list, foutput, qdump_print_regu_variable_list(), and showstmt_spec_node::show_type.

Referenced by qdump_print_access_spec().

Here is the caller graph for this function:

static bool qdump_print_sort_list ( SORT_LIST sorting_list)
static

Definition at line 860 of file query_dump.c.

References foutput, sort_list::next, NULL, sort_list::pos_descr, qdump_print_tuple_value_position(), S_ASC, and sort_list::s_order.

Referenced by qdump_print_build_list_node(), and qdump_print_xasl().

Here is the caller graph for this function:

static bool qdump_print_term ( PRED_EXPR pred_ptr)
static
static bool qdump_print_tuple_value_position ( QFILE_TUPLE_VALUE_POSITION  pos)
static

Definition at line 911 of file query_dump.c.

References qfile_tuple_value_position::dom, foutput, qfile_tuple_value_position::pos_no, qdump_data_type_string(), and TP_DOMAIN_TYPE.

Referenced by qdump_print_sort_list(), and qdump_print_value().

Here is the caller graph for this function:

static bool qdump_print_type_list ( QFILE_TUPLE_VALUE_TYPE_LIST typeptr)
static

Definition at line 820 of file query_dump.c.

References qfile_tuple_value_type_list::domp, foutput, qdump_print_domain_list(), and qfile_tuple_value_type_list::type_cnt.

Referenced by qdump_print_list_id().

Here is the caller graph for this function:

static bool qdump_print_value_type_addr ( REGU_VARIABLE value)
static
static bool qdump_print_vfid ( VFID  id)
static

Definition at line 713 of file query_dump.c.

References foutput.

Referenced by qdump_print_hfid().

Here is the caller graph for this function:

bool qdump_print_xasl ( xasl_node xasl_p)

Definition at line 2294 of file query_dump.c.

References access_spec_node::access, ACCESS_METHOD_INDEX, ACCESS_METHOD_SEQUENTIAL, ACCESS_SPEC_CLS_SPEC, xasl_node::after_join_pred, xasl_node::aptr_list, assert, xasl_node::bptr_list, indx_info::btid, BUILD_SCHEMA_PROC, xasl_node::buildlist, BUILDLIST_PROC, BUILDVALUE_PROC, xasl_node::cat_fetched, xasl_node::class_locks, xasl_node::class_oid_list, cls_spec_node::cls_oid, xasl_node::connect_by_ptr, CONNECTBY_PROC, xasl_node::creator_oid, xasl_node::cte, CTE_PROC, xasl_node::curr_spec, DB_VALUE_DOMAIN_TYPE, xasl_node::dbval_cnt, xasl_node::delete_, DELETE_PROC, DIFFERENCE_PROC, DO_PROC, xasl_node::dptr_list, buildlist_proc_node::eptr_list, er_clear(), xasl_node::flag, foutput, xasl_node::fptr_list, free_and_init, HAVE_SUBQUERY_PROC, heap_get_class_name(), heap_get_indexinfo_of_btid(), HS_ACCEPT_ALL, HS_REJECT_ALL, i, xasl_node::if_pred, access_spec_node::indexptr, mergelist_proc_node::inner_xasl, xasl_node::insert, INSERT_PROC, merge_proc_node::insert_xasl, xasl_node::instnum_flag, xasl_node::instnum_pred, xasl_node::instnum_val, INTERSECTION_PROC, xasl_node::is_single_tuple, xasl_node::iscycle_regu, xasl_node::iscycle_val, xasl_node::isleaf_regu, xasl_node::isleaf_val, union_proc_node::left, xasl_node::level_regu, xasl_node::level_val, xasl_node::list_id, LOCK_TO_LOCKMODE_STRING, xasl_node::merge, MERGE_PROC, xasl_node::merge_spec, xasl_node::mergelist, MERGELIST_PROC, xasl_node::n_oid_list, qproc_db_value_list::next, access_spec_node::next, xasl_node::next, xasl_node::next_scan_block_on, xasl_node::next_scan_on, NO_ERROR, cte_proc_node::non_recursive_part, NULL, OBJFETCH_PROC, xasl_node::option, xasl_node::ordbynum_flag, xasl_node::ordbynum_pred, xasl_node::ordbynum_val, xasl_node::orderby_limit, xasl_node::orderby_list, mergelist_proc_node::outer_xasl, xasl_node::outptr_list, prm_get_bool_value(), PRM_ID_USE_ORDERBY_SORT_LIMIT, xasl_node::proc, Q_DISTINCT, qdump_data_type_string(), qdump_print_access_spec(), qdump_print_build_list_node(), qdump_print_build_value_node(), qdump_print_connect_by_proc_node(), qdump_print_db_value(), qdump_print_delete_proc_node(), qdump_print_fetch_node(), qdump_print_insert_proc_node(), qdump_print_list_id(), qdump_print_merge_list_proc_node(), qdump_print_oid(), qdump_print_outlist(), qdump_print_predicate(), qdump_print_sort_list(), qdump_print_update_proc_node(), qdump_print_value(), qdump_print_value_list(), qdump_print_xasl(), qdump_print_xasl_type(), xasl_node::query_alias, cte_proc_node::recursive_part, union_proc_node::right, xasl_node::save_instnum_val, SCAN_PROC, xasl_node::scan_ptr, xasl_node::single_tuple, xasl_node::spec_list, TARGET_CLASS, TARGET_CLASS_ATTR, TARGET_LIST, TARGET_METHOD, TARGET_SET, TARGET_SHOWSTMT, xasl_node::tcard_list, thread_get_thread_entry_info(), TO_MSEC, access_spec_node::type, xasl_node::type, xasl_node::union_, UNION_PROC, xasl_node::update, UPDATE_PROC, merge_proc_node::update_xasl, qproc_db_value_list::val, xasl_node::val_list, val_list_node::valp, XASL_CLEAR_FLAG, XASL_INSTNUM_FLAG_SCAN_CONTINUE, XASL_IS_FLAGED, XASL_LINK_TO_REGU_VARIABLE, XASL_ORDBYNUM_FLAG_SCAN_CONTINUE, XASL_SKIP_ORDERBY_LIST, XASL_TOP_MOST_XASL, and XASL_ZERO_CORR_LEVEL.

Referenced by parser_generate_do_stmt_xasl(), parser_generate_xasl(), qdump_print_xasl(), and qexec_execute_query().

Here is the caller graph for this function:

static bool qdump_print_xasl_type ( XASL_NODE xasl)
static
static const char * qdump_range_type_string ( RANGE_TYPE  range_type)
static

Definition at line 613 of file query_dump.c.

References R_KEY, R_KEYLIST, R_RANGE, and R_RANGELIST.

Referenced by qdump_print_index().

Here is the caller graph for this function:

static const char * qdump_regu_type_string ( REGU_DATATYPE  type)
static
static const char * qdump_relation_operator_string ( int  op)
static

Definition at line 1645 of file query_dump.c.

References R_EQ, R_EXISTS, R_GE, R_GT, R_LE, R_LT, R_NE, R_NULL, and R_NULLSAFE_EQ.

Referenced by qdump_print_alsm_eval_term(), and qdump_print_comp_eval_term().

Here is the caller graph for this function:

static const char * qdump_target_type_string ( TARGET_TYPE  type)
static

Definition at line 408 of file query_dump.c.

References TARGET_CLASS, TARGET_CLASS_ATTR, TARGET_LIST, TARGET_METHOD, TARGET_SET, and TARGET_SHOWSTMT.

Referenced by qdump_print_access_spec().

Here is the caller graph for this function: