CUBRID Engine  latest
execute_schema.h File Reference
#include "dbi.h"
#include "schema_manager.h"
Include dependency graph for execute_schema.h:

Go to the source code of this file.

Classes

struct  client_update_class_info
 
struct  client_update_info
 

Macros

#define UNIQUE_PARTITION_SAVEPOINT_GRANT   "pARTITIONgRANT"
 
#define UNIQUE_PARTITION_SAVEPOINT_REVOKE   "pARTITIONrEVOKE"
 
#define UNIQUE_PARTITION_SAVEPOINT_RENAME   "pARTITIONrENAME"
 
#define UNIQUE_PARTITION_SAVEPOINT_DROP   "pARTITIONdROP"
 
#define UNIQUE_PARTITION_SAVEPOINT_OWNER   "pARTITIONoWNER"
 
#define UNIQUE_PARTITION_SAVEPOINT_INDEX   "pARTITIONiNDEX"
 
#define UNIQUE_PARTITION_SAVEPOINT_ALTER   "pARTITIONaLTER"
 
#define PARTITION_CATALOG_CLASS   "_db_partition"
 
#define PARTITION_VARCHAR_LEN   (DB_MAX_IDENTIFIER_LENGTH)
 
#define CLASS_ATT_NAME   "class_name"
 
#define CLASS_IS_PARTITION   "partition_of"
 
#define CHECK_PARTITION_NONE   0x0000
 
#define CHECK_PARTITION_PARENT   0x0001
 
#define CHECK_PARTITION_SUBS   0x0010
 

Typedefs

typedef struct client_update_info CLIENT_UPDATE_INFO
 
typedef struct client_update_class_info CLIENT_UPDATE_CLASS_INFO
 

Functions

int do_drop_partitioned_class (MOP class_, int drop_sub_flag, bool is_cascade_constraints)
 
int do_is_partitioned_subclass (int *is_partitioned, const char *classname, char *keyattr)
 
int do_get_partition_parent (DB_OBJECT *const classop, MOP *const parentop)
 
int do_rename_partition (MOP old_class, const char *newname)
 
int do_check_partitioned_class (DB_OBJECT *classop, int check_map, char *keyattr)
 
int do_get_partition_keycol (char *keycol, MOP class_)
 
int do_get_partition_size (MOP class_)
 
int do_drop_partition_list (MOP class_, PT_NODE *name_list, DB_CTMPL *tmpl)
 
int do_add_queries (PARSER_CONTEXT *parser, DB_CTMPL *ctemplate, const PT_NODE *queries)
 
int do_add_attributes (PARSER_CONTEXT *parser, DB_CTMPL *ctemplate, PT_NODE *atts, PT_NODE *constraints, DB_QUERY_TYPE *create_select_columns)
 
int do_add_constraints (DB_CTMPL *ctemplate, PT_NODE *constraints)
 
int do_check_fk_constraints (DB_CTMPL *ctemplate, PT_NODE *constraints)
 
int do_add_methods (PARSER_CONTEXT *parser, DB_CTMPL *ctemplate, PT_NODE *methods)
 
int do_add_method_files (const PARSER_CONTEXT *parser, DB_CTMPL *ctemplate, PT_NODE *method_files)
 
int do_add_resolutions (const PARSER_CONTEXT *parser, DB_CTMPL *ctemplate, const PT_NODE *resolution)
 
int do_add_supers (const PARSER_CONTEXT *parser, DB_CTMPL *ctemplate, const PT_NODE *supers)
 
int do_set_object_id (const PARSER_CONTEXT *parser, DB_CTMPL *ctemplate, PT_NODE *object_id_list)
 
int do_create_local (PARSER_CONTEXT *parser, DB_CTMPL *ctemplate, PT_NODE *pt_node, DB_QUERY_TYPE *create_select_columns)
 
int do_create_entity (PARSER_CONTEXT *parser, PT_NODE *node)
 
int do_check_rows_for_null (MOP class_mop, const char *att_name, bool *has_nulls)
 
int do_recreate_func_index_constr (PARSER_CONTEXT *parser, SM_CONSTRAINT_INFO *constr, SM_FUNCTION_INFO *func_index_info, PT_NODE *alter, const char *src_cls_name, const char *new_cls_name)
 
int do_recreate_filter_index_constr (PARSER_CONTEXT *parser, SM_PREDICATE_INFO *filter_index_info, PT_NODE *alter, const char *src_cls_name, const char *new_cls_name)
 

Macro Definition Documentation

#define CHECK_PARTITION_NONE   0x0000

Definition at line 48 of file execute_schema.h.

Referenced by db_dput(), db_put(), dbt_dput(), dbt_put(), and rs_set_db_value().

#define CHECK_PARTITION_PARENT   0x0001

Definition at line 49 of file execute_schema.h.

Referenced by db_create(), dbt_create_object(), and do_check_partitioned_class().

