CUBRID Engine
latest
|
#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 |
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 } |
Variables | |
int | ib_thread_count = 0 |
#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 | ) |
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 |
Definition at line 85 of file execute_schema.c.
Referenced by create_or_drop_index_helper(), and do_recreate_filter_index_constr().
#define QUERY_MAX_SIZE 1024 * 1024 |
Definition at line 84 of file execute_schema.c.
Referenced by do_run_update_query_for_new_default_expression_fields(), and do_run_update_query_for_new_notnull_fields().
#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" |
Definition at line 74 of file execute_schema.c.
Referenced by do_alter_index_comment(), do_alter_index_rebuild(), and do_alter_index_status().
#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" |
Definition at line 73 of file execute_schema.c.
Referenced by do_alter_change_default_cs_coll(), and do_alter_clause_change_attribute().
#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 struct db_value_slist DB_VALUE_SLIST |
Definition at line 216 of file execute_schema.c.
typedef struct part_class_info PART_CLASS_INFO |
Definition at line 204 of file execute_schema.c.
typedef struct sm_attr_properties_chg SM_ATTR_PROP_CHG |
Definition at line 176 of file execute_schema.c.
typedef struct sm_partition_alter_info SM_PARTITION_ALTER_INFO |
Definition at line 191 of file execute_schema.c.
anonymous enum |
Definition at line 111 of file execute_schema.c.
anonymous enum |
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.
enum SM_ATTR_CHG_SOL |
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.
Definition at line 2444 of file execute_schema.c.
References ARG_FILE_LINE, assert, COPY_OID, DB_FETCH_WRITE, ER_CANNOT_GET_LOCK, ER_ERROR_SEVERITY, ER_LC_CLASSNAME_EXIST, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), fetch_result(), free_and_init, i, parser_node::info, LC_CLASSNAME_ERROR, LC_CLASSNAME_RESERVED, locator_fetch_set(), locator_reserve_class_names(), pt_statement_info::name, pt_rename_info::new_name, parser_node::next, NO_ERROR, NULL, pt_rename_info::old_name, pt_name_info::original, pt_length_of_list(), pt_statement_info::rename, update_locksets_for_multiple_rename(), and ws_oid().
Referenced by do_rename().
|
static |
Definition at line 7421 of file execute_schema.c.
References ARG_FILE_LINE, assert, pt_foreign_key_info::attrs, pt_constraint_info::comment, pt_statement_info::constraint, dbt_add_foreign_key(), pt_foreign_key_info::delete_action, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), pt_constraint_info::foreign_key, free_and_init, i, parser_node::info, map_pt_to_sm_action(), pt_constraint_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, pt_length_of_list(), PT_VALUE, PT_VALUE_GET_BYTES, pt_foreign_key_info::referenced_attrs, pt_foreign_key_info::referenced_class, pt_constraint_info::un, and pt_foreign_key_info::update_action.
Referenced by do_add_constraints().
|
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().
|
static |
Definition at line 8208 of file execute_schema.c.
References add_query_to_virtual_class(), pt_query_info::all_distinct, pt_union_info::arg1, pt_union_info::arg2, error(), parser_node::info, pt_query_info::limit, NO_ERROR, parser_node::node_type, NULL, pt_query_info::order_by, PT_ALL, PT_UNION, pt_query_info::q, pt_statement_info::query, and pt_query_info::union_.
Referenced by do_add_queries().
|
static |
Definition at line 4811 of file execute_schema.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, DB_EQ, DB_GT, DB_IS_NULL, db_make_null(), db_make_sequence(), db_seq_copy(), db_value_compare(), db_value_copy(), db_value_free(), dbt_abort_class(), dbt_edit_class(), dbt_finish_class(), ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), sm_partition::expr, free_and_init, db_value_slist::next, db_objlist::next, NO_ERROR, NULL, db_objlist::op, sm_class::partition, sm_template::partition, sm_partition::partition_type, PT_PARTITION_RANGE, set_add_element(), set_create_sequence(), set_free(), set_get_element_nocopy(), and sm_partition::values.
Referenced by do_create_partition(), do_drop_partition_list(), and do_promote_partition_list().
Definition at line 4994 of file execute_schema.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, db_value::data, db_make_null(), ER_ERROR_SEVERITY, ER_INVALID_PARTITION_REQUEST, er_set(), error(), db_data::i, db_objlist::next, NO_ERROR, NULL, db_objlist::op, sm_class::partition, sm_template::partition, set_get_element_nocopy(), set_put_element(), sm_class::users, and sm_partition::values.
Referenced by do_coalesce_partition_pre(), do_create_partition(), do_drop_partition_list(), and do_promote_partition_list().
|
static |
Definition at line 12153 of file execute_schema.c.
References coll_opt::allow_prefix_index, assert, ATT_CHG_PROPERTY_PRESENT_OLD, ATT_CHG_TYPE_NOT_SUPPORTED, ATT_CHG_TYPE_PSEUDO_UPGRADE, INTL_CAN_COERCE_CS, is_att_prop_set(), lang_get_collation(), NO_ERROR, NULL, lang_collation::options, sm_attr_properties_chg::p, P_PREFIX_INDEX, P_TYPE, TP_DOMAIN_CODESET, TP_DOMAIN_COLLATION, TP_DOMAIN_TYPE, and TP_TYPE_HAS_COLLATION.
Referenced by build_att_type_change_map(), and build_attr_change_map().
|
static |
Definition at line 11244 of file execute_schema.c.
References assert, ATT_CHG_PROPERTY_DIFF, ATT_CHG_TYPE_NEED_ROW_CHECK, ATT_CHG_TYPE_NOT_SUPPORTED, ATT_CHG_TYPE_NOT_SUPPORTED_WITH_CFG, ATT_CHG_TYPE_PSEUDO_UPGRADE, ATT_CHG_TYPE_SET_CLS_COMPAT, ATT_CHG_TYPE_UPGRADE, build_att_coll_change_map(), tp_domain::class_mop, db_is_class(), db_is_subclass(), DB_MAX_VARCHAR_PRECISION, DB_MAX_VARNCHAR_PRECISION, DB_TYPE_BIGINT, DB_TYPE_BIT, DB_TYPE_CHAR, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_DOUBLE, DB_TYPE_ENUMERATION, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_NCHAR, DB_TYPE_NUMERIC, DB_TYPE_OBJECT, DB_TYPE_SHORT, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, DB_TYPE_VARBIT, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, error(), NO_ERROR, sm_attr_properties_chg::p, P_TYPE, tp_domain::precision, prm_get_bool_value(), PRM_ID_ALTER_TABLE_CHANGE_TYPE_STRICT, tp_domain::scale, TP_BIGINT_PRECISION, TP_DATE_AS_CHAR_LENGTH, TP_DATETIME_AS_CHAR_LENGTH, TP_DATETIMETZ_AS_CHAR_LENGTH, TP_DOMAIN_TYPE, TP_FLOATING_PRECISION_VALUE, TP_INTEGER_PRECISION, TP_SMALLINT_PRECISION, TP_TIME_AS_CHAR_LENGTH, TP_TIMESTAMP_AS_CHAR_LENGTH, and TP_TIMESTAMPTZ_AS_CHAR_LENGTH.
Referenced by build_attr_change_map().
|
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().
|
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().
|
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().
|
static |
Definition at line 13795 of file execute_schema.c.
References pt_alter_info::alter_clause, assert, lang_collation::codeset, pt_alter_info::collation, sm_class::collation_id, sm_template::current, error(), LANG_GET_BINARY_COLLATION, lang_get_collation(), NO_ERROR, and NULL.
Referenced by do_alter_change_default_cs_coll().
|
static |
Definition at line 12640 of file execute_schema.c.
References pt_statement_info::attr_def, parser_node::buffer_pos, parser_node::column_number, parser_node::data_type, DB_DEFAULT_NONE, db_make_null(), er_errid(), ER_FAILED, ER_IT_DATA_OVERFLOW, error(), parser_node::info, parser_node::line_number, MSGCAT_SEMANTIC_CANT_COERCE_TO, MSGCAT_SEMANTIC_OUT_OF_MEMORY, MSGCAT_SEMANTIC_OVERFLOW_COERCING_TO, MSGCAT_SET_PARSER_SEMANTIC, NO_ERROR, NULL, pt_attr_def_info::on_update, parser_free_node(), parser_make_expression(), pr_clear_value(), pt_coerce_value_for_default_value(), pt_dbval_to_value(), PT_ERRORm, PT_ERRORmf2, pt_evaluate_tree_having_serial(), pt_has_error, pt_op_type_from_default_expr_type(), pt_report_to_ersys(), pt_reset_error(), PT_SEMANTIC, pt_semantic_check(), pt_semantic_type(), pt_short_print(), pt_show_type_enum(), and parser_node::type_enum.
Referenced by check_change_attribute(), do_add_attribute(), and do_change_att_schema_only().
|
static |
Definition at line 4245 of file execute_schema.c.
References ARG_FILE_LINE, assert, DO_INDEX_CREATE, ER_ERROR_SEVERITY, ER_GENERIC_ERROR, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), pt_partition_info::expr, parser_node::info, mq_clear_ids(), MSGCAT_SEMANTIC_INVALID_PARTITION_DEFINITION, MSGCAT_SET_PARSER_SEMANTIC, parser_node::node_type, NULL, parser_free_node(), pt_statement_info::partition, pt_enter_packing_buf(), pt_entity(), PT_ERRORm, pt_exit_packing_buf(), pt_node_to_function_index(), PT_PARTITION, and pt_semantic_quick_check_node().
Referenced by pt_node_to_partition_info().
|
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().
|
static |
Definition at line 8408 of file execute_schema.c.
References assert, pt_insert_info::attr_list, db_query_format_name(), db_query_format_next(), pt_insert_info::do_replace, pt_spec_info::entity_name, parser_node::info, pt_statement_info::insert, pt_spec_info::meta_class, NULL, pt_spec_info::only_all, parser_append_node(), parser_free_tree(), parser_new_node(), PT_CLASS, PT_CREATE_SELECT_NO_ACTION, PT_CREATE_SELECT_REPLACE, PT_INSERT, PT_IS_SUBQUERY, pt_name(), pt_node_list(), PT_ONLY, PT_SPEC, sm_downcase_name(), SM_MAX_IDENTIFIER_LENGTH, pt_insert_info::spec, pt_statement_info::spec, and pt_insert_info::value_clauses.
Referenced by execute_create_select_query().
|
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().
|
static |
Definition at line 7190 of file execute_schema.c.
References ARG_FILE_LINE, db_query_type::attr_name, db_value_slist::class_obj, db_make_null(), db_query_format_name(), DB_TYPE_BLOB, DB_TYPE_CLOB, DB_TYPE_NULL, db_value_clear(), dbt_constrain_non_null(), default_value, db_query_type::domain, ER_CREATE_AS_SELECT_NULL_TYPE, ER_ERROR_SEVERITY, ER_FAILED, ER_PT_SEMANTIC, er_set(), error(), pr_type::id, ID_ATTRIBUTE, MSGCAT_SEMANTIC_INVALID_SET_ELEMENT, MSGCAT_SET_PARSER_SEMANTIC, tp_domain::next, NO_ERROR, NULL, pt_db_to_type_enum(), PT_ERRORmf2, pt_show_type_enum(), tp_domain::setdomain, sm_att_constrained(), sm_att_default_value(), SM_ATTFLAG_NON_NULL, sm_find_class(), smt_add_attribute_w_dflt(), db_query_type::spec_name, TP_DOMAIN_TYPE, TP_IS_SET_TYPE, and tp_domain::type.
Referenced by do_add_attributes().
int do_add_attributes | ( | PARSER_CONTEXT * | parser, |
DB_CTMPL * | ctemplate, | ||
PT_NODE * | atts, | ||
PT_NODE * | constraints, | ||
DB_QUERY_TYPE * | create_select_columns | ||
) |
Definition at line 7332 of file execute_schema.c.
References db_query_format_name(), db_query_format_next(), do_add_attribute(), do_add_attribute_from_select_column(), error(), get_attr_name(), get_attribute_with_name(), parser_node::next, NO_ERROR, NULL, and query_get_column_with_name().
Referenced by do_alter_one_clause_with_template(), and do_create_local().
Definition at line 7494 of file execute_schema.c.
References add_foreign_key(), ARG_FILE_LINE, assert, pt_foreign_key_info::attrs, pt_constraint_info::comment, pt_statement_info::constraint, DB_CONSTRAINT_PRIMARY_KEY, DB_CONSTRAINT_REVERSE_UNIQUE, DB_CONSTRAINT_UNIQUE, er_errid(), ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), pt_constraint_info::foreign_key, free_and_init, i, if(), parser_node::info, pt_name_info::meta_class, pt_constraint_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, pt_constraint_info::primary_key, PT_CONSTRAIN_FOREIGN_KEY, PT_CONSTRAIN_PRIMARY_KEY, PT_CONSTRAIN_UNIQUE, pt_length_of_list(), PT_META_ATTR, PT_NAME_INFO_DESC, PT_NAME_INFO_IS_FLAGED, PT_VALUE, PT_VALUE_GET_BYTES, SM_NORMAL_INDEX, sm_produce_constraint_name_tmpl(), smt_add_constraint(), pt_constraint_info::type, pt_constraint_info::un, and pt_constraint_info::unique.
Referenced by do_alter_one_clause_with_template(), and do_create_local().
int do_add_method_files | ( | const PARSER_CONTEXT * | parser, |
DB_CTMPL * | ctemplate, | ||
PT_NODE * | method_files | ||
) |
Definition at line 8047 of file execute_schema.c.
References parser_varchar::bytes, pt_value_info::data_value, dbt_add_method_file(), error(), pt_statement_info::file_path, parser_node::info, parser_node::next, NO_ERROR, parser_node::node_type, NULL, PT_FILE_PATH, PT_TYPE_CHAR, PT_TYPE_NCHAR, PT_TYPE_VARCHAR, PT_TYPE_VARNCHAR, PT_VALUE, pt_data_value::str, pt_file_path_info::string, parser_node::type_enum, and pt_statement_info::value.
Referenced by do_alter_one_clause_with_template(), and do_create_local().
int do_add_methods | ( | PARSER_CONTEXT * | parser, |
DB_CTMPL * | ctemplate, | ||
PT_NODE * | methods | ||
) |
Definition at line 7872 of file execute_schema.c.
References assert, parser_node::data_type, dbt_add_class_method(), dbt_add_method(), er_errid(), ER_GENERIC_ERROR, error(), pt_method_def_info::function_name, parser_node::info, pt_method_def_info::method_args_list, pt_statement_info::method_def, pt_method_def_info::method_name, pt_method_def_info::mthd_type, sm_template::name, pt_statement_info::name, parser_node::next, NO_ERROR, NULL, pt_name_info::original, pt_data_type_to_db_domain(), PT_IS_COLLECTION_TYPE, PT_META_ATTR, pt_node_to_db_domain(), PT_TYPE_NONE, smt_add_set_argument_domain(), smt_assign_argument_domain(), parser_node::type_enum, and validate_attribute_domain().
Referenced by do_alter_one_clause_with_template(), and do_create_local().
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().
int do_add_resolutions | ( | const PARSER_CONTEXT * | parser, |
DB_CTMPL * | ctemplate, | ||
const PT_NODE * | resolution | ||
) |
Definition at line 8121 of file execute_schema.c.
References pt_resolution_info::as_attr_mthd_name, assert, pt_resolution_info::attr_mthd_name, pt_resolution_info::attr_type, db_find_class(), dbt_add_class_resolution(), dbt_add_resolution(), er_errid(), error(), parser_node::info, pt_statement_info::name, parser_node::next, NO_ERROR, NULL, pt_resolution_info::of_sup_class_name, pt_name_info::original, PT_META_ATTR, and pt_statement_info::resolution.
Referenced by do_alter_one_clause_with_template(), and do_create_local().
int do_add_supers | ( | const PARSER_CONTEXT * | parser, |
DB_CTMPL * | ctemplate, | ||
const PT_NODE * | supers | ||
) |
Definition at line 8083 of file execute_schema.c.
References assert, db_find_class(), dbt_add_super(), er_errid(), error(), parser_node::info, pt_statement_info::name, parser_node::next, NO_ERROR, NULL, and pt_name_info::original.
Referenced by do_alter_one_clause_with_template(), and do_create_local().
int do_alter | ( | PARSER_CONTEXT * | parser, |
PT_NODE * | alter | ||
) |
Definition at line 1626 of file execute_schema.c.
References pt_statement_info::alter, assert, CHECK_MODIFICATION_ERROR, pt_alter_info::code, do_alter_change_auto_increment(), do_alter_change_col_comment(), do_alter_change_default_cs_coll(), do_alter_change_owner(), do_alter_change_tbl_comment(), do_alter_clause_add_index(), do_alter_clause_change_attribute(), do_alter_clause_drop_index(), do_alter_clause_rename_entity(), do_alter_one_clause_with_template(), do_rollback(), er_errid(), ER_LK_UNILATERALLY_ABORTED, parser_node::info, parser_node::next, NO_ERROR, NULL, PT_ADD_INDEX_CLAUSE, PT_CHANGE_ATTR, PT_CHANGE_AUTO_INCREMENT, PT_CHANGE_COLLATION, PT_CHANGE_COLUMN_COMMENT, PT_CHANGE_OWNER, PT_CHANGE_TABLE_COMMENT, pt_compile(), PT_DROP_INDEX_CLAUSE, pt_has_error, PT_RENAME_ENTITY, pt_report_to_ersys_with_statement(), PT_SEMANTIC, tran_abort_upto_system_savepoint(), tran_system_savepoint(), and UNIQUE_SAVEPOINT_MULTIPLE_ALTER.
Referenced by do_execute_statement(), and do_statement().
|
static |
Definition at line 1554 of file execute_schema.c.
References pt_statement_info::alter, pt_alter_info::alter_clause, assert, AU_DISABLE, AU_ENABLE, sm_attribute::auto_increment, pt_alter_info::auto_increment, db_value_slist::class_obj, db_attribute_next(), db_find_class(), db_get_attributes(), do_change_auto_increment_serial(), pt_alter_info::entity_name, ER_AUTO_INCREMENT_SINGLE_COL_AMBIGUITY, er_errid(), ER_UNEXPECTED, error(), ERROR0, ERROR1, parser_node::info, pt_statement_info::name, NO_ERROR, NULL, and pt_name_info::original.
Referenced by do_alter().
|
static |
Definition at line 10160 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_attr_def_info::attr_type, db_value_slist::class_obj, pt_alter_info::code, parser_node::column_number, sm_attribute::comment, pt_attr_def_info::comment, pt_value_info::data_value, DB_FETCH_WRITE, db_find_class(), dbt_abort_class(), dbt_edit_class(), dbt_finish_class(), pt_alter_info::entity_name, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_LK_UNILATERALLY_ABORTED, er_msg(), er_set(), ER_UNEXPECTED, error(), get_attr_name(), ID_ATTRIBUTE, ID_CLASS_ATTRIBUTE, ID_NULL, ID_SHARED_ATTRIBUTE, parser_node::info, parser_node::line_number, locator_fetch_class(), locator_flush_class(), pt_statement_info::name, sm_attr_properties_chg::name_space, parser_node::next, NO_ERROR, parser_node::node_type, NULL, OID_SET_NULL, sm_template::op, pt_name_info::original, PT_CHANGE_COLUMN_COMMENT, pt_get_varchar_bytes(), PT_META_ATTR, pt_record_error(), PT_SHARED, PT_VALUE, smt_find_attribute(), parser_context::statement_number, pt_data_value::str, tran_abort_upto_system_savepoint(), tran_system_savepoint(), UNIQUE_SAVEPOINT_CHANGE_COLUMN_COMMENT, pt_statement_info::value, ws_copy_string(), and ws_free_string_and_init.
Referenced by do_alter().
|
static |
Definition at line 9892 of file execute_schema.c.
References pt_statement_info::alter, ARG_FILE_LINE, assert, check_change_class_collation(), db_value_slist::class_obj, pt_alter_info::code, parser_node::column_number, DB_FETCH_WRITE, db_find_class(), DB_PARTITIONED_CLASS, dbt_abort_class(), dbt_edit_class(), dbt_finish_class(), pt_alter_info::entity_name, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_LK_UNILATERALLY_ABORTED, er_msg(), er_set(), ER_UNEXPECTED, error(), free_and_init, i, parser_node::info, parser_node::line_number, locator_fetch_class(), locator_flush_class(), pt_statement_info::name, NO_ERROR, NULL, OID_SET_NULL, sm_template::op, pt_name_info::original, PT_CHANGE_COLLATION, pt_record_error(), sm_partitioned_class_type(), sm_set_class_collation(), parser_context::statement_number, tran_abort_upto_system_savepoint(), tran_system_savepoint(), UNIQUE_SAVEPOINT_CHANGE_ATTR, and UNIQUE_SAVEPOINT_CHANGE_DEF_COLL.
Referenced by do_alter().
|
static |
Definition at line 9851 of file execute_schema.c.
References pt_statement_info::alter, pt_alter_info::alter_clause, assert, au_change_owner_method(), db_get_error(), db_make_null(), db_make_string(), DB_TYPE_ERROR, DB_VALUE_TYPE, pt_alter_info::entity_name, error(), parser_node::info, pt_statement_info::name, NO_ERROR, NULL, pt_name_info::original, pr_clear_value(), and pt_alter_info::user.
Referenced by do_alter().
|
static |
Definition at line 10042 of file execute_schema.c.
References pt_statement_info::alter, pt_alter_info::alter_clause, ARG_FILE_LINE, assert, db_value_slist::class_obj, pt_alter_info::code, parser_node::column_number, pt_alter_info::comment, pt_value_info::data_value, DB_FETCH_WRITE, db_find_class(), dbt_abort_class(), dbt_edit_class(), dbt_finish_class(), pt_alter_info::entity_name, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_LK_UNILATERALLY_ABORTED, er_msg(), er_set(), ER_UNEXPECTED, error(), parser_node::info, parser_node::line_number, locator_fetch_class(), locator_flush_class(), pt_statement_info::name, NO_ERROR, parser_node::node_type, NULL, sm_template::op, pt_name_info::original, PT_ADD_QUERY, PT_CHANGE_TABLE_COMMENT, pt_get_varchar_bytes(), PT_MODIFY_QUERY, pt_record_error(), PT_RESET_QUERY, PT_VALUE, pt_alter_info::query, sm_set_class_comment(), parser_context::statement_number, pt_data_value::str, tran_abort_upto_system_savepoint(), tran_system_savepoint(), UNIQUE_SAVEPOINT_CHANGE_TBL_COMMENT, and pt_statement_info::value.
Referenced by do_alter(), and do_alter_one_clause_with_template().
|
static |
Definition at line 1458 of file execute_schema.c.
References pt_statement_info::alter, pt_alter_info::alter_clause, assert, pt_alter_info::attr_mthd, pt_alter_info::constraint_list, pt_alter_info::create_index, do_create_index(), error(), parser_node::info, parser_node::next, NO_ERROR, and NULL.
Referenced by do_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().
|
static |
Definition at line 1496 of file execute_schema.c.
References pt_statement_info::alter, pt_alter_info::alter_clause, assert, pt_alter_info::code, pt_alter_info::constraint_list, create_or_drop_index_helper(), DB_CONSTRAINT_INDEX, db_find_class(), DO_INDEX_DROP, pt_alter_info::entity_name, er_errid(), get_index_type_qualifiers(), get_reverse_unique_index_type(), pt_alter_info::index, parser_node::info, pt_statement_info::name, parser_node::next, NO_ERROR, parser_node::node_type, NULL, pt_name_info::original, PT_DROP_INDEX_CLAUSE, PT_NAME, and SM_NORMAL_INDEX.
Referenced by do_alter().
|
static |
Definition at line 1406 of file execute_schema.c.
References pt_statement_info::alter, pt_alter_info::alter_clause, assert, pt_alter_info::code, do_recreate_renamed_class_indexes(), do_rename_internal(), pt_alter_info::entity_name, ER_FAILED, parser_node::info, pt_statement_info::name, parser_node::next, NO_ERROR, NULL, pt_name_info::original, parser_copy_tree(), parser_free_tree(), PT_RENAME_ENTITY, pt_alter_info::rename, pt_alter_info::resolution_list, and pt_alter_info::super.
Referenced by do_alter().
int do_alter_index | ( | PARSER_CONTEXT * | parser, |
const PT_NODE * | statement | ||
) |
Definition at line 3621 of file execute_schema.c.
References CHECK_MODIFICATION_ERROR, pt_index_info::code, do_alter_index_comment(), do_alter_index_rebuild(), do_alter_index_status(), ER_FAILED, error(), pt_statement_info::index, parser_node::info, NO_ERROR, PT_CHANGE_INDEX_COMMENT, PT_CHANGE_INDEX_STATUS, and PT_REBUILD_INDEX.
Referenced by do_execute_statement(), and do_statement().
|
static |
Definition at line 3519 of file execute_schema.c.
References assert, AU_INDEX, pt_index_info::comment, db_find_class(), do_rollback(), er_errid(), ER_FAILED, ER_LK_UNILATERALLY_ABORTED, error(), pt_spec_info::flat_entity_list, pt_statement_info::index, pt_index_info::index_name, pt_index_info::indexed_class, parser_node::info, pt_statement_info::name, NO_ERROR, parser_node::node_type, NULL, pt_name_info::original, PT_VALUE, PT_VALUE_GET_BYTES, pt_name_info::resolved, sm_update_class(), smt_change_constraint_comment(), smt_edit_class_mop(), smt_quit(), pt_statement_info::spec, tran_abort_upto_system_savepoint(), tran_system_savepoint(), and UNIQUE_SAVEPOINT_ALTER_INDEX.
Referenced by do_alter_index().
|
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().
|
static |
Definition at line 15291 of file execute_schema.c.
References ASSERT_ERROR_AND_SET, AU_INDEX, db_find_class(), do_rollback(), er_errid(), ER_FAILED, ER_LK_UNILATERALLY_ABORTED, error(), pt_spec_info::flat_entity_list, if(), pt_statement_info::index, pt_index_info::index_name, pt_index_info::index_status, pt_index_info::indexed_class, parser_node::info, pt_statement_info::name, NO_ERROR, NULL, pt_name_info::original, pt_name_info::resolved, sm_update_class(), smt_change_constraint_status(), smt_edit_class_mop(), smt_quit(), pt_statement_info::spec, tran_abort_upto_system_savepoint(), tran_system_savepoint(), and UNIQUE_SAVEPOINT_ALTER_INDEX.
Referenced by do_alter_index().
|
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().
|
static |
Definition at line 5735 of file execute_schema.c.
References pt_statement_info::alter, assert, CHECK_3ARGS_ERROR, pt_alter_info::code, do_coalesce_partition_post(), do_create_partition(), do_create_partition_constraints(), do_get_partition_keycol(), do_redistribute_partitions_data(), do_remove_partition_post(), do_reorganize_partition_post(), pt_alter_info::entity_name, ER_FAILED, ER_UNEXPECTED, error(), ERROR1, parser_node::info, sm_partition_alter_info::keycol, pt_statement_info::name, NO_ERROR, parser_node::node_type, NULL, pt_name_info::original, PT_ADD_HASHPARTITION, PT_ADD_PARTITION, PT_ALTER, PT_ANALYZE_PARTITION, PT_APPLY_PARTITION, PT_COALESCE_PARTITION, PT_DROP_PARTITION, PT_PROMOTE_PARTITION, PT_REMOVE_PARTITION, PT_REORG_PARTITION, and sm_partition_alter_info::root_op.
Referenced by do_alter_one_clause_with_template().
|
static |
Definition at line 5587 of file execute_schema.c.
References pt_statement_info::alter, pt_alter_info::alter_clause, ARG_FILE_LINE, assert, sm_template::attributes, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_3ARGS_ERROR, classobj_find_cons_primary_key(), classobj_is_pk_referred(), pt_alter_info::code, pt_alter_info::constraint_list, sm_class::constraints, do_check_fk_constraints(), do_check_fk_constraints_internal(), do_coalesce_partition_pre(), do_create_partition(), do_drop_partition_list(), do_get_partition_keycol(), do_promote_partition_list(), do_remove_partition_pre(), do_reorganize_partition_pre(), pt_alter_info::entity_name, ER_ALTER_PARTITIONS_FK_NOT_ALLOWED, ER_ERROR_SEVERITY, ER_FAILED, er_set(), ER_UNEXPECTED, error(), ERROR1, sm_class_constraint::fk_info, sm_attribute::flags, sm_attribute::header, parser_node::info, sm_partition_alter_info::keycol, sm_component::name, pt_statement_info::name, sm_component::next, NO_ERROR, NULL, pt_name_info::original, pt_alter_info::partition, PT_ADD_HASHPARTITION, PT_ADD_PARTITION, PT_ANALYZE_PARTITION, PT_APPLY_PARTITION, PT_COALESCE_PARTITION, PT_DROP_PARTITION, PT_PROMOTE_PARTITION, PT_REMOVE_PARTITION, PT_REORG_PARTITION, sm_partition_alter_info::root_op, sm_partition_alter_info::root_tmpl, SM_ATTFLAG_PARTITION_KEY, and SM_COMPARE_NAMES.
Referenced by do_alter_one_clause_with_template().
int do_alter_user | ( | const PARSER_CONTEXT * | parser, |
const PT_NODE * | statement | ||
) |
Definition at line 2194 of file execute_schema.c.
References pt_statement_info::alter_user, ARG_FILE_LINE, assert, au_set_password(), au_set_user_comment(), CHECK_MODIFICATION_ERROR, pt_alter_user_info::comment, db_find_user(), ER_AU_INVALID_USER, er_errid(), ER_IS_ABORTED_DUE_TO_DEADLOCK, ER_OBJ_INVALID_ARGUMENTS, er_set(), ER_WARNING_SEVERITY, error(), GET_NAME, GET_STRING, parser_node::info, IS_NAME, IS_STRING, NO_ERROR, parser_node::node_type, NULL, pt_alter_user_info::password, PT_VALUE, PT_VALUE_GET_BYTES, tran_abort_upto_system_savepoint(), tran_system_savepoint(), UNIQUE_SAVEPOINT_ALTER_USER_ENTITY, and pt_alter_user_info::user_name.
Referenced by do_execute_statement(), and do_statement().
|
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().
Definition at line 7844 of file execute_schema.c.
References assert_release, do_check_fk_constraints_internal(), ER_FAILED, NULL, and sm_template::partition.
Referenced by dbt_constrain_non_null(), do_alter_clause_change_attribute(), do_alter_one_clause_with_template(), do_alter_partitioning_pre(), do_create_local(), and sm_add_constraint().
|
static |
Definition at line 7737 of file execute_schema.c.
References sm_class_constraint::attributes, pt_foreign_key_info::attrs, pt_statement_info::constraint, sm_class::constraints, sm_template::current, db_attribute_is_non_null(), db_attribute_is_shared(), sm_foreign_key_info::delete_action, pt_foreign_key_info::delete_action, ER_FK_CANT_ON_PARTITION, ER_FK_CANT_ON_SHARED_ATTRIBUTE, ER_FK_MUST_NOT_BE_NOT_NULL, error(), ERROR2, sm_class_constraint::fk_info, pt_constraint_info::foreign_key, parser_node::info, sm_class_constraint::name, sm_template::name, pt_constraint_info::name, pt_statement_info::name, sm_class_constraint::next, parser_node::next, NO_ERROR, NULL, pt_name_info::original, PT_CONSTRAIN_FOREIGN_KEY, PT_RULE_SET_NULL, SM_CONSTRAINT_FOREIGN_KEY, SM_FOREIGN_KEY_SET_NULL, smt_find_attribute(), sm_class_constraint::type, pt_constraint_info::type, pt_constraint_info::un, sm_foreign_key_info::update_action, and pt_foreign_key_info::update_action.
Referenced by do_alter_partitioning_pre(), and do_check_fk_constraints().
int do_check_partitioned_class | ( | DB_OBJECT * | classop, |
int | check_map, | ||
char * | keyattr | ||
) |
Definition at line 4294 of file execute_schema.c.
References ARG_FILE_LINE, CHECK_PARTITION_PARENT, CHECK_PARTITION_SUBS, DB_MAX_IDENTIFIER_LENGTH, ER_ERROR_SEVERITY, ER_NOT_ALLOWED_ACCESS_TO_PARTITION, er_set(), error(), intl_identifier_casecmp(), NO_ERROR, NULL, and sm_partitioned_class_type().
Referenced by db_add_super(), db_create(), db_dput(), db_drop_attribute(), db_drop_class_ex(), db_drop_super(), db_drop_super_connect(), db_grant(), db_put(), db_rename(), db_rename_attribute(), db_rename_class(), db_revoke(), dbt_create_object(), dbt_dput(), dbt_put(), and rs_set_db_value().
Definition at line 14022 of file execute_schema.c.
References ARG_FILE_LINE, assert, cubregex::count(), db_close_session(), db_compile_statement(), db_execute_statement_local(), db_get_class_name(), db_get_errors(), db_get_int(), DB_IS_NULL, db_make_null(), db_open_buffer(), db_query_end(), db_query_first_tuple(), db_query_get_tuple_value(), db_query_set_copy_tplvalue(), db_statement_count(), db_query_type::db_type, DB_TYPE_INTEGER, db_value_clear(), DB_VALUE_DOMAIN_TYPE, er_errid(), ER_ERROR_SEVERITY, er_set(), ER_UNEXPECTED, error(), NO_ERROR, NULL, db_query_result::query_type, and SM_MAX_IDENTIFIER_LENGTH.
Referenced by db_constrain_non_null(), and smt_add_constraint().
|
static |
Definition at line 6147 of file execute_schema.c.
References pt_statement_info::alter, ARG_FILE_LINE, assert, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_3ARGS_ERROR, pt_alter_info::code, COPY_OID, do_redistribute_partitions_data(), pt_alter_info::entity_name, er_errid(), ER_ERROR_SEVERITY, ER_INVALID_PARTITION_REQUEST, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), free_and_init, i, parser_node::info, sm_partition_alter_info::keycol, pt_statement_info::name, NO_ERROR, NULL, vid_oid::oid, db_object::oid_info, pt_name_info::original, sm_partition_alter_info::promoted_count, sm_partition_alter_info::promoted_names, sm_delete_class_mop(), and sm_find_class().
Referenced by do_alter_partitioning_post().
|
static |
Definition at line 6003 of file execute_schema.c.
References adjust_partition_size(), pt_statement_info::alter, pt_alter_info::alter_clause, ARG_FILE_LINE, assert, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_3ARGS_ERROR, COPY_OID, DB_MAX_IDENTIFIER_LENGTH, do_get_partition_size(), do_promote_partition(), er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, ER_PARTITION_WORK_FAILED, er_set(), error(), free_and_init, i, parser_node::info, NO_ERROR, parser_node::node_type, NULL, vid_oid::oid, db_object::oid_info, sm_class::partition, pt_alter_info::partition, PARTITIONED_SUB_CLASS_TAG, sm_partition_alter_info::promoted_count, sm_partition_alter_info::promoted_names, PT_ALTER, sm_partition_alter_info::root_op, sm_partition_alter_info::root_tmpl, sm_ch_name(), and sm_find_class().
Referenced by do_alter_partitioning_pre().
|
static |
Definition at line 9229 of file execute_schema.c.
References sm_constraint_info::asc_desc, sm_class_constraint::asc_desc, assert, sm_class_constraint::attrs_prefix_length, classobj_point_at_att_names(), sm_constraint_info::comment, sm_class_constraint::comment, sm_class::constraints, db_constraint_type(), do_recreate_filter_index_constr(), do_recreate_func_index_constr(), er_errid(), error(), sm_constraint_info::filter_predicate, sm_class_constraint::filter_predicate, free_and_init, sm_constraint_info::func_index_info, sm_class_constraint::func_index_info, if(), sm_constraint_info::index_status, sm_class_constraint::index_status, sm_class_constraint::name, sm_class_constraint::next, NO_ERROR, NULL, sm_constraint_info::prefix_length, sm_add_constraint(), sm_ch_name(), SM_CONSTRAINT_INDEX, SM_CONSTRAINT_REVERSE_INDEX, sm_free_constraint_info(), sm_get_ch_name(), sm_save_constraint_info(), truncate_class_name(), and sm_class_constraint::type.
Referenced by do_create_entity().
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().
int do_create_index | ( | PARSER_CONTEXT * | parser, |
const PT_NODE * | statement | ||
) |
Definition at line 2946 of file execute_schema.c.
References assert, CHECK_MODIFICATION_ERROR, pt_index_info::column_names, pt_index_info::comment, create_or_drop_index_helper(), db_find_class(), DO_INDEX_CREATE, pt_spec_info::entity_name, er_errid(), error(), pt_index_info::func_no_args, pt_index_info::func_pos, pt_index_info::function_expr, ib_thread_count, pt_index_info::ib_threads, pt_statement_info::index, pt_index_info::index_name, pt_index_info::index_status, pt_index_info::indexed_class, parser_node::info, pt_statement_info::name, NO_ERROR, NULL, pt_name_info::original, pt_index_info::prefix_length, pt_index_info::reverse, SM_ONLINE_INDEX_BUILDING_IN_PROGRESS, pt_statement_info::spec, pt_index_info::unique, and pt_index_info::where.
Referenced by do_alter_clause_add_index(), do_create_entity(), do_execute_statement(), and do_statement().
int do_create_local | ( | PARSER_CONTEXT * | parser, |
DB_CTMPL * | ctemplate, | ||
PT_NODE * | pt_node, | ||
DB_QUERY_TYPE * | create_select_columns | ||
) |
Definition at line 8308 of file execute_schema.c.
References pt_create_entity_info::as_query_list, pt_create_entity_info::attr_def_list, sm_template::attributes, pt_create_entity_info::class_attr_def_list, pt_create_entity_info::constraint_list, pt_statement_info::create_entity, do_add_attributes(), do_add_constraints(), do_add_method_files(), do_add_methods(), do_add_queries(), do_add_resolutions(), do_add_supers(), do_check_fk_constraints(), do_set_object_id(), error(), sm_attribute::flags, sm_attribute::header, parser_node::info, pt_partition_info::keycol, pt_create_entity_info::method_def_list, pt_create_entity_info::method_file_list, sm_component::name, pt_statement_info::name, sm_component::next, NO_ERROR, NULL, pt_create_entity_info::object_id_list, pt_name_info::original, pt_statement_info::partition, pt_create_entity_info::partition_info, pt_create_entity_info::resolution_list, SM_ATTFLAG_PARTITION_KEY, SM_COMPARE_NAMES, and pt_create_entity_info::supclass_list.
Referenced by do_create_entity(), and do_create_partition().
|
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().
|
static |
Definition at line 5341 of file execute_schema.c.
References pt_statement_info::alter, pt_alter_info::alter_clause, ARG_FILE_LINE, assert, sm_class_constraint::attributes, sm_class_constraint::attrs_prefix_length, au_fetch_class(), AU_FETCH_READ, AU_SELECT, classobj_find_cons_index2_col_type_list(), cleanup(), pt_alter_info::code, sm_class_constraint::comment, db_constraint_type(), DB_IS_CONSTRAINT_REVERSE_INDEX_FAMILY, pt_name_info::db_object, do_recreate_func_index_constr(), er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, ER_PARTITION_WORK_FAILED, er_set(), error(), sm_class_constraint::filter_predicate, parser_node::flag, free_and_init, sm_class_constraint::func_index_info, i, if(), sm_class_constraint::index_status, parser_node::info, tp_domain::is_desc, sm_class_constraint::name, pt_parts_info::name, pt_statement_info::name, tp_domain::next, db_objlist::next, parser_node::next, NO_ERROR, NULL, vid_oid::oid, db_object::oid_info, db_objlist::op, sm_class::partition, pt_alter_info::partition, parser_node::partition_pruned, pt_statement_info::parts, PT_ADD_HASHPARTITION, PT_ADD_PARTITION, PT_REORG_PARTITION, sm_partition_alter_info::root_op, sm_add_constraint(), sm_ch_name(), sm_free_function_index_info(), sm_save_function_index_info(), sm_class_constraint::type, and sm_class::users.
Referenced by do_create_partition_constraints().
|
static |
Definition at line 5298 of file execute_schema.c.
References assert, CHECK_3ARGS_ERROR, sm_class::constraints, do_create_partition_constraint(), er_errid(), error(), sm_class_constraint::next, NO_ERROR, NULL, sm_partition_alter_info::root_op, SM_CONSTRAINT_INDEX, SM_CONSTRAINT_REVERSE_INDEX, sm_get_class_with_statistics(), and sm_class_constraint::type.
Referenced by do_alter_partitioning_post().
int do_create_user | ( | const PARSER_CONTEXT * | parser, |
const PT_NODE * | statement | ||
) |
Definition at line 1916 of file execute_schema.c.
References ARG_FILE_LINE, assert, AU_PUBLIC_USER_NAME, au_set_password(), au_set_user_comment(), CHECK_MODIFICATION_ERROR, pt_create_user_info::comment, pt_statement_info::create_user, db_add_member(), db_add_user(), db_find_user(), ER_AU_INVALID_USER, ER_AU_MEMBER_CAUSES_CYCLES, ER_AU_MISSING_OR_INVALID_USER, ER_AU_USER_EXISTS, er_errid(), ER_IS_ABORTED_DUE_TO_DEADLOCK, ER_OBJ_INVALID_ARGUMENTS, er_set(), ER_WARNING_SEVERITY, error(), GET_NAME, GET_STRING, pt_create_user_info::groups, parser_node::info, intl_identifier_casecmp(), IS_NAME, IS_STRING, pt_create_user_info::members, pt_statement_info::name, parser_node::next, NO_ERROR, parser_node::node_type, NULL, pt_name_info::original, pt_create_user_info::password, PT_NAME, PT_VALUE, PT_VALUE_GET_BYTES, tran_abort_upto_system_savepoint(), tran_system_savepoint(), UNIQUE_SAVEPOINT_CREATE_USER_ENTITY, and pt_create_user_info::user_name.
Referenced by do_execute_statement(), and do_statement().
int do_drop | ( | PARSER_CONTEXT * | parser, |
PT_NODE * | statement | ||
) |
Definition at line 2314 of file execute_schema.c.
References ARG_FILE_LINE, CHECK_MODIFICATION_ERROR, do_is_partitioned_subclass(), pt_statement_info::drop, drop_class_name(), er_errid(), ER_ERROR_SEVERITY, ER_INVALID_PARTITION_REQUEST, ER_LK_UNILATERALLY_ABORTED, er_set(), error(), pt_spec_info::flat_entity_list, parser_node::info, pt_drop_info::is_cascade_constraints, pt_statement_info::name, parser_node::next, NO_ERROR, NULL, pt_name_info::original, pt_statement_info::spec, pt_drop_info::spec_list, tran_abort_upto_system_savepoint(), tran_system_savepoint(), and UNIQUE_SAVEPOINT_DROP_ENTITY.
Referenced by do_execute_statement(), and do_statement().
|
static |
Definition at line 13514 of file execute_schema.c.
References sm_constraint_info::att_names, sm_constraint_info::constraint_type, DB_CONSTRAINT_INDEX, DB_CONSTRAINT_REVERSE_INDEX, error(), sm_constraint_info::name, sm_constraint_info::next, NO_ERROR, NULL, sm_drop_constraint(), sm_drop_index(), and SM_IS_CONSTRAINT_UNIQUE_FAMILY.
Referenced by do_alter_clause_change_attribute().
int do_drop_index | ( | PARSER_CONTEXT * | parser, |
const PT_NODE * | statement | ||
) |
Definition at line 2991 of file execute_schema.c.
References assert, CHECK_MODIFICATION_ERROR, pt_index_info::column_names, create_or_drop_index_helper(), DB_CONSTRAINT_INDEX, db_find_class(), DO_INDEX_DROP, er_errid(), ER_SM_INVALID_DEF_CONSTRAINT_NAME_PARAMS, pt_spec_info::flat_entity_list, pt_index_info::func_no_args, pt_index_info::func_pos, pt_index_info::function_expr, get_index_type_qualifiers(), get_reverse_unique_index_type(), pt_statement_info::index, pt_index_info::index_name, pt_index_info::index_status, pt_index_info::indexed_class, parser_node::info, pt_statement_info::name, NO_ERROR, NULL, pt_name_info::original, pt_name_info::resolved, pt_index_info::reverse, pt_statement_info::spec, and pt_index_info::unique.
Referenced by do_execute_statement(), and do_statement().
Definition at line 5172 of file execute_schema.c.
References adjust_partition_range(), adjust_partition_size(), ARG_FILE_LINE, assert, au_fetch_class(), AU_FETCH_READ, AU_SELECT, sm_class_header::ch_name, COPY_OID, DB_MAX_IDENTIFIER_LENGTH, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_INVALID_PARTITION_REQUEST, ER_OUT_OF_VIRTUAL_MEMORY, ER_PARTITION_NOT_EXIST, er_set(), error(), free_and_init, sm_class::header, i, parser_node::info, pt_statement_info::name, parser_node::next, NO_ERROR, NULL, vid_oid::oid, db_object::oid_info, pt_name_info::original, sm_class::partition, PARTITIONED_SUB_CLASS_TAG, sm_ch_name(), sm_delete_class_mop(), sm_find_class(), and sm_class::users.
Referenced by do_alter_partitioning_pre().
Definition at line 4488 of file execute_schema.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_MODIFICATION_ERROR, ER_ERROR_SEVERITY, ER_FAILED, ER_NOT_ALLOWED_ACCESS_TO_PARTITION, er_set(), error(), db_objlist::next, NO_ERROR, NULL, db_objlist::op, sm_class::partition, sm_delete_class_mop(), and sm_class::users.
Referenced by sm_delete_class_mop().
|
static |
Definition at line 15229 of file execute_schema.c.
References sm_constraint_info::att_names, sm_constraint_info::constraint_type, error(), sm_constraint_info::name, sm_constraint_info::next, NO_ERROR, NULL, sm_drop_constraint(), sm_drop_index(), and SM_IS_CONSTRAINT_EXCEPT_INDEX_FAMILY.
Referenced by do_redistribute_partitions_data().
int do_drop_user | ( | const PARSER_CONTEXT * | parser, |
const PT_NODE * | statement | ||
) |
Definition at line 2136 of file execute_schema.c.
References ARG_FILE_LINE, assert, CHECK_MODIFICATION_ERROR, pt_statement_info::create_user, db_drop_user(), db_find_user_to_drop(), ER_AU_INVALID_USER, ER_IS_ABORTED_DUE_TO_DEADLOCK, ER_OBJ_INVALID_ARGUMENTS, er_set(), ER_WARNING_SEVERITY, error(), GET_NAME, parser_node::info, IS_NAME, NO_ERROR, NULL, tran_abort_upto_system_savepoint(), tran_system_savepoint(), UNIQUE_SAVEPOINT_DROP_USER_ENTITY, and pt_create_user_info::user_name.
Referenced by do_execute_statement(), and do_statement().
|
static |
Definition at line 4754 of file execute_schema.c.
References ARG_FILE_LINE, assert, AUTO_INCREMENT_SERIAL_NAME_EXTRA_LENGTH, CT_SERIAL_NAME, do_get_serial_obj_id(), ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, ER_QPROC_DB_SERIAL_NOT_FOUND, ER_QPROC_SERIAL_NOT_FOUND, er_set(), error(), free_and_init, NO_ERROR, NULL, SET_AUTO_INCREMENT_SERIAL_NAME, sm_find_class(), and strlen.
int do_get_partition_keycol | ( | char * | keycol, |
MOP | class_ | ||
) |
Definition at line 5113 of file execute_schema.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, db_get_string(), DB_IS_NULL, db_make_null(), DB_MAX_IDENTIFIER_LENGTH, ER_ERROR_SEVERITY, ER_INVALID_PARTITION_REQUEST, er_set(), error(), NO_ERROR, NULL, sm_class::partition, set_get_element_nocopy(), and sm_partition::values.
Referenced by build_attr_change_map(), do_alter_partitioning_post(), and do_alter_partitioning_pre().
Definition at line 4345 of file execute_schema.c.
References assert, assert_release, AU_DISABLE, AU_ENABLE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, ER_FAILED, error(), sm_class::inheritance, db_objlist::next, NO_ERROR, NULL, db_objlist::op, sm_class::partition, and sm_class::users.
Referenced by do_reclaim_class_addresses(), emit_index_def(), and sm_partitioned_class_type().
int do_get_partition_size | ( | MOP | class_ | ) |
Definition at line 5065 of file execute_schema.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, db_value::data, db_make_null(), ER_ERROR_SEVERITY, ER_FAILED, ER_INVALID_PARTITION_REQUEST, er_set(), error(), db_data::i, NO_ERROR, NULL, sm_class::partition, set_get_element_nocopy(), and sm_partition::values.
Referenced by do_coalesce_partition_pre(), and do_create_partition().
int do_grant | ( | const PARSER_CONTEXT * | parser, |
const PT_NODE * | statement | ||
) |
Definition at line 1747 of file execute_schema.c.
References assert, pt_grant_info::auth_cmd_list, CHECK_MODIFICATION_ERROR, db_find_class(), db_find_user(), db_grant(), er_errid(), ER_IS_ABORTED_DUE_TO_DEADLOCK, error(), pt_spec_info::flat_entity_list, pt_statement_info::grant, pt_grant_info::grant_option, parser_node::info, pt_statement_info::name, parser_node::next, NO_ERROR, NULL, pt_name_info::original, pt_auth_to_db_auth(), PT_GRANT_OPTION, pt_statement_info::spec, pt_grant_info::spec_list, tran_abort_upto_system_savepoint(), tran_system_savepoint(), UNIQUE_SAVEPOINT_GRANT_USER, and pt_grant_info::user_list.
Referenced by do_execute_statement(), and do_statement().
int do_is_partitioned_subclass | ( | int * | is_partitioned, |
const char * | classname, | ||
char * | keyattr | ||
) |
Definition at line 4415 of file execute_schema.c.
References au_fetch_class(), AU_FETCH_READ, AU_SELECT, db_find_class(), db_get_string(), DB_IS_NULL, DB_MAX_IDENTIFIER_LENGTH, NO_ERROR, NULL, sm_attr_properties_chg::p, sm_class::partition, sm_partition::pname, set_get_element_nocopy(), strlen, and sm_partition::values.
Referenced by db_create_by_name(), do_create_entity(), do_drop(), do_rename_internal(), do_truncate(), emit_index_def(), emit_schema(), emit_superclasses(), and pt_check_alter().
|
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().
|
static |
Definition at line 6663 of file execute_schema.c.
References ARG_FILE_LINE, assert, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_2ARGS_ERROR, DB_MAX_IDENTIFIER_LENGTH, do_promote_partition(), er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), NO_ERROR, NULL, PARTITIONED_SUB_CLASS_TAG, sm_find_class(), strdup(), and strlen.
Referenced by do_reorganize_partition_pre().
|
static |
Definition at line 6514 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, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_3ARGS_ERROR, classobj_free_partition_info(), COPY_OID, DB_MAX_IDENTIFIER_LENGTH, do_promote_partition(), do_recreate_renamed_class_indexes(), er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_INVALID_PARTITION_REQUEST, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), free_and_init, parser_node::info, pt_statement_info::name, db_objlist::next, parser_node::next, NO_ERROR, NULL, vid_oid::oid, db_object::oid_info, db_objlist::op, pt_name_info::original, sm_class::partition, sm_template::partition, pt_alter_info::partition, PARTITIONED_SUB_CLASS_TAG, sm_partition_alter_info::root_op, sm_partition_alter_info::root_tmpl, sm_ch_name(), sm_find_class(), and sm_class::users.
Referenced by do_alter_partitioning_pre().
|
static |
Definition at line 13555 of file execute_schema.c.
References sm_constraint_info::asc_desc, sm_constraint_info::att_names, sm_constraint_info::comment, sm_constraint_info::constraint_type, error(), sm_constraint_info::filter_predicate, sm_constraint_info::func_index_info, sm_constraint_info::index_status, sm_constraint_info::name, sm_constraint_info::next, NO_ERROR, NULL, sm_constraint_info::prefix_length, sm_add_constraint(), and SM_IS_CONSTRAINT_INDEX_FAMILY.
Referenced by do_alter_clause_change_attribute().
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().
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 | ||
) |
Definition at line 14335 of file execute_schema.c.
References pt_statement_info::alter, ARG_FILE_LINE, sm_function_info::attr_index_start, sm_function_info::col_id, db_ws_free(), DO_INDEX_CREATE, pt_alter_info::entity_name, pt_spec_info::entity_name, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), sm_function_info::expr_str, free_and_init, pt_select_info::from, sm_constraint_info::func_index_info, parser_node::info, pt_select_info::list, pt_statement_info::name, parser_node::next, NO_ERROR, parser_node::node_type, NULL, pt_name_info::original, parser_create_parser(), parser_free_parser(), parser_free_tree(), parser_parse_string_use_sys_charset(), parser_walk_tree(), PT_ALTER, pt_enter_packing_buf(), pt_exit_packing_buf(), pt_has_error, pt_is_function_index_expr(), pt_name(), pt_node_to_function_index(), pt_replace_names_index_expr(), pt_resolve_names(), pt_semantic_type(), pt_query_info::q, pt_statement_info::query, replace_names_alter_chg_attr(), pt_query_info::select, sm_free_function_index_info(), pt_statement_info::spec, and strlen.
Referenced by do_alter_clause_change_attribute(), do_copy_indexes(), do_create_partition_constraint(), do_recreate_renamed_class_indexes(), sm_add_secondary_index_on_partition(), and sm_exist_index().
|
static |
Definition at line 9086 of file execute_schema.c.
References assert, au_fetch_class(), AU_FETCH_READ, sm_class::class_type, sm_class::constraints, DB_AUTH_SELECT, db_find_class(), do_recreate_filter_index_constr(), do_recreate_func_index_constr(), er_errid(), ER_OBJ_NOT_A_CLASS, error(), sm_class_constraint::filter_predicate, sm_class_constraint::func_index_info, sm_constraint_info::next, sm_class_constraint::next, NO_ERROR, NULL, sm_add_constraint(), sm_ch_name(), SM_CLASS_CT, SM_CONSTRAINT_INDEX, SM_CONSTRAINT_REVERSE_INDEX, SM_CONSTRAINT_REVERSE_UNIQUE, SM_CONSTRAINT_UNIQUE, sm_drop_constraint(), sm_drop_index(), sm_free_constraint_info(), SM_IS_CONSTRAINT_UNIQUE_FAMILY, sm_save_constraint_info(), and sm_class_constraint::type.
Referenced by do_alter_clause_rename_entity(), do_promote_partition_list(), and do_rename().
|
static |
Definition at line 15267 of file execute_schema.c.
References sm_constraint_info::asc_desc, sm_constraint_info::att_names, sm_constraint_info::comment, sm_constraint_info::constraint_type, error(), sm_constraint_info::filter_predicate, sm_constraint_info::func_index_info, sm_constraint_info::index_status, sm_constraint_info::name, sm_constraint_info::next, NO_ERROR, NULL, sm_constraint_info::prefix_length, sm_add_constraint(), and SM_IS_CONSTRAINT_INDEX_FAMILY.
Referenced by do_redistribute_partitions_data().
|
static |
Definition at line 4633 of file execute_schema.c.
References ARG_FILE_LINE, assert, COPY_OID, db_compile_and_execute_local(), db_query_end(), do_drop_saved_indexes(), do_recreate_saved_indexes(), do_save_all_indexes(), er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), free_and_init, i, locator_redistribute_partition_data(), NO_ERROR, NULL, vid_oid::oid, db_object::oid_info, PT_REORG_PARTITION, sm_find_class(), sm_free_constraint_info(), and strlen.
Referenced by do_alter_partitioning_post(), do_coalesce_partition_post(), do_remove_partition_post(), and do_reorganize_partition_post().
|
static |
Definition at line 5946 of file execute_schema.c.
References pt_statement_info::alter, assert, CHECK_3ARGS_ERROR, pt_alter_info::code, do_redistribute_partitions_data(), pt_alter_info::entity_name, er_errid(), error(), i, parser_node::info, sm_partition_alter_info::keycol, pt_statement_info::name, NO_ERROR, NULL, pt_name_info::original, sm_partition_alter_info::promoted_count, sm_partition_alter_info::promoted_names, sm_delete_class_mop(), and sm_find_class().
Referenced by do_alter_partitioning_post().
|
static |
Definition at line 5829 of file execute_schema.c.
References ARG_FILE_LINE, assert, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_3ARGS_ERROR, classobj_free_partition_info(), do_promote_partition(), ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, ER_PARTITION_WORK_FAILED, er_set(), error(), free_and_init, i, db_objlist::next, NO_ERROR, parser_node::node_type, NULL, db_objlist::op, sm_class::partition, sm_template::partition, sm_partition_alter_info::promoted_count, sm_partition_alter_info::promoted_names, PT_ALTER, sm_partition_alter_info::root_op, sm_partition_alter_info::root_tmpl, sm_ch_name(), strdup(), strlen, and sm_class::users.
Referenced by do_alter_partitioning_pre().
int do_rename | ( | const PARSER_CONTEXT * | parser, |
const PT_NODE * | statement | ||
) |
Definition at line 2587 of file execute_schema.c.
References acquire_locks_for_multiple_rename(), CHECK_MODIFICATION_ERROR, do_recreate_renamed_class_indexes(), do_rename_internal(), ER_LK_UNILATERALLY_ABORTED, error(), parser_node::info, pt_statement_info::name, pt_rename_info::new_name, parser_node::next, NO_ERROR, NULL, pt_rename_info::old_name, pt_name_info::original, pt_statement_info::rename, tran_abort_upto_system_savepoint(), tran_system_savepoint(), and UNIQUE_SAVEPOINT_RENAME.
Referenced by do_execute_statement(), and do_statement().
Definition at line 2640 of file execute_schema.c.
References ARG_FILE_LINE, assert, db_find_class(), db_rename_class(), do_is_partitioned_subclass(), er_errid(), ER_ERROR_SEVERITY, ER_INVALID_PARTITION_REQUEST, er_set(), NO_ERROR, and NULL.
Referenced by do_alter_clause_rename_entity(), and do_rename().
Definition at line 4561 of file execute_schema.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, ER_ERROR_SEVERITY, ER_FAILED, ER_PARTITION_WORK_FAILED, er_set(), error(), db_objlist::next, NO_ERROR, NULL, db_objlist::op, sm_class::partition, PARTITION_VARCHAR_LEN, PARTITIONED_SUB_CLASS_TAG, sm_ch_name(), sm_rename_class(), strlen, and sm_class::users.
Referenced by sm_rename_class().
|
static |
Definition at line 6366 of file execute_schema.c.
References pt_statement_info::alter, pt_alter_info::alter_clause, assert, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_2ARGS_ERROR, CHECK_3ARGS_ERROR, pt_alter_info::code, pt_name_info::db_object, do_redistribute_partitions_data(), pt_alter_info::entity_name, er_errid(), error(), parser_node::flag, i, parser_node::info, sm_partition_alter_info::keycol, pt_statement_info::name, db_objlist::next, parser_node::next, NO_ERROR, NULL, db_objlist::op, pt_name_info::original, pt_alter_info::partition, parser_node::partition_pruned, sm_partition_alter_info::promoted_count, sm_partition_alter_info::promoted_names, sm_partition_alter_info::root_op, sm_delete_class_mop(), sm_find_class(), sm_update_statistics(), STATS_WITH_SAMPLING, and sm_class::users.
Referenced by do_alter_partitioning_post().
|
static |
Definition at line 6253 of file execute_schema.c.
References pt_statement_info::alter, pt_alter_info::alter_clause, ARG_FILE_LINE, assert, CHECK_3ARGS_ERROR, do_create_partition(), do_promote_partition_by_name(), pt_alter_info::entity_name, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), free_and_init, i, parser_node::info, intl_identifier_casecmp(), pt_statement_info::name, parser_node::next, NO_ERROR, parser_node::node_type, NULL, pt_name_info::original, pt_alter_info::partition, sm_partition_alter_info::promoted_count, sm_partition_alter_info::promoted_names, and PT_ALTER.
Referenced by do_alter_partitioning_pre().
int do_revoke | ( | const PARSER_CONTEXT * | parser, |
const PT_NODE * | statement | ||
) |
Definition at line 1836 of file execute_schema.c.
References assert, pt_revoke_info::auth_cmd_list, CHECK_MODIFICATION_ERROR, db_find_class(), db_find_user(), db_revoke(), er_errid(), ER_IS_ABORTED_DUE_TO_DEADLOCK, error(), pt_spec_info::flat_entity_list, parser_node::info, pt_statement_info::name, parser_node::next, NO_ERROR, NULL, pt_name_info::original, pt_auth_to_db_auth(), pt_statement_info::revoke, pt_statement_info::spec, pt_revoke_info::spec_list, tran_abort_upto_system_savepoint(), tran_system_savepoint(), UNIQUE_SAVEPOINT_REVOKE_USER, and pt_revoke_info::user_list.
Referenced by do_execute_statement(), and do_statement().
|
static |
Definition at line 14148 of file execute_schema.c.
References assert, db_close_session(), db_compile_statement(), db_execute_statement_local(), db_free_query(), db_get_errors(), db_get_parser(), db_open_buffer(), db_statement_count(), er_errid(), error(), parser_context::execution_values, lang_set_parser_use_client_charset(), NO_ERROR, NULL, execution_state_values::row_count, sm_touch_class(), tr_get_execution_state(), and tr_set_execution_state().
Referenced by do_alter_clause_change_attribute(), do_run_update_query_for_new_default_expression_fields(), and do_run_update_query_for_new_notnull_fields().
|
static |
Definition at line 13169 of file execute_schema.c.
References pt_statement_info::alter, assert, pt_statement_info::attr_def, pt_attr_def_info::attr_name, pt_attr_def_info::data_default, pt_statement_info::data_default, DB_MAX_IDENTIFIER_LENGTH, pt_data_default_info::default_value, do_run_update_query_for_class(), pt_alter_info::entity_name, ER_OUT_OF_VIRTUAL_MEMORY, ER_UNEXPECTED, error(), ERROR1, free_and_init, parser_node::info, pt_statement_info::name, parser_node::next, NO_ERROR, NULL, pt_name_info::original, parser_print_tree(), and QUERY_MAX_SIZE.
Referenced by do_update_new_cols_with_default_expression().
|
static |
Definition at line 13079 of file execute_schema.c.
References pt_statement_info::alter, assert, pt_statement_info::attr_def, pt_attr_def_info::attr_name, DB_MAX_IDENTIFIER_LENGTH, do_run_update_query_for_class(), pt_alter_info::entity_name, ER_OUT_OF_VIRTUAL_MEMORY, ER_UNEXPECTED, error(), ERROR1, free_and_init, get_hard_default_for_type(), parser_node::info, pt_statement_info::name, parser_node::next, NO_ERROR, NULL, pt_name_info::original, QUERY_MAX_SIZE, and parser_node::type_enum.
Referenced by do_update_new_notnull_cols_without_default().
|
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().
|
static |
Definition at line 15165 of file execute_schema.c.
References assert, au_fetch_class(), AU_FETCH_READ, sm_class::class_type, sm_class::constraints, DB_AUTH_SELECT, DB_CONSTRAINT_NOT_NULL, error(), sm_constraint_info::next, sm_class_constraint::next, NO_ERROR, NULL, SM_CLASS_CT, sm_save_constraint_info(), and sm_class_constraint::type.
Referenced by do_redistribute_partitions_data().
int do_set_object_id | ( | const PARSER_CONTEXT * | parser, |
DB_CTMPL * | ctemplate, | ||
PT_NODE * | object_id_list | ||
) |
Definition at line 8266 of file execute_schema.c.
References db_namelist_append(), db_namelist_free(), dbt_set_object_id(), error(), parser_node::info, pt_statement_info::name, parser_node::next, NO_ERROR, NULL, and pt_name_info::original.
Referenced by do_create_local().
int do_truncate | ( | PARSER_CONTEXT * | parser, |
PT_NODE * | statement | ||
) |
Definition at line 9397 of file execute_schema.c.
References ARG_FILE_LINE, CHECK_MODIFICATION_ERROR, do_is_partitioned_subclass(), ER_ERROR_SEVERITY, ER_INVALID_PARTITION_REQUEST, ER_LK_UNILATERALLY_ABORTED, er_set(), error(), pt_spec_info::flat_entity_list, parser_node::info, pt_statement_info::name, parser_node::next, NO_ERROR, NULL, pt_name_info::original, pt_truncate_info::spec, pt_statement_info::spec, tran_abort_upto_system_savepoint(), tran_system_savepoint(), pt_statement_info::truncate, truncate_class_name(), and UNIQUE_SAVEPOINT_TRUNCATE.
Referenced by do_execute_statement(), and do_statement().
|
static |
Definition at line 13407 of file execute_schema.c.
References pt_statement_info::alter, pt_alter_info::alter_clause, assert, pt_statement_info::attr_def, pt_alter_info::attr_mthd, pt_alter_info::code, pt_attr_def_info::data_default, db_class_has_instance(), DB_DEFAULT_NONE, db_is_class(), db_default_expr::default_expr_type, do_run_update_query_for_new_default_expression_fields(), ER_OUT_OF_VIRTUAL_MEMORY, error(), ERROR0, parser_node::info, parser_node::next, NO_ERROR, parser_node::node_type, NULL, parser_append_node(), parser_copy_tree(), parser_free_tree(), PT_ADD_ATTR_MTHD, PT_ALTER, and pt_get_default_expression_from_data_default_node().
Referenced by do_alter_one_clause_with_template().
|
static |
Definition at line 13306 of file execute_schema.c.
References pt_statement_info::alter, pt_alter_info::alter_clause, assert, pt_statement_info::attr_def, pt_alter_info::attr_mthd, pt_attr_def_info::attr_name, pt_alter_info::code, pt_attr_def_info::constrain_not_null, pt_attr_def_info::data_default, db_class_has_instance(), do_run_update_query_for_new_notnull_fields(), pt_alter_info::entity_name, ER_NOTNULL_ON_TYPE_WITHOUT_DEFAULT_VALUE, ER_OUT_OF_VIRTUAL_MEMORY, ER_SM_ATTR_NOT_NULL, error(), ERROR0, ERROR1, get_hard_default_for_type(), parser_node::info, is_attribute_primary_key(), pt_statement_info::name, parser_node::next, NO_ERROR, parser_node::node_type, NULL, pt_name_info::original, parser_append_node(), parser_copy_tree(), parser_free_tree(), prm_get_bool_value(), PRM_ID_ADD_COLUMN_UPDATE_HARD_DEFAULT, PT_ADD_ATTR_MTHD, PT_ALTER, pt_show_type_enum(), and parser_node::type_enum.
Referenced by do_alter_one_clause_with_template().
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().
|
static |
Definition at line 8489 of file execute_schema.c.
References assert, create_select_to_insert_into(), do_statement(), er_errid(), ER_FAILED, error(), mq_translate(), NO_ERROR, NULL, parser_copy_tree(), parser_free_tree(), pt_compile(), pt_copy_statement_flags(), pt_free_statement_xasl_id(), pt_has_error, pt_report_to_ersys_with_statement(), and PT_SEMANTIC.
Referenced by do_create_entity().
|
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().
|
static |
Definition at line 12599 of file execute_schema.c.
References pt_attr_ordering_info::after, assert, pt_statement_info::attr_def, pt_statement_info::attr_ordering, pt_attr_ordering_info::first, parser_node::info, pt_statement_info::name, NO_ERROR, parser_node::node_type, NULL, pt_attr_def_info::ordering_info, pt_name_info::original, PT_ATTR_DEF, PT_ATTR_ORDERING, and PT_NAME.
Referenced by do_add_attribute(), and do_change_att_schema_only().
Definition at line 6978 of file execute_schema.c.
References parser_node::alias_print, pt_statement_info::attr_def, pt_attr_def_info::attr_name, parser_node::info, pt_statement_info::name, and pt_name_info::original.
Referenced by build_attr_change_map(), check_change_attribute(), do_add_attribute(), do_add_attributes(), do_alter_change_col_comment(), do_change_att_schema_only(), get_attribute_with_name(), and replace_names_alter_chg_attr().
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().
|
static |
Definition at line 12984 of file execute_schema.c.
References NULL, PT_TYPE_BIGINT, PT_TYPE_BIT, PT_TYPE_BLOB, PT_TYPE_CHAR, PT_TYPE_CLOB, PT_TYPE_COMPOUND, PT_TYPE_DATE, PT_TYPE_DATETIME, PT_TYPE_DATETIMELTZ, PT_TYPE_DATETIMETZ, PT_TYPE_DOUBLE, PT_TYPE_ELO, PT_TYPE_FLOAT, PT_TYPE_INTEGER, PT_TYPE_JSON, PT_TYPE_LOGICAL, PT_TYPE_MAYBE, PT_TYPE_MIDXKEY, PT_TYPE_MONETARY, PT_TYPE_MULTISET, PT_TYPE_NA, PT_TYPE_NCHAR, PT_TYPE_NONE, PT_TYPE_NULL, PT_TYPE_NUMERIC, PT_TYPE_OBJECT, PT_TYPE_RESULTSET, PT_TYPE_SEQUENCE, PT_TYPE_SET, PT_TYPE_SMALLINT, PT_TYPE_STAR, PT_TYPE_TIME, PT_TYPE_TIMESTAMP, PT_TYPE_TIMESTAMPLTZ, PT_TYPE_TIMESTAMPTZ, PT_TYPE_VARBIT, PT_TYPE_VARCHAR, and PT_TYPE_VARNCHAR.
Referenced by check_att_chg_allowed(), do_alter_clause_change_attribute(), do_run_update_query_for_new_notnull_fields(), and do_update_new_notnull_cols_without_default().
|
static |
Definition at line 14892 of file execute_schema.c.
References ARG_FILE_LINE, classobj_find_constraint_by_name(), ER_ERROR_SEVERITY, ER_FAILED, er_set(), ER_SM_CONSTRAINT_HAS_DIFFERENT_TYPE, ER_SM_NO_INDEX, NO_ERROR, NULL, sm_class_constraints(), SM_CONSTRAINT_INDEX, SM_CONSTRAINT_REVERSE_INDEX, SM_CONSTRAINT_REVERSE_UNIQUE, SM_CONSTRAINT_UNIQUE, SM_IS_INDEX_FAMILY, and sm_class_constraint::type.
Referenced by do_alter_clause_drop_index(), and do_drop_index().
|
static |
Definition at line 2667 of file execute_schema.c.
References DB_CONSTRAINT_INDEX, DB_CONSTRAINT_REVERSE_INDEX, DB_CONSTRAINT_REVERSE_UNIQUE, and DB_CONSTRAINT_UNIQUE.
Referenced by create_or_drop_index_helper(), do_alter_clause_drop_index(), do_alter_index_rebuild(), and do_drop_index().
int ib_get_thread_count | ( | ) |
Definition at line 15379 of file execute_schema.c.
References ib_thread_count.
Referenced by btree_load_index().
|
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().
Definition at line 12553 of file execute_schema.c.
Referenced by build_att_coll_change_map(), build_attr_change_map(), check_att_chg_allowed(), check_change_attribute(), do_alter_clause_change_attribute(), do_change_att_schema_only(), and is_att_change_needed().
|
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().
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().
|
static |
Definition at line 7388 of file execute_schema.c.
References PT_RULE_CASCADE, PT_RULE_NO_ACTION, PT_RULE_RESTRICT, PT_RULE_SET_NULL, SM_FOREIGN_KEY_CASCADE, SM_FOREIGN_KEY_NO_ACTION, SM_FOREIGN_KEY_RESTRICT, and SM_FOREIGN_KEY_SET_NULL.
Referenced by add_foreign_key().
|
static |
Definition at line 14237 of file execute_schema.c.
References ARG_FILE_LINE, pt_sort_spec_info::asc_or_desc, assert, parser_context::custom_print, parser_node::data_type, db_ws_alloc(), db_ws_free(), DO_INDEX_CREATE, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), pt_sort_spec_info::expr, sm_function_info::expr_str, sm_function_info::expr_stream, sm_function_info::expr_stream_size, sm_function_info::fi_domain, parser_node::info, tp_domain::is_desc, parser_node::node_type, NULL, parser_print_tree_with_quotes(), PT_ASC, PT_CHARSET_COLLATE_FULL, pt_data_type_to_db_domain(), PT_SORT_SPEC, pt_to_func_pred(), pt_type_enum_to_db_domain(), sm_free_function_index_info(), pt_statement_info::sort_spec, strdup(), strlen, tp_domain_cache(), parser_node::type_enum, and xts_map_func_pred_to_stream().
Referenced by compile_partition_expression(), create_or_drop_index_helper(), and do_recreate_func_index_constr().
|
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().
|
static |
Definition at line 14852 of file execute_schema.c.
References pt_dot_info::arg1, pt_statement_info::dot, parser_node::info, parser_node::next, parser_node::node_type, NULL, parser_free_tree(), PT_CONTINUE_WALK, PT_DOT_, PT_IS_NAME_NODE, and pt_name().
Referenced by do_recreate_filter_index_constr(), and do_recreate_func_index_constr().
|
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().
|
static |
Definition at line 14790 of file execute_schema.c.
References pt_statement_info::alter, pt_alter_info::alter_clause, pt_dot_info::arg2, assert, pt_alter_info::attr_mthd, pt_statement_info::dot, get_attr_name(), parser_node::info, intl_identifier_casecmp(), pt_statement_info::name, parser_node::next, parser_node::node_type, NULL, pt_name_info::original, parser_free_tree(), PT_ALTER, PT_CONTINUE_WALK, PT_DOT_, PT_IS_NAME_NODE, pt_name(), and PT_STOP_WALK.
Referenced by do_recreate_filter_index_constr(), and do_recreate_func_index_constr().
|
static |
Definition at line 12568 of file execute_schema.c.
References assert, ATT_CHG_PROPERTY_NOT_CHECKED, sm_attr_properties_chg::att_id, sm_attr_properties_chg::class_has_subclass, sm_attr_properties_chg::constr_info, i, ID_NULL, sm_attr_properties_chg::name_space, sm_attr_properties_chg::new_constr_info, sm_attr_properties_chg::new_name_space, NULL, NUM_ATT_CHG_PROP, and sm_attr_properties_chg::p.
Referenced by do_alter_clause_change_attribute().
|
static |
Definition at line 13930 of file execute_schema.c.
References ARG_FILE_LINE, assert, sm_constraint_info::att_names, pt_statement_info::constraint, sm_constraint_info::constraint_type, DB_CONSTRAINT_NOT_NULL, DB_CONSTRAINT_PRIMARY_KEY, DB_CONSTRAINT_UNIQUE, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), ER_UNEXPECTED, parser_node::info, sm_constraint_info::name, pt_statement_info::name, sm_constraint_info::next, parser_node::next, NO_ERROR, parser_node::node_type, pt_constraint_info::not_null, NULL, pt_name_info::original, pt_constraint_info::primary_key, PT_CONSTRAIN_NOT_NULL, PT_CONSTRAIN_PRIMARY_KEY, PT_CONSTRAIN_UNIQUE, PT_CONSTRAINT, sm_free_constraint_info(), strdup(), strlen, pt_constraint_info::type, pt_constraint_info::un, and pt_constraint_info::unique.
Referenced by build_attr_change_map().
|
static |
Definition at line 13850 of file execute_schema.c.
References assert, sm_constraint_info::constraint_type, DB_CONSTRAINT_FOREIGN_KEY, DB_CONSTRAINT_INDEX, DB_CONSTRAINT_NOT_NULL, DB_CONSTRAINT_PRIMARY_KEY, DB_CONSTRAINT_REVERSE_INDEX, DB_CONSTRAINT_REVERSE_UNIQUE, DB_CONSTRAINT_UNIQUE, ER_UNEXPECTED, error(), sm_constraint_info::next, db_value_slist::next, NO_ERROR, and NULL.
Referenced by do_alter_clause_change_attribute().
|
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().
|
static |
Definition at line 2383 of file execute_schema.c.
References ARG_FILE_LINE, assert, db_find_class(), er_errid(), ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), i, intl_identifier_casecmp(), NO_ERROR, NULL, sm_downcase_name(), SM_MAX_IDENTIFIER_LENGTH, strdup(), and strlen.
Referenced by acquire_locks_for_multiple_rename().
|
static |
Definition at line 6839 of file execute_schema.c.
References parser_node::column_number, pt_statement_info::data_type, parser_node::data_type, DB_DEFAULT_PRECISION, DB_MAX_BIT_PRECISION, DB_MAX_CHAR_PRECISION, DB_MAX_NCHAR_PRECISION, DB_MAX_NUMERIC_PRECISION, DB_MAX_VARBIT_PRECISION, DB_MAX_VARCHAR_PRECISION, DB_MAX_VARNCHAR_PRECISION, ER_PT_SEMANTIC, error(), parser_node::info, parser_node::line_number, MSGCAT_SEMANTIC_INV_PREC, MSGCAT_SEMANTIC_INVALID_SET_ELEMENT, MSGCAT_SET_PARSER_SEMANTIC, parser_node::next, NO_ERROR, NULL, sm_attr_properties_chg::p, pt_data_type_info::precision, pt_check_enum_data_type(), PT_ERRORmf2, PT_ERRORmf3, pt_has_error, PT_IS_LOB_TYPE, pt_record_error(), pt_show_type_enum(), PT_TYPE_BIT, PT_TYPE_CHAR, PT_TYPE_DOUBLE, PT_TYPE_ENUMERATION, PT_TYPE_FLOAT, PT_TYPE_MULTISET, PT_TYPE_NCHAR, PT_TYPE_NONE, PT_TYPE_NUMERIC, PT_TYPE_SEQUENCE, PT_TYPE_SET, PT_TYPE_VARBIT, PT_TYPE_VARCHAR, PT_TYPE_VARNCHAR, parser_context::statement_number, and parser_node::type_enum.
Referenced by do_add_attribute(), do_add_methods(), and do_change_att_schema_only().
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().