CUBRID Engine  latest
execute_schema.c File Reference
#include "config.h"
#include <stdarg.h>
#include <ctype.h>
#include <assert.h>
#include "authenticate.h"
#include "error_manager.h"
#include "parser.h"
#include "parser_message.h"
#include "db.h"
#include "dbi.h"
#include "semantic_check.h"
#include "execute_schema.h"
#include "execute_statement.h"
#include "schema_manager.h"
#include "transaction_cl.h"
#include "system_parameter.h"
#include "xasl_generation.h"
#include "memory_alloc.h"
#include "transform.h"
#include "set_object.h"
#include "object_accessor.h"
#include "object_primitive.h"
#include "object_representation.h"
#include "memory_hash.h"
#include "locator_cl.h"
#include "network_interface_cl.h"
#include "view_transform.h"
#include "xasl_to_stream.h"
#include "parser_support.h"
#include "dbtype.h"

Go to the source code of this file.

Classes

struct  sm_attr_properties_chg
 
struct  sm_partition_alter_info
 
struct  part_class_info
 
struct  db_value_slist
 

Macros

#define UNIQUE_SAVEPOINT_ADD_ATTR_MTHD   "aDDaTTRmTHD"
 
#define UNIQUE_SAVEPOINT_CREATE_ENTITY   "cREATEeNTITY"
 
#define UNIQUE_SAVEPOINT_DROP_ENTITY   "dROPeNTITY"
 
#define UNIQUE_SAVEPOINT_REPLACE_VIEW   "rEPlACE"
 
#define UNIQUE_SAVEPOINT_RENAME   "rENAME"
 
#define UNIQUE_SAVEPOINT_MULTIPLE_ALTER   "mULTIPLEaLTER"
 
#define UNIQUE_SAVEPOINT_TRUNCATE   "tRUnCATE"
 
#define UNIQUE_SAVEPOINT_CHANGE_ATTR   "cHANGEaTTR"
 
#define UNIQUE_SAVEPOINT_ALTER_INDEX   "aLTERiNDEX"
 
#define UNIQUE_SAVEPOINT_CHANGE_DEF_COLL   "cHANGEdEFAULTcOLL"
 
#define UNIQUE_SAVEPOINT_CHANGE_TBL_COMMENT   "cHANGEtBLcOMMENT"
 
#define UNIQUE_SAVEPOINT_CHANGE_COLUMN_COMMENT   "cHANGEcOLUMNcOMMENT"
 
#define UNIQUE_SAVEPOINT_CREATE_USER_ENTITY   "cREATEuSEReNTITY"
 
#define UNIQUE_SAVEPOINT_DROP_USER_ENTITY   "dROPuSEReNTITY"
 
#define UNIQUE_SAVEPOINT_ALTER_USER_ENTITY   "aLTERuSEReNTITY"
 
#define UNIQUE_SAVEPOINT_GRANT_USER   "gRANTuSER"
 
#define UNIQUE_SAVEPOINT_REVOKE_USER   "rEVOKEuSER"
 
#define QUERY_MAX_SIZE   1024 * 1024
 
#define MAX_FILTER_PREDICATE_STRING_LENGTH   255
 
#define IS_NAME(n)   ((n)->node_type == PT_NAME)
 
#define IS_STRING(n)
 
#define GET_NAME(n)   ((char *) (n)->info.name.original)
 
#define GET_STRING(n)   ((char *) (n)->info.value.data_value.str->bytes)
 

Typedefs

typedef struct sm_attr_properties_chg SM_ATTR_PROP_CHG
 
typedef struct sm_partition_alter_info SM_PARTITION_ALTER_INFO
 
typedef struct part_class_info PART_CLASS_INFO
 
typedef struct db_value_slist DB_VALUE_SLIST
 

Enumerations

enum  DO_INDEX { DO_INDEX_CREATE, DO_INDEX_DROP }
 
enum  SM_ATTR_CHG_SOL { SM_ATTR_CHG_NOT_NEEDED = 0, SM_ATTR_CHG_ONLY_SCHEMA = 1, SM_ATTR_CHG_WITH_ROW_UPDATE = 2, SM_ATTR_CHG_BEST_EFFORT = 3 }
 
enum  {
  ATT_CHG_PROPERTY_PRESENT_OLD = 0x1, ATT_CHG_PROPERTY_PRESENT_NEW = 0x2, ATT_CHG_PROPERTY_LOST = 0x4, ATT_CHG_PROPERTY_GAINED = 0x8,
  ATT_CHG_PROPERTY_UNCHANGED = 0x10, ATT_CHG_PROPERTY_DIFF = 0x20, ATT_CHG_TYPE_PREC_INCR = 0x100, ATT_CHG_TYPE_SET_CLS_COMPAT = 0x200,
  ATT_CHG_TYPE_UPGRADE = 0x400, ATT_CHG_TYPE_NEED_ROW_CHECK = 0x800, ATT_CHG_TYPE_PSEUDO_UPGRADE = 0x1000, ATT_CHG_TYPE_NOT_SUPPORTED_WITH_CFG = 0x2000,
  ATT_CHG_TYPE_NOT_SUPPORTED = 0x4000, ATT_CHG_PROPERTY_NOT_CHECKED = 0x10000
}
 
enum  {
  P_NAME = 0, P_NOT_NULL, P_DEFAULT_VALUE, P_ON_UPDATE_EXPR,
  P_CONSTR_CHECK, P_DEFFERABLE, P_ORDER, P_AUTO_INCR,
  P_CONSTR_FK, P_S_CONSTR_PK, P_M_CONSTR_PK, P_S_CONSTR_UNI,
  P_M_CONSTR_UNI, P_CONSTR_NON_UNI, P_PREFIX_INDEX, P_TYPE,
  P_IS_PARTITION_COL, P_COMMENT, NUM_ATT_CHG_PROP
}
 

Functions

static int drop_class_name (const char *name, bool is_cascade_constraints)
 
static int do_alter_one_clause_with_template (PARSER_CONTEXT *parser, PT_NODE *alter)
 
static int do_alter_clause_rename_entity (PARSER_CONTEXT *const parser, PT_NODE *const alter)
 
static int do_alter_clause_add_index (PARSER_CONTEXT *const parser, PT_NODE *const alter)
 
static int do_alter_clause_drop_index (PARSER_CONTEXT *const parser, PT_NODE *const alter)
 
static int do_alter_change_auto_increment (PARSER_CONTEXT *const parser, PT_NODE *const alter)
 
static int do_rename_internal (const char *const old_name, const char *const new_name)
 
static DB_CONSTRAINT_TYPE get_reverse_unique_index_type (const bool is_reverse, const bool is_unique)
 
static int create_or_drop_index_helper (PARSER_CONTEXT *parser, const char *const constraint_name, const bool is_reverse, const bool is_unique, PT_NODE *spec, PT_NODE *column_names, PT_NODE *column_prefix_length, PT_NODE *filter_predicate, int func_index_pos, int func_index_args_count, PT_NODE *function_expr, PT_NODE *comment, DB_OBJECT *const obj, SM_INDEX_STATUS index_status, DO_INDEX do_index)
 
static int update_locksets_for_multiple_rename (const char *class_name, int *num_mops, MOP *mop_set, int *num_names, char **name_set, bool error_on_misssing_class)
 
static int acquire_locks_for_multiple_rename (const PT_NODE *statement)
 
static int validate_attribute_domain (PARSER_CONTEXT *parser, PT_NODE *attribute, const bool check_zero_precision)
 
static SM_FOREIGN_KEY_ACTION map_pt_to_sm_action (const PT_MISC_TYPE action)
 
static int add_foreign_key (DB_CTMPL *ctemplate, const PT_NODE *cnstr, const char **att_names)
 
static int add_union_query (PARSER_CONTEXT *parser, DB_CTMPL *ctemplate, const PT_NODE *query)
 
static int add_query_to_virtual_class (PARSER_CONTEXT *parser, DB_CTMPL *ctemplate, const PT_NODE *queries)
 
static int do_copy_indexes (PARSER_CONTEXT *parser, MOP classmop, SM_CLASS *src_class)
 
static int do_recreate_renamed_class_indexes (const PARSER_CONTEXT *parser, const char *const old_class_name, const char *const class_name)
 
static int do_alter_clause_change_attribute (PARSER_CONTEXT *const parser, PT_NODE *const alter)
 
static int do_alter_change_owner (PARSER_CONTEXT *const parser, PT_NODE *const alter)
 
static int do_alter_change_default_cs_coll (PARSER_CONTEXT *const parser, PT_NODE *const alter)
 
static int do_alter_change_tbl_comment (PARSER_CONTEXT *const parser, PT_NODE *const alter)
 
static int do_alter_change_col_comment (PARSER_CONTEXT *const parser, PT_NODE *const alter)
 
static int do_change_att_schema_only (PARSER_CONTEXT *parser, DB_CTMPL *ctemplate, PT_NODE *attribute, PT_NODE *old_name_node, PT_NODE *constraints, SM_ATTR_PROP_CHG *attr_chg_prop, SM_ATTR_CHG_SOL *change_mode)
 
static int build_attr_change_map (PARSER_CONTEXT *parser, DB_CTMPL *ctemplate, PT_NODE *attr_def, PT_NODE *attr_old_name, PT_NODE *constraints, SM_ATTR_PROP_CHG *attr_chg_properties)
 
static int build_att_type_change_map (TP_DOMAIN *curr_domain, TP_DOMAIN *req_domain, SM_ATTR_PROP_CHG *attr_chg_properties)
 