#define CLASS_ATT_NAME   "class_name"

Definition at line 45 of file execute_schema.h.

#define CLASS_IS_PARTITION   "partition_of"

Definition at line 46 of file execute_schema.h.

#define PARTITION_CATALOG_CLASS   "_db_partition"

Definition at line 43 of file execute_schema.h.

#define PARTITION_VARCHAR_LEN   (DB_MAX_IDENTIFIER_LENGTH)
#define UNIQUE_PARTITION_SAVEPOINT_ALTER   "pARTITIONaLTER"

Definition at line 42 of file execute_schema.h.

Referenced by do_alter_one_clause_with_template().

#define UNIQUE_PARTITION_SAVEPOINT_DROP   "pARTITIONdROP"

Definition at line 39 of file execute_schema.h.

Referenced by sm_delete_class_mop().

#define UNIQUE_PARTITION_SAVEPOINT_GRANT   "pARTITIONgRANT"

Definition at line 36 of file execute_schema.h.

Referenced by au_grant().

#define UNIQUE_PARTITION_SAVEPOINT_INDEX   "pARTITIONiNDEX"
#define UNIQUE_PARTITION_SAVEPOINT_OWNER   "pARTITIONoWNER"

Definition at line 40 of file execute_schema.h.

Referenced by au_change_owner_method().

#define UNIQUE_PARTITION_SAVEPOINT_RENAME   "pARTITIONrENAME"

Definition at line 38 of file execute_schema.h.

Referenced by sm_rename_class().

#define UNIQUE_PARTITION_SAVEPOINT_REVOKE   "pARTITIONrEVOKE"

Definition at line 37 of file execute_schema.h.

Referenced by au_revoke().

Typedef Documentation

Definition at line 53 of file execute_schema.h.

Definition at line 52 of file execute_schema.h.

Function Documentation

int do_add_attributes ( PARSER_CONTEXT parser,
DB_CTMPL ctemplate,
PT_NODE atts,
PT_NODE constraints,
DB_QUERY_TYPE create_select_columns 
)
int do_add_queries ( PARSER_CONTEXT parser,
DB_CTMPL ctemplate,
const PT_NODE queries 
)

Definition at line 8242 of file execute_schema.c.

References add_union_query(), error(), parser_node::next, and NO_ERROR.

Referenced by do_alter_one_clause_with_template(), and do_create_local().

Here is the caller graph for this function:

int do_add_supers ( const PARSER_CONTEXT parser,
DB_CTMPL ctemplate,
const PT_NODE supers 
)
int do_check_fk_constraints ( DB_CTMPL ctemplate,
PT_NODE constraints 
)
int do_create_entity ( PARSER_CONTEXT parser,
PT_NODE node 
)

Definition at line 8566 of file execute_schema.c.

References ARG_FILE_LINE, assert, parser_varchar::bytes, CHECK_MODIFICATION_ERROR, db_value_slist::class_obj, sm_class::collation_id, sm_class::comment, pt_statement_info::create_entity, pt_create_entity_info::create_index, pt_create_entity_info::create_like, pt_create_entity_info::create_select, pt_create_entity_info::create_select_action, pt_value_info::data_value, DB_DEFAULT_PRECISION, db_find_class(), db_free_query_format(), DB_MAX_VARCHAR_PRECISION, DB_MAX_VARNCHAR_PRECISION, db_query_format_next(), DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, dbt_abort_class(), dbt_copy_class(), dbt_create_class(), dbt_create_vclass(), dbt_finish_class(), do_copy_indexes(), do_create_index(), do_create_local(), do_create_partition(), do_is_partitioned_subclass(), db_query_type::domain, drop_class_name(), pt_create_entity_info::entity_name, pt_create_entity_info::entity_type, er_clear(), er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_GENERIC_ERROR, er_get_severity(), ER_INHERIT_FROM_PARTITION_TABLE, ER_INVALID_PARTITION_REQUEST, ER_LC_UNKNOWN_CLASSNAME, ER_LK_UNILATERALLY_ABORTED, er_set(), ER_WARNING_SEVERITY, error(), execute_create_select_query(), file_apply_tde_to_class_files(), sm_class::flags, pt_data_value::i, pr_type::id, if(), pt_create_entity_info::if_not_exists, pt_statement_info::index, pt_index_info::indexed_class, parser_node::info, sm_partition_alter_info::keycol, LANG_SYS_CODESET, LANG_SYS_COLLATION, locator_create_heap_if_needed(), locator_flush_class(), pt_statement_info::name, parser_node::next, NO_ERROR, parser_node::node_type, NULL, vid_oid::oid, db_object::oid_info, pt_table_option_info::option, pt_create_entity_info::or_replace, pt_name_info::original, pt_create_entity_info::partition_info, tp_domain::precision, prm_get_bool_value(), prm_get_integer_value(), PRM_ID_TB_DEFAULT_REUSE_OID, PRM_ID_TDE_DEFAULT_ALGORITHM, sm_partition_alter_info::promoted_count, sm_partition_alter_info::promoted_names, PT_CASCADED, pt_check_grammar_charset_collation(), PT_CLASS, pt_entity(), pt_get_select_query_columns(), pt_get_varchar_bytes(), pt_has_error, PT_LOCAL, pt_report_to_ersys(), PT_SEMANTIC, pt_semantic_check(), PT_TABLE_OPTION, PT_TABLE_OPTION_CHARSET, PT_TABLE_OPTION_COLLATION, PT_TABLE_OPTION_COMMENT, PT_TABLE_OPTION_DONT_REUSE_OID, PT_TABLE_OPTION_ENCRYPT, PT_TABLE_OPTION_REUSE_OID, PT_TYPE_INTEGER, PT_VALUE, PT_VCLASS, sm_partition_alter_info::root_op, sm_partition_alter_info::root_tmpl, SM_CLASSFLAG_LOCALCHECKOPTION, SM_CLASSFLAG_REUSE_OID, SM_CLASSFLAG_WITHCHECKOPTION, sm_is_partitioned_class(), sm_set_class_collation(), sm_set_class_comment(), sm_set_class_flag(), sm_set_class_tde_algorithm(), pt_data_value::str, pt_create_entity_info::supclass_list, pt_statement_info::table_option, pt_create_entity_info::table_option_list, sm_class::tde_algorithm, TDE_ALGORITHM_NONE, tran_abort_upto_system_savepoint(), tran_system_savepoint(), tp_domain::type, parser_node::type_enum, UNIQUE_SAVEPOINT_CREATE_ENTITY, UNIQUE_SAVEPOINT_REPLACE_VIEW, pt_table_option_info::val, pt_statement_info::value, pt_create_entity_info::vclass_comment, and pt_create_entity_info::with_check_option.