static int build_att_coll_change_map (TP_DOMAIN *curr_domain, TP_DOMAIN *req_domain, SM_ATTR_PROP_CHG *attr_chg_properties)
 
static int check_att_chg_allowed (const char *att_name, const PT_TYPE_ENUM t, const SM_ATTR_PROP_CHG *attr_chg_prop, SM_ATTR_CHG_SOL chg_how, bool log_error_allowed, bool *new_attempt)
 
static bool is_att_property_structure_checked (const SM_ATTR_PROP_CHG *attr_chg_properties)
 
static bool is_att_change_needed (const SM_ATTR_PROP_CHG *attr_chg_properties)
 
static void reset_att_property_structure (SM_ATTR_PROP_CHG *attr_chg_properties)
 
static bool is_att_prop_set (const int prop, const int value)
 
static int get_att_order_from_def (PT_NODE *attribute, bool *ord_first, const char **ord_after_name)
 
static int check_default_on_update_clause (PARSER_CONTEXT *parser, PT_NODE *attribute)
 
static int get_att_default_from_def (PARSER_CONTEXT *parser, PT_NODE *attribute, DB_VALUE **default_value, const char *classname)
 
static int do_update_new_notnull_cols_without_default (PARSER_CONTEXT *parser, PT_NODE *alter, MOP class_mop)
 
static int do_update_new_cols_with_default_expression (PARSER_CONTEXT *parser, PT_NODE *alter, MOP class_mop)
 
static int do_run_update_query_for_new_notnull_fields (PARSER_CONTEXT *parser, PT_NODE *alter, PT_NODE *attr_list, int attr_count, MOP class_mop)
 
static bool is_attribute_primary_key (const char *class_name, const char *attr_name)
 
static const char * get_hard_default_for_type (PT_TYPE_ENUM type)
 
static int do_run_upgrade_instances_domain (PARSER_CONTEXT *parser, OID *p_class_oid, int att_id)
 
static int do_drop_att_constraints (MOP class_mop, SM_CONSTRAINT_INFO *constr_info_list)
 
static int do_recreate_att_constraints (MOP class_mop, SM_CONSTRAINT_INFO *constr_info_list)
 
static int check_change_attribute (PARSER_CONTEXT *parser, DB_CTMPL *ctemplate, PT_NODE *attribute, PT_NODE *old_name_node, PT_NODE **pointer_constraints, SM_ATTR_PROP_CHG *attr_chg_prop, SM_ATTR_CHG_SOL *change_mode)
 
static int check_change_class_collation (PARSER_CONTEXT *parser, DB_CTMPL *ctemplate, PT_ALTER_INFO *alter, bool *need_update, int *collation_id)
 
static int sort_constr_info_list (SM_CONSTRAINT_INFO **source)
 
static int save_constraint_info_from_pt_node (SM_CONSTRAINT_INFO **save_info, const PT_NODE *const pt_constr)
 
static int do_run_update_query_for_class (char *query, MOP class_mop, int *row_count)
 
static SM_FUNCTION_INFOpt_node_to_function_index (PARSER_CONTEXT *parser, PT_NODE *spec, PT_NODE *sort_spec, DO_INDEX do_index)
 
static int do_create_partition_constraints (PARSER_CONTEXT *parser, PT_NODE *alter, SM_PARTITION_ALTER_INFO *pinfo)
 
static int do_create_partition_constraint (PT_NODE *alter, SM_CLASS *root_class, SM_CLASS_CONSTRAINT *constraint, SM_PARTITION_ALTER_INFO *pinfo)
 
static int do_alter_partitioning_pre (PARSER_CONTEXT *parser, PT_NODE *alter, SM_PARTITION_ALTER_INFO *pinfo)
 
static int do_alter_partitioning_post (PARSER_CONTEXT *parser, PT_NODE *alter, SM_PARTITION_ALTER_INFO *pinfo)
 
static int do_create_partition (PARSER_CONTEXT *parser, PT_NODE *alter, SM_PARTITION_ALTER_INFO *pinfo)
 
static int do_remove_partition_pre (PARSER_CONTEXT *parser, PT_NODE *alter, SM_PARTITION_ALTER_INFO *pinfo)
 
static int do_remove_partition_post (PARSER_CONTEXT *parser, PT_NODE *alter, SM_PARTITION_ALTER_INFO *pinfo)
 
static int do_coalesce_partition_pre (PARSER_CONTEXT *parser, PT_NODE *alter, SM_PARTITION_ALTER_INFO *pinfo)
 
static int do_coalesce_partition_post (PARSER_CONTEXT *parser, PT_NODE *alter, SM_PARTITION_ALTER_INFO *pinfo)
 
static int do_reorganize_partition_pre (PARSER_CONTEXT *parser, PT_NODE *alter, SM_PARTITION_ALTER_INFO *pinfo)
 
static int do_reorganize_partition_post (PARSER_CONTEXT *parser, PT_NODE *alter, SM_PARTITION_ALTER_INFO *pinfo)
 
static int do_promote_partition_list (PARSER_CONTEXT *parser, PT_NODE *alter, SM_PARTITION_ALTER_INFO *pinfo)
 
static int do_promote_partition_by_name (const char *class_name, const char *part_num, char **partition_name)
 
static int do_promote_partition (SM_CLASS *class_)
 
static int do_redistribute_partitions_data (const char *class_name, const char *keyname, char **promoted, int promoted_count, PT_ALTER_CODE alter_op, bool should_update, bool should_insert)
 
static SM_FUNCTION_INFOcompile_partition_expression (PARSER_CONTEXT *parser, PT_NODE *entity_name, PT_NODE *pinfo)
 
static PT_NODEreplace_names_alter_chg_attr (PARSER_CONTEXT *parser, PT_NODE *node, void *void_arg, int *continue_walk)
 
static PT_NODEpt_replace_names_index_expr (PARSER_CONTEXT *parser, PT_NODE *node, void *void_arg, int *continue_walk)
 
static int adjust_partition_range (DB_OBJLIST *objs)
 
static int adjust_partition_size (MOP class_, DB_CTMPL *tmpl)
 
static const char * get_attr_name (PT_NODE *attribute)
 
static int do_add_attribute (PARSER_CONTEXT *parser, DB_CTMPL *ctemplate, PT_NODE *atts, PT_NODE *constraints, bool error_on_not_normal)
 
static int do_add_attribute_from_select_column (PARSER_CONTEXT *parser, DB_CTMPL *ctemplate, DB_QUERY_TYPE *column)
 
static DB_QUERY_TYPEquery_get_column_with_name (DB_QUERY_TYPE *query_columns, const char *name)
 
static PT_NODEget_attribute_with_name (PT_NODE *atts, const char *name)
 
static PT_NODEcreate_select_to_insert_into (PARSER_CONTEXT *parser, const char *class_name, PT_NODE *create_select, PT_CREATE_SELECT_ACTION create_select_action, DB_QUERY_TYPE *query_columns)
 
static int execute_create_select_query (PARSER_CONTEXT *parser, const char *const class_name, PT_NODE *create_select, PT_CREATE_SELECT_ACTION create_select_action, DB_QUERY_TYPE *query_columns, PT_NODE *flagged_statement)
 
static int do_find_auto_increment_serial (MOP *auto_increment_obj, const char *class_name, const char *attr_name)
 
static int do_check_fk_constraints_internal (DB_CTMPL *ctemplate, PT_NODE *constraints, bool is_partitioned)
 
static int get_index_type_qualifiers (MOP obj, bool *is_reverse, bool *is_unique, const char *index_name)
 
static SM_PARTITIONpt_node_to_partition_info (PARSER_CONTEXT *parser, PT_NODE *node, PT_NODE *entity_name, char *class_name, char *partition_name, DB_VALUE *minval)
 
static int do_save_all_indexes (MOP classmop, SM_CONSTRAINT_INFO **saved_index_info_listpp)
 
static int do_drop_saved_indexes (MOP classmop, SM_CONSTRAINT_INFO *index_save_info)
 
static int do_recreate_saved_indexes (MOP classmop, SM_CONSTRAINT_INFO *index_save_info)
 
static int do_alter_index_status (PARSER_CONTEXT *parser, const PT_NODE *statement)
 
int do_alter (PARSER_CONTEXT *parser, PT_NODE *alter)
 
int do_grant (const PARSER_CONTEXT *parser, const PT_NODE *statement)
 
int do_revoke (const PARSER_CONTEXT *parser, const PT_NODE *statement)
 
int do_create_user (const PARSER_CONTEXT *parser, const PT_NODE *statement)
 
int do_drop_user (const PARSER_CONTEXT *parser, const PT_NODE *statement)
 
int do_alter_user (const PARSER_CONTEXT *parser, const PT_NODE *statement)
 
int do_drop (PARSER_CONTEXT *parser, PT_NODE *statement)
 
int do_rename (const PARSER_CONTEXT *parser, const PT_NODE *statement)
 
int do_create_index (PARSER_CONTEXT *parser, const PT_NODE *statement)
 
int do_drop_index (PARSER_CONTEXT *parser, const PT_NODE *statement)
 
static int do_alter_index_rebuild (PARSER_CONTEXT *parser, const PT_NODE *statement)
 
static int do_alter_index_comment (PARSER_CONTEXT *parser, const PT_NODE *statement)
 
int do_alter_index (PARSER_CONTEXT *parser, const PT_NODE *statement)
 
int do_check_partitioned_class (DB_OBJECT *classop, int check_map, char *keyattr)
 
int do_get_partition_parent (DB_OBJECT *const classop, MOP *const parentop)
 
int do_is_partitioned_subclass (int *is_partitioned, const char *classname, char *keyattr)
 
int do_drop_partitioned_class (MOP class_, int drop_sub_flag, bool is_cascade_constraints)
 
int do_rename_partition (MOP old_class, const char *newname)
 
int do_get_partition_size (MOP class_)
 
int do_get_partition_keycol (char *keycol, MOP class_)
 
int do_drop_partition_list (MOP class_, PT_NODE *name_list, DB_CTMPL *tmpl)
 
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_supers (const PARSER_CONTEXT *parser, DB_CTMPL *ctemplate, const PT_NODE *supers)
 
int do_add_resolutions (const PARSER_CONTEXT *parser, DB_CTMPL *ctemplate, const PT_NODE *resolution)
 
int do_add_queries (PARSER_CONTEXT *parser, DB_CTMPL *ctemplate, const PT_NODE *queries)
 
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)
 
static int truncate_class_name (const char *name)
 
int do_truncate (PARSER_CONTEXT *parser, PT_NODE *statement)
 
static int do_run_update_query_for_new_default_expression_fields (PARSER_CONTEXT *parser, PT_NODE *alter, PT_NODE *attr_list, int attr_count, MOP class_mop)
 
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)
 
int ib_get_thread_count ()
 

Variables

int ib_thread_count = 0
 

Macro Definition Documentation

#define GET_NAME (   n)    ((char *) (n)->info.name.original)

Definition at line 1737 of file execute_schema.c.

Referenced by do_alter_user(), do_create_user(), and do_drop_user().

#define GET_STRING (   n)    ((char *) (n)->info.value.data_value.str->bytes)

Definition at line 1738 of file execute_schema.c.

Referenced by do_alter_user(), and do_create_user().

#define IS_NAME (   n)    ((n)->node_type == PT_NAME)

Definition at line 1731 of file execute_schema.c.

Referenced by do_alter_user(), do_create_user(), and do_drop_user().

#define IS_STRING (   n)
Value:
((n)->node_type == PT_VALUE && \
((n)->type_enum == PT_TYPE_VARCHAR || \
(n)->type_enum == PT_TYPE_CHAR || \
(n)->type_enum == PT_TYPE_VARNCHAR || \
(n)->type_enum == PT_TYPE_NCHAR))

Definition at line 1732 of file execute_schema.c.

Referenced by do_alter_user(), and do_create_user().

#define MAX_FILTER_PREDICATE_STRING_LENGTH   255
#define QUERY_MAX_SIZE   1024 * 1024
#define UNIQUE_SAVEPOINT_ADD_ATTR_MTHD   "aDDaTTRmTHD"

Definition at line 66 of file execute_schema.c.

Referenced by do_alter_one_clause_with_template().

#define UNIQUE_SAVEPOINT_ALTER_INDEX   "aLTERiNDEX"
#define UNIQUE_SAVEPOINT_ALTER_USER_ENTITY   "aLTERuSEReNTITY"

Definition at line 80 of file execute_schema.c.

Referenced by do_alter_user().

#define UNIQUE_SAVEPOINT_CHANGE_ATTR   "cHANGEaTTR"
#define UNIQUE_SAVEPOINT_CHANGE_COLUMN_COMMENT   "cHANGEcOLUMNcOMMENT"

Definition at line 77 of file execute_schema.c.

Referenced by do_alter_change_col_comment().

#define UNIQUE_SAVEPOINT_CHANGE_DEF_COLL   "cHANGEdEFAULTcOLL"

Definition at line 75 of file execute_schema.c.

Referenced by do_alter_change_default_cs_coll().

#define UNIQUE_SAVEPOINT_CHANGE_TBL_COMMENT   "cHANGEtBLcOMMENT"

Definition at line 76 of file execute_schema.c.

Referenced by do_alter_change_tbl_comment().

#define UNIQUE_SAVEPOINT_CREATE_ENTITY   "cREATEeNTITY"

Definition at line 67 of file execute_schema.c.

Referenced by do_create_entity().

#define UNIQUE_SAVEPOINT_CREATE_USER_ENTITY   "cREATEuSEReNTITY"

Definition at line 78 of file execute_schema.c.

Referenced by do_create_user().

#define UNIQUE_SAVEPOINT_DROP_ENTITY   "dROPeNTITY"

Definition at line 68 of file execute_schema.c.

Referenced by do_drop().

#define UNIQUE_SAVEPOINT_DROP_USER_ENTITY   "dROPuSEReNTITY"

Definition at line 79 of file execute_schema.c.

Referenced by do_drop_user().

#define UNIQUE_SAVEPOINT_GRANT_USER   "gRANTuSER"

Definition at line 81 of file execute_schema.c.

Referenced by do_grant().

#define UNIQUE_SAVEPOINT_MULTIPLE_ALTER   "mULTIPLEaLTER"

Definition at line 71 of file execute_schema.c.

Referenced by do_alter().

#define UNIQUE_SAVEPOINT_RENAME   "rENAME"

Definition at line 70 of file execute_schema.c.

Referenced by do_rename().

#define UNIQUE_SAVEPOINT_REPLACE_VIEW   "rEPlACE"

Definition at line 69 of file execute_schema.c.

Referenced by do_create_entity().

#define UNIQUE_SAVEPOINT_REVOKE_USER   "rEVOKEuSER"

Definition at line 82 of file execute_schema.c.

Referenced by do_revoke().

#define UNIQUE_SAVEPOINT_TRUNCATE   "tRUnCATE"

Definition at line 72 of file execute_schema.c.

Referenced by do_truncate().

Typedef Documentation

Definition at line 216 of file execute_schema.c.

Definition at line 204 of file execute_schema.c.

Definition at line 176 of file execute_schema.c.

Definition at line 191 of file execute_schema.c.

Enumeration Type Documentation

anonymous enum
Enumerator
ATT_CHG_PROPERTY_PRESENT_OLD 
ATT_CHG_PROPERTY_PRESENT_NEW 
ATT_CHG_PROPERTY_LOST 
ATT_CHG_PROPERTY_GAINED 
ATT_CHG_PROPERTY_UNCHANGED 
ATT_CHG_PROPERTY_DIFF 
ATT_CHG_TYPE_PREC_INCR 
ATT_CHG_TYPE_SET_CLS_COMPAT 
ATT_CHG_TYPE_UPGRADE 
ATT_CHG_TYPE_NEED_ROW_CHECK 
ATT_CHG_TYPE_PSEUDO_UPGRADE 
ATT_CHG_TYPE_NOT_SUPPORTED_WITH_CFG 
ATT_CHG_TYPE_NOT_SUPPORTED 
ATT_CHG_PROPERTY_NOT_CHECKED 

Definition at line 111 of file execute_schema.c.

anonymous enum
Enumerator
P_NAME 
P_NOT_NULL 
P_DEFAULT_VALUE 
P_ON_UPDATE_EXPR 
P_CONSTR_CHECK 
P_DEFFERABLE 
P_ORDER 
P_AUTO_INCR 
P_CONSTR_FK 
P_S_CONSTR_PK 
P_M_CONSTR_PK 
P_S_CONSTR_UNI 
P_M_CONSTR_UNI 
P_CONSTR_NON_UNI 
P_PREFIX_INDEX 
P_TYPE 
P_IS_PARTITION_COL 
P_COMMENT 
NUM_ATT_CHG_PROP 

Definition at line 146 of file execute_schema.c.

enum DO_INDEX
Enumerator
DO_INDEX_CREATE 
DO_INDEX_DROP 

Definition at line 87 of file execute_schema.c.

Enumerator
SM_ATTR_CHG_NOT_NEEDED 
SM_ATTR_CHG_ONLY_SCHEMA 
SM_ATTR_CHG_WITH_ROW_UPDATE 
SM_ATTR_CHG_BEST_EFFORT 

Definition at line 92 of file execute_schema.c.

Function Documentation

static int add_query_to_virtual_class ( PARSER_CONTEXT parser,
DB_CTMPL ctemplate,
const PT_NODE queries 
)
static

Definition at line 8179 of file execute_schema.c.

References parser_context::custom_print, dbt_add_query_spec(), error(), NO_ERROR, parser_print_tree_with_quotes(), and PT_CHARSET_COLLATE_FULL.

Referenced by add_union_query().

Here is the caller graph for this function:

static int build_attr_change_map ( PARSER_CONTEXT parser,
DB_CTMPL ctemplate,
PT_NODE attr_def,
PT_NODE attr_old_name,
PT_NODE constraints,
SM_ATTR_PROP_CHG attr_chg_properties 
)
static

Definition at line 10671 of file execute_schema.c.