Referenced by do_execute_statement(), and do_statement().

Here is the caller graph for this function:

int do_drop_partitioned_class ( MOP  class_,
int  drop_sub_flag,
bool  is_cascade_constraints 
)
int do_get_partition_parent ( DB_OBJECT *const  classop,
MOP *const  parentop 
)
int do_recreate_filter_index_constr ( PARSER_CONTEXT parser,
SM_PREDICATE_INFO filter_index_info,
PT_NODE alter,
const char *  src_cls_name,
const char *  new_cls_name 
)

Definition at line 14536 of file execute_schema.c.

References pt_statement_info::alter, ARG_FILE_LINE, assert, sm_predicate_info::att_ids, pred_expr_with_context::attrids_pred, parser_varchar::bytes, parser_context::custom_print, pt_alter_info::entity_name, pt_spec_info::entity_name, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), ER_SM_INVALID_FILTER_PREDICATE_LENGTH, error(), pt_statement_info::expr, free_and_init, pt_select_info::from, i, parser_node::info, MAX_FILTER_PREDICATE_STRING_LENGTH, MSGCAT_RUNTIME_RESOURCES_EXHAUSTED, MSGCAT_SET_ERROR, MSGCAT_SET_PARSER_RUNTIME, pt_statement_info::name, parser_node::next, NO_ERROR, parser_node::node_type, NULL, sm_predicate_info::num_attrs, pred_expr_with_context::num_attrs_pred, pt_name_info::original, pt_expr_info::paren_type, parser_create_parser(), parser_free_parser(), parser_free_tree(), parser_parse_string_use_sys_charset(), parser_walk_tree(), sm_predicate_info::pred_stream, sm_predicate_info::pred_stream_size, sm_predicate_info::pred_string, PT_ALTER, PT_CHARSET_COLLATE_FULL, pt_enter_packing_buf(), PT_ERRORm, PT_ERRORmf, pt_exit_packing_buf(), pt_has_error, pt_name(), pt_print_bytes(), pt_replace_names_index_expr(), pt_resolve_names(), pt_semantic_type(), pt_to_pred_with_context(), pt_query_info::q, pt_statement_info::query, replace_names_alter_chg_attr(), pt_query_info::select, pt_statement_info::spec, strlen, pt_select_info::where, and xts_map_filter_pred_to_stream().

Referenced by do_alter_clause_change_attribute(), do_copy_indexes(), do_recreate_renamed_class_indexes(), sm_add_secondary_index_on_partition(), and sm_exist_index().

Here is the caller graph for this function:

int do_recreate_func_index_constr ( PARSER_CONTEXT parser,
SM_CONSTRAINT_INFO constr,
SM_FUNCTION_INFO func_index_info,
PT_NODE alter,
const char *  src_cls_name,
const char *  new_cls_name 
)
int do_set_object_id ( const PARSER_CONTEXT parser,
DB_CTMPL ctemplate,
PT_NODE object_id_list 
)