References ARG_FILE_LINE, assert, ATT_CHG_PROPERTY_DIFF, ATT_CHG_PROPERTY_GAINED, ATT_CHG_PROPERTY_LOST, ATT_CHG_PROPERTY_PRESENT_NEW, ATT_CHG_PROPERTY_PRESENT_OLD, ATT_CHG_PROPERTY_UNCHANGED, ATT_CHG_TYPE_NEED_ROW_CHECK, ATT_CHG_TYPE_NOT_SUPPORTED, ATT_CHG_TYPE_NOT_SUPPORTED_WITH_CFG, ATT_CHG_TYPE_PREC_INCR, ATT_CHG_TYPE_SET_CLS_COMPAT, ATT_CHG_TYPE_UPGRADE, sm_constraint_info::att_names, pt_statement_info::attr_def, pt_attr_def_info::attr_type, sm_class_constraint::attributes, pt_foreign_key_info::attrs, sm_class_constraint::attrs_prefix_length, pt_attr_def_info::auto_increment, pt_statement_info::auto_increment, build_att_coll_change_map(), build_att_type_change_map(), pt_attr_def_info::comment, sm_attr_properties_chg::constr_info, pt_statement_info::constraint, sm_class::constraints, sm_template::current, pt_attr_def_info::data_default, pt_statement_info::data_default, pt_value_info::data_value, DB_DEFAULT_NONE, DB_IS_NULL, DB_MAX_IDENTIFIER_LENGTH, DB_TYPE_NUMERIC, sm_default_value::default_expr, db_default_expr::default_expr_type, sm_attribute::default_value, do_get_partition_keycol(), sm_attribute::domain, er_errid(), ER_ERROR_SEVERITY, ER_OBJ_TEMPLATE_INTERNAL, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), sm_class_constraint::fk_info, sm_attribute::flags, pt_constraint_info::foreign_key, free_and_init, get_attr_name(), sm_attribute::header, i, ID_ATTRIBUTE, ID_CLASS_ATTRIBUTE, ID_SHARED_ATTRIBUTE, parser_node::info, intl_identifier_casecmp(), is_att_prop_set(), sm_foreign_key_info::name, sm_template::name, pt_statement_info::name, sm_attr_properties_chg::name_space, sm_component::name_space, sm_attr_properties_chg::new_constr_info, sm_attr_properties_chg::new_name_space, sm_constraint_info::next, sm_class_constraint::next, parser_node::next, NO_ERROR, parser_node::node_type, pt_constraint_info::not_null, NULL, NUM_ATT_CHG_PROP, pt_attr_def_info::on_update, sm_attribute::on_update_default_expr, sm_template::op, pt_attr_def_info::ordering_info, pt_name_info::original, sm_default_value::original_value, sm_attr_properties_chg::p, P_AUTO_INCR, P_COMMENT, P_CONSTR_CHECK, P_CONSTR_FK, P_CONSTR_NON_UNI, P_DEFAULT_VALUE, P_DEFFERABLE, P_IS_PARTITION_COL, P_M_CONSTR_PK, P_M_CONSTR_UNI, P_NAME, P_NOT_NULL, P_ON_UPDATE_EXPR, P_ORDER, P_PREFIX_INDEX, P_S_CONSTR_PK, P_S_CONSTR_UNI, P_TYPE, sm_template::partition, tp_domain::precision, pt_constraint_info::primary_key, prm_get_bool_value(), PRM_ID_ALTER_TABLE_CHANGE_TYPE_STRICT, PT_CONSTRAIN_CHECK, PT_CONSTRAIN_FOREIGN_KEY, PT_CONSTRAIN_NOT_NULL, PT_CONSTRAIN_PRIMARY_KEY, PT_CONSTRAIN_UNIQUE, PT_CONSTRAINT, PT_NAME, pt_node_to_db_domain(), PT_NORMAL, PT_SHARED, PT_VALUE, QSTR_IS_FIXED_LENGTH, save_constraint_info_from_pt_node(), tp_domain::scale, pt_data_default_info::shared, SM_ATTFLAG_AUTO_INCREMENT, SM_ATTFLAG_FOREIGN_KEY, SM_ATTFLAG_INDEX, SM_ATTFLAG_NON_NULL, SM_CONSTRAINT_INDEX, SM_CONSTRAINT_PRIMARY_KEY, SM_CONSTRAINT_REVERSE_INDEX, SM_CONSTRAINT_REVERSE_UNIQUE, SM_CONSTRAINT_UNIQUE, sm_save_constraint_info(), smt_find_attribute(), pt_auto_increment_info::start_val, pt_data_value::str, strdup(), strlen, TP_DOMAIN_COLLATION, tp_domain_compatible(), tp_domain_free(), tp_domain_match(), TP_DOMAIN_TYPE, TP_EXACT_MATCH, TP_IS_CHAR_BIT_TYPE, TP_IS_SET_TYPE, TP_STR_MATCH, tp_domain::type, sm_class_constraint::type, pt_constraint_info::type, pt_constraint_info::un, pt_constraint_info::unique, sm_default_value::value, and pt_statement_info::value.

Referenced by check_change_attribute().

Here is the caller graph for this function:

static int check_att_chg_allowed ( const char *  att_name,
const PT_TYPE_ENUM  t,
const SM_ATTR_PROP_CHG attr_chg_prop,
SM_ATTR_CHG_SOL  chg_how,
bool  log_error_allowed,
bool new_attempt 
)
static

Definition at line 12224 of file execute_schema.c.

References ARG_FILE_LINE, assert, ATT_CHG_PROPERTY_DIFF, ATT_CHG_PROPERTY_GAINED, ATT_CHG_PROPERTY_PRESENT_NEW, ATT_CHG_PROPERTY_PRESENT_OLD, ATT_CHG_PROPERTY_UNCHANGED, ATT_CHG_TYPE_NEED_ROW_CHECK, ATT_CHG_TYPE_NOT_SUPPORTED, ATT_CHG_TYPE_NOT_SUPPORTED_WITH_CFG, ATT_CHG_TYPE_PREC_INCR, ATT_CHG_TYPE_PSEUDO_UPGRADE, ATT_CHG_TYPE_SET_CLS_COMPAT, ATT_CHG_TYPE_UPGRADE, sm_attr_properties_chg::class_has_subclass, ER_ALTER_CHANGE_ATTR_TO_FROM_SHARED_NOT_ALLOWED, ER_ALTER_CHANGE_CLASS_HIERARCHY, ER_ALTER_CHANGE_FK, ER_ALTER_CHANGE_HARD_DEFAULT_NOT_EXIST, ER_ALTER_CHANGE_MULTIPLE_PK, ER_ALTER_CHANGE_PARTITIONS, ER_ALTER_CHANGE_TYPE_NEED_ROW_CHECK, ER_ALTER_CHANGE_TYPE_NOT_SUPP, ER_ALTER_CHANGE_TYPE_UPGRADE_CFG, ER_ALTER_CHANGE_TYPE_WITH_AUTO_INCR, ER_ALTER_CHANGE_TYPE_WITH_INDEX, ER_ERROR_SEVERITY, er_set(), ER_SM_INVALID_CONSTRAINT, ER_SM_NOT_NULL_NOT_ALLOWED, error(), get_hard_default_for_type(), ID_ATTRIBUTE, ID_CLASS_ATTRIBUTE, ID_SHARED_ATTRIBUTE, is_att_prop_set(), sm_attr_properties_chg::name_space, sm_attr_properties_chg::new_name_space, NO_ERROR, NULL, sm_attr_properties_chg::p, P_AUTO_INCR, P_CONSTR_CHECK, P_CONSTR_FK, P_CONSTR_NON_UNI, P_DEFFERABLE, P_IS_PARTITION_COL, P_M_CONSTR_PK, P_M_CONSTR_UNI, P_NAME, P_NOT_NULL, P_ORDER, P_S_CONSTR_PK, P_S_CONSTR_UNI, P_TYPE, prm_get_bool_value(), PRM_ID_ALTER_TABLE_CHANGE_TYPE_STRICT, pt_show_type_enum(), PT_TYPE_BLOB, PT_TYPE_CLOB, SM_ATTR_CHG_BEST_EFFORT, SM_ATTR_CHG_ONLY_SCHEMA, and SM_ATTR_CHG_WITH_ROW_UPDATE.

Referenced by check_change_attribute().

Here is the caller graph for this function:

static int check_change_attribute ( PARSER_CONTEXT parser,
DB_CTMPL ctemplate,
PT_NODE attribute,
PT_NODE old_name_node,
PT_NODE **  pointer_constraints,
SM_ATTR_PROP_CHG attr_chg_prop,
SM_ATTR_CHG_SOL change_mode 
)
static

Definition at line 13591 of file execute_schema.c.

References ARG_FILE_LINE, assert, ATT_CHG_PROPERTY_DIFF, ATT_CHG_PROPERTY_PRESENT_NEW, ATT_CHG_PROPERTY_PRESENT_OLD, pt_statement_info::attr_def, pt_attr_def_info::attr_type, build_attr_change_map(), check_att_chg_allowed(), check_default_on_update_clause(), sm_attr_properties_chg::class_has_subclass, pt_statement_info::constraint, sm_template::current, pt_attr_def_info::data_default, pt_statement_info::data_default, DB_DEFAULT_NONE, DB_IS_NULL, db_make_null(), db_value_clear(), pt_data_default_info::default_expr_type, ER_ALTER_CHANGE_WARN_NO_CHANGE, ER_CANNOT_HAVE_NOTNULL_DEFAULT_NULL, ER_CANNOT_HAVE_PK_DEFAULT_NULL, ER_ERROR_SEVERITY, er_set(), ER_SM_INVALID_INDEX_TYPE, ER_UNEXPECTED, ER_WARNING_SEVERITY, error(), get_att_default_from_def(), get_attr_name(), ID_ATTRIBUTE, ID_CLASS_ATTRIBUTE, ID_NULL, ID_SHARED_ATTRIBUTE, parser_node::info, is_att_change_needed(), is_att_prop_set(), is_att_property_structure_checked(), pt_statement_info::name, sm_attr_properties_chg::name_space, parser_node::next, NO_ERROR, parser_node::node_type, NULL, pt_name_info::original, sm_attr_properties_chg::p, P_CONSTR_NON_UNI, P_M_CONSTR_PK, P_M_CONSTR_UNI, P_NAME, P_S_CONSTR_PK, P_S_CONSTR_UNI, parser_free_node(), sm_template::partition, PT_ATTR_DEF, PT_CONSTRAIN_NOT_NULL, PT_CONSTRAIN_PRIMARY_KEY, PT_META_ATTR, PT_NAME, PT_SHARED, pt_type_enum_to_db(), pt_type_enum_to_db_domain_name(), SM_ATTR_CHG_BEST_EFFORT, SM_ATTR_CHG_NOT_NEEDED, SM_ATTR_CHG_ONLY_SCHEMA, SM_ATTR_CHG_WITH_ROW_UPDATE, tp_valid_indextype(), pt_constraint_info::type, parser_node::type_enum, and sm_class::users.

Referenced by do_alter_clause_change_attribute().

Here is the caller graph for this function:

static int check_change_class_collation ( PARSER_CONTEXT parser,
DB_CTMPL ctemplate,
PT_ALTER_INFO alter,
bool need_update,
int *  collation_id 
)
static
static int create_or_drop_index_helper ( PARSER_CONTEXT parser,
const char *const  constraint_name,
const bool  is_reverse,
const bool  is_unique,
PT_NODE spec,
PT_NODE column_names,
PT_NODE column_prefix_length,
PT_NODE filter_predicate,
int  func_index_pos,
int  func_index_args_count,
PT_NODE function_expr,
PT_NODE comment,
DB_OBJECT *const  obj,
SM_INDEX_STATUS  index_status,
DO_INDEX  do_index 
)
static

Definition at line 2699 of file execute_schema.c.

References ARG_FILE_LINE, pt_sort_spec_info::asc_or_desc, assert, sm_predicate_info::att_ids, sm_function_info::attr_index_start, pred_expr_with_context::attrids_pred, parser_varchar::bytes, sm_function_info::col_id, COMPAT_MYSQL, parser_context::custom_print, pt_value_info::data_value, DB_CONSTRAINT_INDEX, DB_CONSTRAINT_NONE, DB_NOT_PARTITIONED_CLASS, DB_PARTITION_CLASS, db_ws_free(), DO_INDEX_CREATE, DO_INDEX_DROP, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_NOT_ALLOWED_ACCESS_TO_PARTITION, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), ER_SM_INDEX_PREFIX_LENGTH_ON_UNIQUE_FOREIGN, ER_SM_INVALID_FILTER_PREDICATE_LENGTH, error(), pt_sort_spec_info::expr, pt_statement_info::expr, free_and_init, get_reverse_unique_index_type(), i, pt_data_value::i, if(), 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, sm_predicate_info::pred_stream, sm_predicate_info::pred_stream_size, sm_predicate_info::pred_string, prm_get_integer_value(), PRM_ID_COMPAT_MODE, PT_ASC, PT_CHARSET_COLLATE_FULL, pt_enter_packing_buf(), PT_ERRORm, PT_ERRORmf, pt_exit_packing_buf(), pt_length_of_list(), pt_node_to_function_index(), pt_print_bytes(), pt_to_pred_with_context(), PT_VALUE, PT_VALUE_GET_BYTES, sm_add_constraint(), sm_att_fk_constrained(), sm_att_unique_constrained(), sm_drop_constraint(), sm_free_function_index_info(), sm_get_ch_name(), SM_NO_INDEX, sm_partitioned_class_type(), sm_produce_constraint_name(), pt_statement_info::sort_spec, strlen, pt_statement_info::value, and xts_map_filter_pred_to_stream().

Referenced by do_alter_clause_drop_index(), do_create_index(), and do_drop_index().

Here is the caller graph for this function:

static int do_add_attribute ( PARSER_CONTEXT parser,
DB_CTMPL ctemplate,
PT_NODE atts,
PT_NODE constraints,
bool  error_on_not_normal 
)
static

Definition at line 6998 of file execute_schema.c.

References ARG_FILE_LINE, assert, pt_statement_info::attr_def, pt_attr_def_info::attr_type, sm_attribute::auto_increment, pt_attr_def_info::auto_increment, check_default_on_update_clause(), sm_class::collation_id, sm_attribute::comment, pt_attr_def_info::comment, pt_attr_def_info::constrain_not_null, pt_statement_info::constraint, sm_template::current, pt_attr_def_info::data_default, pt_value_info::data_value, DB_DEFAULT_NONE, DB_IS_NULL, db_make_null(), db_value_clear(), dbt_constrain_non_null(), default_value, do_create_auto_increment_serial(), ER_CANNOT_HAVE_NOTNULL_DEFAULT_NULL, ER_CANNOT_HAVE_PK_DEFAULT_NULL, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_GENERIC_ERROR, er_set(), ER_SM_ONLY_NORMAL_ATTRIBUTES, error(), ERROR1, sm_attribute::flags, get_att_default_from_def(), get_att_order_from_def(), get_attr_name(), ID_ATTRIBUTE, ID_CLASS_ATTRIBUTE, ID_NULL, ID_SHARED_ATTRIBUTE, parser_node::info, intl_identifier_casecmp(), sm_template::name, pt_statement_info::name, sm_attr_properties_chg::name_space, parser_node::next, NO_ERROR, parser_node::node_type, NULL, pt_attr_def_info::on_update, pt_name_info::original, pt_constraint_info::primary_key, pt_attr_check_default_cs_coll(), PT_ATTR_DEF, PT_CONSTRAIN_PRIMARY_KEY, pt_get_default_expression_from_data_default_node(), pt_get_varchar_bytes(), PT_HAS_COLLATION, PT_META_ATTR, pt_node_to_db_domain(), PT_NORMAL, PT_SHARED, PT_VALUE, SM_ATTFLAG_AUTO_INCREMENT, SM_CLASS_CT, smt_add_attribute_w_dflt_w_order(), smt_find_attribute(), smt_get_class_type(), pt_data_value::str, pt_constraint_info::type, parser_node::type_enum, pt_constraint_info::un, validate_attribute_domain(), pt_statement_info::value, and ws_copy_string().

Referenced by do_add_attributes().

Here is the caller graph for this function:

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 
)
static int do_alter_clause_add_index ( PARSER_CONTEXT *const  parser,
PT_NODE *const  alter 
)
static
static int do_alter_clause_change_attribute ( PARSER_CONTEXT *const  parser,
PT_NODE *const  alter 
)
static

Definition at line 9457 of file execute_schema.c.

References pt_statement_info::alter, pt_alter_info::alter_clause, ARG_FILE_LINE, sm_constraint_info::asc_desc, assert, ATT_CHG_TYPE_PREC_INCR, sm_attr_properties_chg::att_id, sm_constraint_info::att_names, pt_alter_info::attr_mthd, check_change_attribute(), db_value_slist::class_obj, pt_alter_info::code, parser_node::column_number, sm_constraint_info::comment, sm_attr_properties_chg::constr_info, pt_alter_info::constraint_list, sm_constraint_info::constraint_type, COPY_OID, sm_template::current, db_add_constraint(), db_constrain_non_null(), DB_CONSTRAINT_NOT_NULL, DB_CONSTRAINT_PRIMARY_KEY, DB_CONSTRAINT_UNIQUE, DB_FETCH_WRITE, db_find_class(), db_get_class_name(), dbt_abort_class(), dbt_edit_class(), dbt_finish_class(), do_change_att_schema_only(), do_check_fk_constraints(), do_drop_att_constraints(), do_recreate_att_constraints(), do_recreate_filter_index_constr(), do_recreate_func_index_constr(), do_run_update_query_for_class(), do_run_upgrade_instances_domain(), pt_alter_info::entity_name, ER_ALTER_CHANGE_ADD_NOT_NULL_SET_HARD_DEFAULT, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_LK_UNILATERALLY_ABORTED, er_msg(), ER_OUT_OF_VIRTUAL_MEMORY, er_set(), ER_UNEXPECTED, ER_WARNING_SEVERITY, error(), sm_constraint_info::filter_predicate, free_and_init, sm_constraint_info::func_index_info, get_hard_default_for_type(), pt_alter_info::hint, i, ID_ATTRIBUTE, sm_constraint_info::index_status, parser_node::info, is_att_prop_set(), parser_node::line_number, locator_fetch_class(), locator_flush_class(), sm_constraint_info::name, pt_statement_info::name, sm_attr_properties_chg::name_space, sm_attr_properties_chg::new_constr_info, sm_constraint_info::next, db_objlist::next, NO_ERROR, parser_node::node_type, NULL, vid_oid::oid, db_object::oid_info, OID_ISNULL, OID_SET_NULL, db_objlist::op, sm_template::op, pt_name_info::original, sm_attr_properties_chg::p, P_TYPE, sm_template::partition, sm_constraint_info::prefix_length, prm_get_bool_value(), PRM_ID_ALTER_TABLE_CHANGE_TYPE_STRICT, PT_CHANGE_ATTR, PT_HINT_SKIP_UPDATE_NULL, PT_NAME, pt_record_error(), reset_att_property_structure(), pt_alter_info::resolution_list, sm_add_constraint(), SM_ATTR_CHG_BEST_EFFORT, SM_ATTR_CHG_NOT_NEEDED, SM_ATTR_CHG_ONLY_SCHEMA, SM_ATTR_CHG_WITH_ROW_UPDATE, sm_drop_constraint(), sm_free_constraint_info(), SM_MAX_IDENTIFIER_LENGTH, sort_constr_info_list(), parser_context::statement_number, pt_alter_info::super, tran_abort_upto_system_savepoint(), tran_system_savepoint(), UNIQUE_SAVEPOINT_CHANGE_ATTR, sm_class::users, and ws_list_length().

Referenced by do_alter().

Here is the caller graph for this function:

static int do_alter_index_rebuild ( PARSER_CONTEXT parser,
const PT_NODE statement 
)
static

Definition at line 3069 of file execute_schema.c.

References ARG_FILE_LINE, sm_class_constraint::asc_desc, assert, sm_predicate_info::att_ids, sm_function_info::attr_index_start, sm_class_constraint::attributes, sm_class_constraint::attrs_prefix_length, au_fetch_class(), AU_FETCH_READ, AU_INDEX, AU_SELECT, CHECK_MODIFICATION_ERROR, classobj_find_class_index(), sm_function_info::col_id, pt_index_info::comment, DB_CONSTRAINT_INDEX, db_constraint_type(), db_find_class(), db_ws_alloc(), db_ws_free(), do_rollback(), er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_LK_UNILATERALLY_ABORTED, ER_NOTIFICATION_SEVERITY, ER_OBJ_INVALID_ATTRIBUTE, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), ER_SM_CONSTRAINT_HAS_DIFFERENT_TYPE, ER_SM_NO_INDEX, error(), sm_function_info::expr_str, sm_function_info::expr_stream, sm_function_info::expr_stream_size, sm_function_info::fi_domain, sm_class_constraint::filter_predicate, pt_spec_info::flat_entity_list, free_and_init, sm_class_constraint::func_index_info, get_reverse_unique_index_type(), i, pt_statement_info::index, pt_index_info::index_name, sm_class_constraint::index_status, pt_index_info::indexed_class, parser_node::info, pt_statement_info::name, NO_ERROR, parser_node::node_type, NULL, sm_predicate_info::num_attrs, pt_name_info::original, parser, sm_predicate_info::pred_stream, sm_predicate_info::pred_stream_size, sm_predicate_info::pred_string, pt_exit_packing_buf(), PT_VALUE, PT_VALUE_GET_BYTES, pt_name_info::resolved, pt_index_info::reverse, sm_add_constraint(), sm_drop_constraint(), sm_free_function_index_info(), SM_INDEX_NAME, SM_NORMAL_INDEX, sm_update_class(), smt_change_constraint_comment(), smt_edit_class_mop(), smt_quit(), pt_statement_info::spec, strdup(), strlen, tp_domain_copy(), tran_abort_upto_system_savepoint(), tran_system_savepoint(), pt_index_info::unique, and UNIQUE_SAVEPOINT_ALTER_INDEX.

Referenced by do_alter_index().

Here is the caller graph for this function:

static int do_alter_one_clause_with_template ( PARSER_CONTEXT parser,
PT_NODE alter 
)
static

Definition at line 404 of file execute_schema.c.

References pt_statement_info::alter, pt_alter_info::alter_clause, ARG_FILE_LINE, assert, pt_statement_info::attr_def, pt_alter_info::attr_mthd, pt_resolution_info::attr_mthd_name, pt_attr_def_info::attr_name, pt_attr_def_info::attr_type, parser_varchar::bytes, pt_alter_info::ch_attr_def, classobj_find_class_index(), classobj_find_class_primary_key(), pt_alter_info::code, parser_node::column_number, COMPAT_MYSQL, pt_statement_info::constraint, pt_alter_info::constraint_list, pt_alter_info::create_index, sm_template::current, parser_context::custom_print, pt_attr_def_info::data_default, pt_statement_info::data_default, parser_node::data_type, pt_value_info::data_value, db_attribute_domain(), db_attribute_next(), DB_CONSTRAINT_FOREIGN_KEY, db_constraint_type(), DB_DEFAULT_NONE, db_find_class(), db_get_attribute(), db_get_attributes(), db_get_class_attribute(), db_get_class_method(), db_get_method(), db_get_subclasses(), db_get_superclasses(), DB_IS_NULL, db_make_null(), db_value_clear(), pt_value_info::db_value_is_in_workspace, dbt_abort_class(), dbt_add_set_attribute_domain(), dbt_change_default(), dbt_change_domain(), dbt_change_method_implementation(), dbt_change_query_spec(), dbt_drop_attribute(), dbt_drop_class_attribute(), dbt_drop_class_method(), dbt_drop_constraint(), dbt_drop_method(), dbt_drop_method_file(), dbt_drop_query_spec(), dbt_drop_resolution(), dbt_drop_super(), dbt_edit_class(), dbt_finish_class(), dbt_rename(), dbt_rename_method_file(), dbt_reset_query_spec(), pt_data_default_info::default_expr_type, pt_data_default_info::default_value, do_add_attributes(), do_add_constraints(), do_add_method_files(), do_add_methods(), do_add_queries(), do_add_resolutions(), do_add_supers(), do_alter_change_tbl_comment(), do_alter_partitioning_post(), do_alter_partitioning_pre(), do_check_fk_constraints(), do_update_new_cols_with_default_expression(), do_update_new_notnull_cols_without_default(), pt_alter_info::entity_name, ER_CANNOT_HAVE_NOTNULL_DEFAULT_NULL, ER_DO_ALTER_ADD_WITH_UNIQUE, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_GENERIC_ERROR, ER_INHERIT_FROM_PARTITION_TABLE, ER_INTERFACE_NOT_SUPPORTED_OPERATION, ER_IT_DATA_OVERFLOW, ER_LK_UNILATERALLY_ABORTED, er_msg(), ER_NOTIFICATION_SEVERITY, er_set(), ER_SM_CONSTRAINT_HAS_DIFFERENT_TYPE, ER_SM_CONSTRAINT_NOT_FOUND, ER_SM_FK_MYSQL_DIFFERENT, ER_UNEXPECTED, ER_WARNING_SEVERITY, error(), ERROR1, pt_statement_info::file_path, sm_attribute::flags, free_and_init, sm_attribute::header, HFID_IS_NULL, i, pt_data_value::i, parser_node::info, sm_partition_alter_info::keycol, parser_node::line_number, pt_name_info::meta_class, pt_statement_info::method_def, pt_method_def_info::method_name, MSGCAT_SEMANTIC_CANT_COERCE_TO, MSGCAT_SEMANTIC_OUT_OF_MEMORY, MSGCAT_SEMANTIC_OVERFLOW_COERCING_TO, MSGCAT_SET_PARSER_SEMANTIC, sm_component::name, sm_class_constraint::name, pt_statement_info::name, parser_node::next, NO_ERROR, parser_node::node_type, NULL, pt_resolution_info::of_sup_class_name, pt_name_info::original, sm_attr_properties_chg::p, parser_copy_tree(), parser_free_node(), parser_free_tree(), parser_print_tree_with_quotes(), pr_clear_value(), prm_get_integer_value(), PRM_ID_COMPAT_MODE, sm_partition_alter_info::promoted_count, sm_partition_alter_info::promoted_names, PT_ADD_ATTR_MTHD, PT_ADD_HASHPARTITION, PT_ADD_PARTITION, PT_ADD_QUERY, PT_ADD_SUPCLASS, PT_ALTER_DEFAULT, PT_ANALYZE_PARTITION, PT_APPLY_PARTITION, PT_ATTR_DEF, PT_ATTRIBUTE, PT_CHARSET_COLLATE_FULL, PT_COALESCE_PARTITION, pt_coerce_value(), pt_coerce_value_for_default_value(), PT_CONSTRAIN_UNIQUE, PT_CONSTRAINT_NAME, PT_DATA_DEFAULT, pt_data_type_to_db_domain_name(), pt_db_to_type_enum(), pt_dbval_to_value(), pt_domain_to_data_type(), PT_DROP_ATTR_MTHD, PT_DROP_CONSTRAINT, PT_DROP_FK_CLAUSE, PT_DROP_PARTITION, PT_DROP_PRIMARY_CLAUSE, PT_DROP_QUERY, PT_DROP_RESOLUTION, PT_DROP_SUPCLASS, PT_ERRORm, PT_ERRORmf2, pt_evaluate_tree(), pt_evaluate_tree_having_serial(), PT_FILE_PATH, PT_FILE_RENAME, PT_FUNCTION_RENAME, pt_get_default_expression_from_data_default_node(), pt_has_error, pt_is_set_type, PT_META_ATTR, PT_METHOD, PT_METHOD_DEF, PT_MODIFY_ATTR_MTHD, PT_MODIFY_DEFAULT, PT_MODIFY_QUERY, PT_NAME, pt_node_to_db_domain_name(), PT_PROMOTE_PARTITION, pt_record_error(), PT_REMOVE_PARTITION, PT_RENAME_ATTR_MTHD, PT_RENAME_RESOLUTION, PT_REORG_PARTITION, pt_report_to_ersys(), pt_reset_error(), PT_RESET_QUERY, PT_RESOLUTION, PT_SEMANTIC, pt_semantic_check(), pt_semantic_type(), pt_short_print(), pt_sort_in_desc_order(), PT_TYPE_BLOB, PT_TYPE_CHAR, PT_TYPE_CLOB, PT_TYPE_NCHAR, PT_TYPE_VARCHAR, PT_TYPE_VARNCHAR, PT_VALUE, pt_alter_info::query, pt_alter_info::rename, pt_statement_info::resolution, pt_alter_info::resolution_list, sm_partition_alter_info::root_op, sm_partition_alter_info::root_tmpl, SM_ATTFLAG_NON_NULL, SM_ATTFLAG_PRIMARY_KEY, SM_CONSTRAINT_NAME, SM_CONSTRAINT_PRIMARY_KEY, sm_get_ch_heap(), SM_INDEX_NAME, sm_is_partitioned_class(), smt_set_attribute_default(), parser_context::statement_number, pt_data_value::str, pt_file_path_info::string, pt_alter_info::sup_class_list, pt_alter_info::super, TP_DOMAIN_TYPE, tran_abort_upto_system_savepoint(), tran_system_savepoint(), sm_class_constraint::type, pt_constraint_info::type, parser_node::type_enum, UNIQUE_PARTITION_SAVEPOINT_ALTER, UNIQUE_SAVEPOINT_ADD_ATTR_MTHD, and pt_statement_info::value.

Referenced by do_alter().

Here is the caller graph for this function:

static int do_alter_partitioning_pre ( PARSER_CONTEXT parser,
PT_NODE alter,
SM_PARTITION_ALTER_INFO pinfo 
)
static
static int do_change_att_schema_only ( PARSER_CONTEXT parser,
DB_CTMPL ctemplate,
PT_NODE attribute,
PT_NODE old_name_node,
PT_NODE constraints,
SM_ATTR_PROP_CHG attr_chg_prop,
SM_ATTR_CHG_SOL change_mode 
)
static

Definition at line 10305 of file execute_schema.c.

References ARG_FILE_LINE, assert, assert_release, ATT_CHG_PROPERTY_DIFF, ATT_CHG_PROPERTY_GAINED, ATT_CHG_PROPERTY_LOST, ATT_CHG_PROPERTY_PRESENT_OLD, ATT_CHG_PROPERTY_UNCHANGED, ATT_CHG_TYPE_NEED_ROW_CHECK, ATT_CHG_TYPE_NOT_SUPPORTED, ATT_CHG_TYPE_NOT_SUPPORTED_WITH_CFG, ATT_CHG_TYPE_PREC_INCR, ATT_CHG_TYPE_PSEUDO_UPGRADE, ATT_CHG_TYPE_SET_CLS_COMPAT, ATT_CHG_TYPE_UPGRADE, sm_attr_properties_chg::att_id, pt_statement_info::attr_def, au_check_serial_authorization(), AU_DISABLE, AU_ENABLE, sm_attribute::auto_increment, pt_attr_def_info::auto_increment, AUTO_INCREMENT_SERIAL_NAME_MAX_LENGTH, check_default_on_update_clause(), classobj_drop_prop(), classobj_initialize_default_expr(), sm_attribute::comment, pt_attr_def_info::comment, pt_attr_def_info::constrain_not_null, COPY_OID, CT_SERIAL_NAME, pt_attr_def_info::data_default, pt_value_info::data_value, DB_DEFAULT_NONE, db_make_null(), db_value_clear(), dbt_constrain_non_null(), sm_default_value::default_expr, default_value, sm_attribute::default_value, do_create_auto_increment_serial(), do_get_serial_obj_id(), do_update_auto_increment_serial_on_rename(), do_update_maxvalue_of_auto_increment_serial(), er_errid(), ER_ERROR_SEVERITY, ER_FAILED, er_set(), ER_UNEXPECTED, error(), sm_attribute::flags, get_att_default_from_def(), get_att_order_from_def(), get_attr_name(), sm_attribute::header, sm_attribute::id, ID_ATTRIBUTE, ID_CLASS_ATTRIBUTE, ID_SHARED_ATTRIBUTE, parser_node::info, is_att_prop_set(), sm_component::name, sm_template::name, pt_statement_info::name, sm_attr_properties_chg::name_space, NO_ERROR, parser_node::node_type, NULL, obj_delete(), OID_ISNULL, OID_SET_NULL, pt_attr_def_info::on_update, sm_attribute::on_update_default_expr, pt_name_info::original, sm_attr_properties_chg::p, P_AUTO_INCR, P_COMMENT, P_DEFAULT_VALUE, P_NAME, P_NOT_NULL, P_ON_UPDATE_EXPR, P_TYPE, pr_clear_value(), sm_attribute::properties, PT_ATTR_DEF, pt_get_default_expression_from_data_default_node(), pt_get_varchar_bytes(), PT_NAME, pt_node_to_db_domain(), PT_VALUE, serial_decache(), SET_AUTO_INCREMENT_SERIAL_NAME, SM_ATTFLAG_AUTO_INCREMENT, SM_ATTR_CHG_BEST_EFFORT, SM_ATTR_CHG_ONLY_SCHEMA, SM_ATTR_CHG_WITH_ROW_UPDATE, SM_CLASS_CT, sm_find_class(), smt_change_attribute_w_dflt_w_order(), smt_get_class_type(), pt_data_value::str, validate_attribute_domain(), sm_default_value::value, pt_statement_info::value, ws_copy_string(), ws_free_string(), and ws_identifier().

Referenced by do_alter_clause_change_attribute().

Here is the caller graph for this function:

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:

static int do_create_partition ( PARSER_CONTEXT parser,
PT_NODE alter,
SM_PARTITION_ALTER_INFO pinfo 
)
static

Definition at line 3663 of file execute_schema.c.

References adjust_partition_range(), adjust_partition_size(), pt_statement_info::alter, pt_alter_info::alter_clause, ARG_FILE_LINE, assert, sm_class::attributes, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_MODIFICATION_ERROR, pt_alter_info::code, sm_class::collation_id, pt_statement_info::create_entity, pt_value_info::data_value, DB_GT, DB_LT, db_make_int(), DB_MAX_IDENTIFIER_LENGTH, pt_name_info::db_object, db_value_compare(), dbt_abort_class(), dbt_create_class(), dbt_edit_class(), dbt_finish_class(), do_create_local(), do_get_partition_size(), pt_alter_info::entity_name, pt_create_entity_info::entity_name, pt_create_entity_info::entity_type, er_clear(), er_errid(), er_errid_if_has_error(), ER_ERROR_SEVERITY, ER_FAILED, ER_INVALID_PARTITION_REQUEST, ER_LC_UNKNOWN_CLASSNAME, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), ER_SM_NO_PARTITION_ON_HIERARCHIES, error(), file_apply_tde_to_class_files(), parser_node::flag, sm_class::flags, free_and_init, pt_partition_info::hashsize, pt_data_value::i, parser_node::info, sm_class::inheritance, intl_identifier_lower(), locator_create_heap_if_needed(), locator_flush_class(), pt_parts_info::name, pt_statement_info::name, part_class_info::next, parser_node::next, NO_ERROR, parser_node::node_type, NULL, part_class_info::obj, vid_oid::oid, db_object::oid_info, pt_name_info::original, parser_copy_tree(), parser_free_tree(), parser_new_node(), sm_class::partition, sm_template::partition, pt_alter_info::partition, pt_statement_info::partition, pt_create_entity_info::partition_info, sm_template::partition_parent_atts, parser_node::partition_pruned, PARTITION_VARCHAR_LEN, PARTITIONED_SUB_CLASS_TAG, pt_partition_info::parts, pt_statement_info::parts, part_class_info::pname, PT_ADD_HASHPARTITION, PT_ADD_PARTITION, PT_ALTER, PT_CLASS, PT_CREATE_ENTITY, PT_NAME, pt_node_to_partition_info(), PT_PARTITION_HASH, PT_PARTITION_RANGE, PT_PARTS, PT_REORG_PARTITION, PT_VALUE, pt_value_to_db(), sm_partition_alter_info::root_op, sm_partition_alter_info::root_tmpl, SM_CLASSFLAG_REUSE_OID, sm_set_class_collation(), sm_set_class_flag(), sm_set_class_tde_algorithm(), strlen, pt_create_entity_info::supclass_list, sm_class::tde_algorithm, TDE_ALGORITHM_NONE, part_class_info::temp, pt_partition_info::type, pt_parts_info::type, sm_class::users, pt_statement_info::value, pt_parts_info::values, and ws_find_class().

Referenced by do_alter_partitioning_post(), do_alter_partitioning_pre(), do_create_entity(), and do_reorganize_partition_pre().

Here is the caller graph for this function:

static int do_create_partition_constraint ( PT_NODE alter,
SM_CLASS root_class,
SM_CLASS_CONSTRAINT constraint,
SM_PARTITION_ALTER_INFO pinfo 
)
static
static int do_drop_att_constraints ( MOP  class_mop,
SM_CONSTRAINT_INFO constr_info_list 
)
static
int do_drop_partitioned_class ( MOP  class_,
int  drop_sub_flag,
bool  is_cascade_constraints 
)
static int do_drop_saved_indexes ( MOP  classmop,
SM_CONSTRAINT_INFO index_save_info 
)
static
int do_get_partition_parent ( DB_OBJECT *const  classop,
MOP *const  parentop 
)
static int do_promote_partition ( SM_CLASS class_)
static

Definition at line 6709 of file execute_schema.c.

References ARG_FILE_LINE, assert, sm_template::attributes, sm_attribute::auto_increment, CHECK_1ARG_ERROR, sm_class::class_attributes, sm_template::class_attributes, sm_template::class_methods, sm_attribute::class_mop, sm_template::class_resolutions, classobj_copy_attlist(), classobj_drop_prop(), classobj_free_partition_info(), sm_template::current, dbt_abort_class(), dbt_edit_class(), dbt_finish_class(), er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_PARTITION_NOT_EXIST, er_set(), error(), sm_attribute::flags, sm_attribute::header, sm_template::inheritance, sm_template::instance_attributes, sm_template::loader_commands, sm_template::method_files, sm_template::methods, sm_component::next, NO_ERROR, NULL, sm_class::ordered_attributes, sm_class::partition, sm_template::partition, sm_template::partition_parent_atts, sm_template::properties, sm_template::query_spec, sm_template::resolutions, sm_template::shared_attributes, SM_ATTFLAG_AUTO_INCREMENT, SM_ATTFLAG_FOREIGN_KEY, SM_ATTFLAG_NON_NULL, SM_ATTFLAG_PARTITION_KEY, SM_ATTFLAG_PRIMARY_KEY, SM_ATTFLAG_REVERSE_UNIQUE, SM_ATTFLAG_UNIQUE, sm_ch_name(), sm_find_class(), SM_PROPERTY_FOREIGN_KEY, SM_PROPERTY_NOT_NULL, SM_PROPERTY_PRIMARY_KEY, SM_PROPERTY_REVERSE_UNIQUE, SM_PROPERTY_UNIQUE, and sm_template::triggers.

Referenced by do_coalesce_partition_pre(), do_promote_partition_by_name(), do_promote_partition_list(), and do_remove_partition_pre().

Here is the caller graph for this function:

static int do_promote_partition_by_name ( const char *  class_name,
const char *  part_num,
char **  partition_name 
)
static
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 
)
static int do_rename_internal ( const char *const  old_name,
const char *const  new_name 
)
static
static int do_run_upgrade_instances_domain ( PARSER_CONTEXT parser,
OID p_class_oid,
int  att_id 
)
static

Definition at line 13490 of file execute_schema.c.

References assert, error(), locator_upgrade_instances_domain(), NO_ERROR, and NULL.

Referenced by do_alter_clause_change_attribute().

Here is the caller graph for this function:

static int do_save_all_indexes ( MOP  classmop,
SM_CONSTRAINT_INFO **  saved_index_info_listpp 
)
static
int do_set_object_id ( const PARSER_CONTEXT parser,
DB_CTMPL ctemplate,
PT_NODE object_id_list 
)
static int drop_class_name ( const char *  name,
bool  is_cascade_constraints 
)
static

Definition at line 2289 of file execute_schema.c.

References assert, db_drop_class_ex(), db_find_class(), er_errid(), and NO_ERROR.

Referenced by do_create_entity(), and do_drop().

Here is the caller graph for this function:

static int execute_create_select_query ( PARSER_CONTEXT parser,
const char *const  class_name,
PT_NODE create_select,
PT_CREATE_SELECT_ACTION  create_select_action,
DB_QUERY_TYPE query_columns,
PT_NODE flagged_statement 
)
static
static int get_att_default_from_def ( PARSER_CONTEXT parser,
PT_NODE attribute,
DB_VALUE **  default_value,
const char *  classname 
)
static

Definition at line 12759 of file execute_schema.c.

References assert, pt_statement_info::attr_def, db_value::data, pt_attr_def_info::data_default, pt_statement_info::data_default, pt_statement_info::data_type, parser_node::data_type, DB_DEFAULT_NONE, db_make_null(), pt_value_info::db_value, db_value_clear(), pt_value_info::db_value_is_in_workspace, db_value_is_null(), pt_data_default_info::default_expr_type, pt_data_default_info::default_value, db_value::domain, pt_data_type_info::entity, er_errid(), ER_IT_DATA_OVERFLOW, error(), db_domain_info::general_info, parser_node::info, intl_identifier_casecmp(), MSGCAT_SEMANTIC_CANT_COERCE_TO, MSGCAT_SEMANTIC_OVERFLOW_COERCING_TO, MSGCAT_SET_PARSER_SEMANTIC, pt_statement_info::name, parser_node::next, NO_ERROR, parser_node::node_type, NULL, pt_name_info::original, parser_copy_tree(), parser_free_node(), parser_free_tree(), PT_ATTR_DEF, pt_coerce_value_for_default_value(), pt_dbval_to_value(), PT_ERRORmf2, pt_evaluate_tree(), pt_evaluate_tree_having_serial(), pt_has_error, PT_INTERNAL_ERROR, PT_IS_COLLECTION_TYPE, PT_NAME, pt_report_to_ersys(), pt_reset_error(), PT_SEMANTIC, pt_semantic_check(), pt_semantic_type(), pt_short_print(), pt_show_type_enum(), PT_TYPE_OBJECT, db_set::set, db_data::set, setobj::size, TP_IS_SET_TYPE, db_domain_info::general_info::type, parser_node::type_enum, and pt_statement_info::value.

Referenced by check_change_attribute(), do_add_attribute(), and do_change_att_schema_only().

Here is the caller graph for this function:

static int get_att_order_from_def ( PT_NODE attribute,
bool ord_first,
const char **  ord_after_name 
)
static
static PT_NODE * get_attribute_with_name ( PT_NODE atts,
const char *  name 
)
static

Definition at line 7296 of file execute_schema.c.

References attribute_name(), get_attr_name(), intl_identifier_casecmp(), parser_node::next, NULL, sm_downcase_name(), and SM_MAX_IDENTIFIER_LENGTH.

Referenced by do_add_attributes().

Here is the caller graph for this function:

static int get_index_type_qualifiers ( MOP  obj,
bool is_reverse,
bool is_unique,
const char *  index_name 
)
static
static DB_CONSTRAINT_TYPE get_reverse_unique_index_type ( const bool  is_reverse,
const bool  is_unique 
)
static
int ib_get_thread_count ( )

Definition at line 15379 of file execute_schema.c.

References ib_thread_count.

Referenced by btree_load_index().

Here is the caller graph for this function:

static bool is_att_change_needed ( const SM_ATTR_PROP_CHG attr_chg_properties)
static

Definition at line 12525 of file execute_schema.c.

References ATT_CHG_PROPERTY_DIFF, ATT_CHG_PROPERTY_UNCHANGED, i, is_att_prop_set(), NUM_ATT_CHG_PROP, and sm_attr_properties_chg::p.

Referenced by check_change_attribute().

Here is the caller graph for this function:

static bool is_att_prop_set ( const int  prop,
const int  value 
)
static
static bool is_att_property_structure_checked ( const SM_ATTR_PROP_CHG attr_chg_properties)
static

Definition at line 12500 of file execute_schema.c.

References ATT_CHG_PROPERTY_NOT_CHECKED, i, NUM_ATT_CHG_PROP, and sm_attr_properties_chg::p.

Referenced by check_change_attribute().

Here is the caller graph for this function:

static bool is_attribute_primary_key ( const char *  class_name,
const char *  attr_name 
)
static

Definition at line 13258 of file execute_schema.c.

References db_attribute_is_primary_key(), db_get_attribute_by_name(), and NULL.

Referenced by do_update_new_notnull_cols_without_default().

Here is the caller graph for this function:

static SM_FOREIGN_KEY_ACTION map_pt_to_sm_action ( const PT_MISC_TYPE  action)
static
static SM_PARTITION * pt_node_to_partition_info ( PARSER_CONTEXT parser,
PT_NODE node,
PT_NODE entity_name,
char *  class_name,
char *  partition_name,
DB_VALUE minval 
)
static

Definition at line 14958 of file execute_schema.c.

References ARG_FILE_LINE, assert, parser_varchar::bytes, classobj_free_partition_info(), classobj_make_partition_info(), sm_partition::comment, pt_parts_info::comment, compile_partition_expression(), parser_context::custom_print, pt_value_info::data_value, db_make_char(), db_make_null(), db_make_varchar(), DB_MAX_PARTITION_EXPR_LENGTH, db_seq_copy(), db_ws_free(), er_errid(), ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, ER_PARTITION_EXPRESSION_TOO_LONG, er_set(), sm_partition::expr, pt_partition_info::expr, sm_function_info::expr_stream, sm_function_info::expr_stream_size, free_and_init, pt_partition_info::hashsize, parser_node::info, pt_partition_info::keycol, LANG_SYS_CODESET, LANG_SYS_COLLATION, pt_parts_info::name, pt_statement_info::name, parser_node::next, NO_ERROR, parser_node::node_type, NULL, pt_name_info::original, sm_attr_properties_chg::p, parser_print_tree_with_quotes(), db_value_slist::partition, pt_statement_info::partition, sm_partition::partition_type, PARTITION_VARCHAR_LEN, pt_statement_info::parts, sm_partition::pname, PT_CHARSET_COLLATE_FULL, pt_has_error, PT_PARTITION, PT_PARTITION_HASH, PT_PARTITION_RANGE, pt_report_to_ersys_with_statement(), PT_SEMANTIC, PT_VALUE, pt_value_to_db(), set_add_element(), set_create_sequence(), set_free(), sm_free_function_index_info(), pt_data_value::str, strlen, pt_partition_info::type, pt_parts_info::type, pt_statement_info::value, sm_partition::values, pt_parts_info::values, and ws_copy_string().

Referenced by do_create_partition().

Here is the caller graph for this function:

static PT_NODE * pt_replace_names_index_expr ( PARSER_CONTEXT parser,
PT_NODE node,
void *  void_arg,
int *  continue_walk 
)
static
static DB_QUERY_TYPE * query_get_column_with_name ( DB_QUERY_TYPE query_columns,
const char *  name 
)
static

Definition at line 7272 of file execute_schema.c.

References db_query_format_name(), db_query_format_next(), intl_identifier_casecmp(), NULL, sm_downcase_name(), and SM_MAX_IDENTIFIER_LENGTH.

Referenced by do_add_attributes().

Here is the caller graph for this function:

static int truncate_class_name ( const char *  name)
static

Definition at line 9372 of file execute_schema.c.

References assert, db_find_class(), db_truncate_class(), er_errid(), and NO_ERROR.

Referenced by do_copy_indexes(), and do_truncate().

Here is the caller graph for this function:

int update_locksets_for_multiple_rename ( const char *  class_name,
int *  num_mops,
MOP mop_set,
int *  num_names,
char **  name_set,
bool  error_on_misssing_class 
)
static

Variable Documentation

int ib_thread_count = 0

Definition at line 382 of file execute_schema.c.

Referenced by do_create_index(), ib_get_thread_count(), and sbtree_load_index().