CUBRID Engine  latest
db.h File Reference
#include "config.h"
#include <stdio.h>
#include "error_manager.h"
#include "intl_support.h"
#include "db_date.h"
#include "object_domain.h"
#include "trigger_manager.h"
#include "dbi.h"
#include "parser.h"
#include "log_comm.h"
#include "dbtype_def.h"
#include "db_admin.h"
Include dependency graph for db.h:

Go to the source code of this file.

Macros

#define DB_CONNECTION_STATUS_NOT_CONNECTED   0
 
#define DB_CONNECTION_STATUS_CONNECTED   1
 
#define DB_CONNECTION_STATUS_RESET   -1
 
#define _DB_DISABLE_MODIFICATIONS_
 
#define CHECK_CONNECT_VOID()
 
#define CHECK_CONNECT_AND_RETURN_EXPR(return_expr_)
 
#define CHECK_CONNECT_ERROR()   CHECK_CONNECT_AND_RETURN_EXPR((DB_TYPE) ER_OBJ_NO_CONNECT)
 
#define CHECK_CONNECT_NULL()   CHECK_CONNECT_AND_RETURN_EXPR(NULL)
 
#define CHECK_CONNECT_ZERO()   CHECK_CONNECT_AND_RETURN_EXPR(0)
 
#define CHECK_CONNECT_ZERO_TYPE(TYPE)   CHECK_CONNECT_AND_RETURN_EXPR((TYPE)0)
 
#define CHECK_CONNECT_MINUSONE()   CHECK_CONNECT_AND_RETURN_EXPR(-1)
 
#define CHECK_CONNECT_FALSE()   CHECK_CONNECT_AND_RETURN_EXPR(false)
 
#define CHECK_MODIFICATION_VOID()
 
#define CHECK_MODIFICATION_AND_RETURN_EXPR(return_expr_)
 
#define CHECK_MODIFICATION_ERROR()   CHECK_MODIFICATION_AND_RETURN_EXPR(ER_DB_NO_MODIFICATIONS)
 
#define CHECK_MODIFICATION_NULL()   CHECK_MODIFICATION_AND_RETURN_EXPR(NULL)
 
#define CHECK_MODIFICATION_MINUSONE()   CHECK_MODIFICATION_AND_RETURN_EXPR(-1)
 
#define CHECK_MODIFICATION_NO_RETURN(error)
 
#define CHECK_1ARG_RETURN_EXPR(obj, expr)
 
#define CHECK_2ARGS_RETURN_EXPR(obj1, obj2, expr)
 
#define CHECK_3ARGS_RETURN_EXPR(obj1, obj2, obj3, expr)
 
#define CHECK_1ARG_NULL(obj)   CHECK_1ARG_RETURN_EXPR(obj, NULL)
 
#define CHECK_2ARGS_NULL(obj1, obj2)   CHECK_2ARGS_RETURN_EXPR(obj1,obj2,NULL)
 
#define CHECK_3ARGS_NULL(obj1, obj2, obj3)   CHECK_3ARGS_RETURN_EXPR(obj1,obj2,obj3,NULL)
 
#define CHECK_1ARG_FALSE(obj)   CHECK_1ARG_RETURN_EXPR(obj,false)
 
#define CHECK_1ARG_TRUE(obj)   CHECK_1ARG_RETURN_EXPR(obj, true)
 
#define CHECK_1ARG_ERROR(obj)   CHECK_1ARG_RETURN_EXPR(obj,ER_OBJ_INVALID_ARGUMENTS)
 
#define CHECK_1ARG_ERROR_WITH_TYPE(obj, TYPE)   CHECK_1ARG_RETURN_EXPR(obj,(TYPE)ER_OBJ_INVALID_ARGUMENTS)
 
#define CHECK_1ARG_MINUSONE(obj)   CHECK_1ARG_RETURN_EXPR(obj,-1)
 
#define CHECK_2ARGS_ERROR(obj1, obj2)   CHECK_2ARGS_RETURN_EXPR(obj1, obj2, ER_OBJ_INVALID_ARGUMENTS)
 
#define CHECK_3ARGS_ERROR(obj1, obj2, obj3)   CHECK_3ARGS_RETURN_EXPR(obj1, obj2, obj3, ER_OBJ_INVALID_ARGUMENTS)
 
#define CHECK_1ARG_ZERO(obj)   CHECK_1ARG_RETURN_EXPR(obj, 0)
 
#define CHECK_1ARG_ZERO_WITH_TYPE(obj1, RETURN_TYPE)   CHECK_1ARG_RETURN_EXPR(obj1, (RETURN_TYPE) 0)
 
#define CHECK_2ARGS_ZERO(obj1, obj2)   CHECK_2ARGS_RETURN_EXPR(obj1,obj2, 0)
 
#define CHECK_1ARG_UNKNOWN(obj1)   CHECK_1ARG_RETURN_EXPR(obj1, DB_TYPE_UNKNOWN)
 

Functions

int db_init (const char *program, int print_version, const char *dbname, const char *db_path, const char *vol_path, const char *log_path, const char *lob_path, const char *host_name, const bool overwrite, const char *comments, const char *addmore_vols_file, int npages, int desired_pagesize, int log_npages, int desired_log_page_size, const char *lang_charset)
 
int db_parse_one_statement (DB_SESSION *session)
 
int parse_one_statement (int state)
 
int db_get_parser_line_col (DB_SESSION *session, int *line, int *col)
 
int db_get_line_of_statement (DB_SESSION *session, int stmt_id)
 
int db_get_line_col_of_1st_error (DB_SESSION *session, DB_QUERY_ERROR *linecol)
 
DB_VALUEdb_get_hostvars (DB_SESSION *session)
 
char ** db_get_lock_classes (DB_SESSION *session)
 
void db_drop_all_statements (DB_SESSION *session)
 
PARSER_CONTEXTdb_get_parser (DB_SESSION *session)
 
DB_NODEdb_get_statement (DB_SESSION *session, int id)
 
DB_SESSIONdb_make_session_for_one_statement_execution (FILE *file)
 
int db_abort_to_savepoint_internal (const char *savepoint_name)
 
int db_error_code_test (void)
 
const char * db_error_string_test (int level)
 
DB_DATAdb_value_get_db_data (DB_VALUE *value)
 
DB_OBJECTdb_create_internal (DB_OBJECT *obj)
 
DB_OBJECTdb_create_by_name_internal (const char *name)
 
int db_put_internal (DB_OBJECT *obj, const char *name, DB_VALUE *value)
 
DB_OTMPLdbt_create_object_internal (DB_OBJECT *classobj)
 
int dbt_put_internal (DB_OTMPL *def, const char *name, DB_VALUE *value)
 
int db_dput_internal (DB_OBJECT *obj, DB_ATTDESC *attribute, DB_VALUE *value)
 
int dbt_dput_internal (DB_OTMPL *def, DB_ATTDESC *attribute, DB_VALUE *value)
 
DB_DOMAINdb_attdesc_domain (DB_ATTDESC *desc)
 
int db_add_super_internal (DB_OBJECT *classobj, DB_OBJECT *super)
 
int db_add_attribute_internal (MOP class_, const char *name, const char *domain, DB_VALUE *default_value, SM_NAME_SPACE name_space)
 
int db_rename_internal (DB_OBJECT *classobj, const char *name, int class_namespace, const char *newname)
 
int db_drop_attribute_internal (DB_OBJECT *classobj, const char *name)
 
DB_SESSIONdb_open_buffer_local (const char *buffer)
 
int db_compile_statement_local (DB_SESSION *session)
 
int db_execute_statement_local (DB_SESSION *session, int stmt, DB_QUERY_RESULT **result)
 
int db_open_buffer_and_compile_first_statement (const char *CSQL_query, DB_QUERY_ERROR *query_error, int include_oid, DB_SESSION **session, int *stmt_no)
 
int db_compile_and_execute_local (const char *CSQL_query, void *result, DB_QUERY_ERROR *query_error)
 
int db_compile_and_execute_queries_internal (const char *CSQL_query, void *result, DB_QUERY_ERROR *query_error, int include_oid, int execute, bool is_new_statement)
 
int db_set_system_generated_statement (DB_SESSION *session)
 
void db_close_session_local (DB_SESSION *session)
 
int db_savepoint_transaction_internal (const char *savepoint_name)
 
int db_drop_set_attribute_domain (MOP class_, const char *name, int class_attribute, const char *domain)
 
BTIDdb_constraint_index (DB_CONSTRAINT *constraint, BTID *index)
 
int db_col_optimize (DB_COLLECTION *col)
 
int db_get_connect_status (void)
 
void db_set_connect_status (int status)
 

Variables

int db_Connect_status
 
SESSION_ID db_Session_id
 
int db_Row_count
 
int db_Disable_modifications
 
char db_Database_name []
 
char db_Program_name []
 

Macro Definition Documentation

#define _DB_DISABLE_MODIFICATIONS_

Definition at line 56 of file db.h.

#define CHECK_1ARG_ERROR (   obj)    CHECK_1ARG_RETURN_EXPR(obj,ER_OBJ_INVALID_ARGUMENTS)
#define CHECK_1ARG_ERROR_WITH_TYPE (   obj,
  TYPE 
)    CHECK_1ARG_RETURN_EXPR(obj,(TYPE)ER_OBJ_INVALID_ARGUMENTS)

Definition at line 189 of file db.h.

Referenced by db_col_type().

#define CHECK_1ARG_FALSE (   obj)    CHECK_1ARG_RETURN_EXPR(obj,false)
#define CHECK_1ARG_RETURN_EXPR (   obj,
  expr 
)
Value:
do { \
if((obj) == NULL) { \
return (expr); \
} \
} while (0)
void er_set(int severity, const char *file_name, const int line_no, int err_id, int num_args,...)
#define NULL
Definition: freelistheap.h:34
if(extra_options)
Definition: dynamic_load.c:958
#define ARG_FILE_LINE
Definition: error_manager.h:44
#define ER_OBJ_INVALID_ARGUMENTS
Definition: error_code.h:275

Definition at line 147 of file db.h.

Referenced by db_drop_method_files(), db_query_format_col_type(), db_query_format_is_non_null(), db_query_format_type(), and db_query_get_tuple_oid().

#define CHECK_1ARG_TRUE (   obj)    CHECK_1ARG_RETURN_EXPR(obj, true)

Definition at line 183 of file db.h.

#define CHECK_1ARG_UNKNOWN (   obj1)    CHECK_1ARG_RETURN_EXPR(obj1, DB_TYPE_UNKNOWN)

Definition at line 210 of file db.h.

#define CHECK_1ARG_ZERO (   obj)    CHECK_1ARG_RETURN_EXPR(obj, 0)
#define CHECK_1ARG_ZERO_WITH_TYPE (   obj1,
  RETURN_TYPE 
)    CHECK_1ARG_RETURN_EXPR(obj1, (RETURN_TYPE) 0)

Definition at line 204 of file db.h.

Referenced by db_value_get_monetary_currency().

#define CHECK_2ARGS_ERROR (   obj1,
  obj2 
)    CHECK_2ARGS_RETURN_EXPR(obj1, obj2, ER_OBJ_INVALID_ARGUMENTS)

Definition at line 195 of file db.h.

Referenced by db_add_constraint(), db_add_index(), db_add_member(), db_col_find(), db_col_get(), db_convert_json_into_scalar(), db_drop_attribute(), db_drop_index(), db_drop_member(), db_elo_copy(), db_elo_copy_structure(), db_get(), db_get_deep_copy_of_json(), db_get_expression(), db_get_shared(), db_grant(), db_put(), db_put_internal(), db_query_get_tuple_oid(), db_query_get_tuple_value(), db_query_get_tuple_valuelist(), db_rename_class(), db_rename_trigger(), db_revoke(), db_send_argarray(), db_send_arglist(), db_seq_find(), db_seq_get(), db_set_get(), db_trigger_action(), db_trigger_action_time(), db_trigger_action_type(), db_trigger_attribute(), db_trigger_class(), db_trigger_comment(), db_trigger_condition(), db_trigger_condition_time(), db_trigger_event(), db_trigger_name(), db_trigger_priority(), db_trigger_status(), db_value_type_is_collection(), dbt_add_argument(), dbt_add_class_method(), dbt_add_constraint(), dbt_add_method(), dbt_add_method_file(), dbt_add_query_spec(), dbt_add_set_argument_domain(), dbt_add_set_attribute_domain(), dbt_add_super(), dbt_change_default(), dbt_change_domain(), dbt_change_query_spec(), dbt_constrain_non_null(), dbt_constrain_unique(), dbt_drop_attribute(), dbt_drop_class_attribute(), dbt_drop_class_method(), dbt_drop_method(), dbt_drop_method_file(), dbt_drop_set_attribute_domain(), dbt_drop_shared_attribute(), dbt_drop_super(), dbt_drop_super_connect(), dbt_put(), dbt_put_internal(), dbt_set_loader_commands(), do_promote_partition_by_name(), and do_reorganize_partition_post().

#define CHECK_2ARGS_RETURN_EXPR (   obj1,
  obj2,
  expr 
)
Value:
do { \
if((obj1) == NULL || (obj2) == NULL) { \
return (expr); \
} \
} while (0)
void er_set(int severity, const char *file_name, const int line_no, int err_id, int num_args,...)
#define NULL
Definition: freelistheap.h:34
if(extra_options)
Definition: dynamic_load.c:958
#define ARG_FILE_LINE
Definition: error_manager.h:44
#define ER_OBJ_INVALID_ARGUMENTS
Definition: error_code.h:275

Definition at line 155 of file db.h.

Referenced by add_arg_domain(), add_method_internal(), db_add_method_file(), db_add_super_internal(), db_drop_method_file(), db_drop_super(), db_drop_super_connect(), and drop_internal().

#define CHECK_2ARGS_ZERO (   obj1,
  obj2 
)    CHECK_2ARGS_RETURN_EXPR(obj1,obj2, 0)
#define CHECK_3ARGS_NULL (   obj1,
  obj2,
  obj3 
)    CHECK_3ARGS_RETURN_EXPR(obj1,obj2,obj3,NULL)
#define CHECK_3ARGS_RETURN_EXPR (   obj1,
  obj2,
  obj3,
  expr 
)
Value:
do { \
if((obj1) == NULL || (obj2) == NULL || (obj3) == NULL) { \
return (expr); \
} \
} while (0)
void er_set(int severity, const char *file_name, const int line_no, int err_id, int num_args,...)
#define NULL
Definition: freelistheap.h:34
if(extra_options)
Definition: dynamic_load.c:958
#define ARG_FILE_LINE
Definition: error_manager.h:44
#define ER_OBJ_INVALID_ARGUMENTS
Definition: error_code.h:275

Definition at line 163 of file db.h.

Referenced by db_add_attribute_internal(), db_add_set_attribute_domain(), db_change_default(), db_change_method_implementation(), and db_drop_set_attribute_domain().

#define CHECK_CONNECT_AND_RETURN_EXPR (   return_expr_)
Value:
do { \
{ \
return (return_expr_); \
} \
} while (0)
int db_Connect_status
Definition: db_macro.c:88
#define ER_OBJ_NO_CONNECT
Definition: error_code.h:295
#define DB_CONNECTION_STATUS_CONNECTED
Definition: db.h:47
void er_set(int severity, const char *file_name, const int line_no, int err_id, int num_args,...)
if(extra_options)
Definition: dynamic_load.c:958
#define ARG_FILE_LINE
Definition: error_manager.h:44

Definition at line 79 of file db.h.

#define CHECK_CONNECT_ERROR ( )    CHECK_CONNECT_AND_RETURN_EXPR((DB_TYPE) ER_OBJ_NO_CONNECT)

Definition at line 88 of file db.h.

Referenced by add_arg_domain(), add_method_internal(), db_2pc_attach_transaction(), db_2pc_prepare_to_commit_transaction(), db_2pc_prepared_transactions(), db_abort_to_savepoint(), db_abort_transaction(), db_add_attribute_internal(), db_add_class_resolution(), db_add_constraint(), db_add_index(), db_add_member(), db_add_method_file(), db_add_query_spec(), db_add_resolution(), db_add_set_attribute_domain(), db_add_super(), db_add_super_internal(), db_add_volume_ex(), db_alter_trigger_priority(), db_alter_trigger_status(), db_change_default(), db_change_method_implementation(), db_change_query_spec(), db_check_authorization(), db_check_authorization_and_grant_option(), db_checkpoint(), db_col_add(), db_col_drop(), db_col_drop_element(), db_col_drop_nulls(), db_col_filter(), db_col_find(), db_col_fprint(), db_col_get(), db_col_insert(), db_col_optimize(), db_col_put(), db_col_type(), db_commit_transaction(), db_dget(), db_dput(), db_dput_internal(), db_drop(), db_drop_attribute(), db_drop_class_ex(), db_drop_class_resolution(), db_drop_constraint(), db_drop_deferred_activities(), db_drop_index(), db_drop_member(), db_drop_method_file(), db_drop_method_files(), db_drop_query_spec(), db_drop_resolution(), db_drop_set_attribute_domain(), db_drop_super(), db_drop_super_connect(), db_drop_trigger(), db_drop_user(), db_dsend(), db_dsend_argarray(), db_dsend_arglist(), db_dsend_quick(), db_end_session(), db_execute_deferred_activities(), db_fetch_array(), db_fetch_composition(), db_find_all_triggers(), db_find_event_triggers(), db_find_user_to_drop(), db_get(), db_get_attribute_descriptor(), db_get_expression(), db_get_global_transaction_info(), db_get_ha_server_state(), db_get_last_insert_id(), db_get_method_descriptor(), db_get_query_result_format(), db_get_row_count(), db_get_shared(), db_get_variable(), db_grant(), db_lock_read(), db_lock_write(), db_object_describe(), db_object_fetch(), db_open_buffer_and_compile_first_statement(), db_ping_server(), db_put(), db_put_internal(), db_query_first_tuple(), db_query_get_tuple_oid(), db_query_get_tuple_value(), db_query_get_tuple_value_by_name(), db_query_get_tuple_valuelist(), db_query_last_tuple(), db_query_next_tuple(), db_query_prev_tuple(), db_query_seek_tuple(), db_query_set_copy_tplvalue(), db_rename(), db_rename_class(), db_rename_internal(), db_rename_trigger(), db_reset_latest_query_status(), db_revoke(), db_savepoint_transaction(), db_send(), db_send_argarray(), db_send_arglist(), db_seq_drop(), db_seq_filter(), db_seq_find(), db_seq_get(), db_seq_insert(), db_seq_print(), db_seq_put(), db_set_add(), db_set_drop(), db_set_filter(), db_set_get(), db_set_global_transaction_info(), db_set_loader_commands(), db_set_password(), db_set_print(), db_set_suppress_repl_on_transaction(), db_set_user_comment(), db_trigger_action(), db_trigger_action_time(), db_trigger_action_type(), db_trigger_attribute(), db_trigger_class(), db_trigger_comment(), db_trigger_condition(), db_trigger_condition_time(), db_trigger_event(), db_trigger_name(), db_trigger_priority(), db_trigger_status(), db_truncate_class(), db_validate(), db_value_clone(), dbt_add_argument(), dbt_add_attribute(), dbt_add_class_attribute(), dbt_add_class_method(), dbt_add_class_resolution(), dbt_add_constraint(), dbt_add_method(), dbt_add_method_file(), dbt_add_query_spec(), dbt_add_resolution(), dbt_add_set_argument_domain(), dbt_add_set_attribute_domain(), dbt_add_shared_attribute(), dbt_add_super(), dbt_change_default(), dbt_change_domain(), dbt_change_method_implementation(), dbt_change_query_spec(), dbt_constrain_non_null(), dbt_constrain_unique(), dbt_dput(), dbt_dput_internal(), dbt_drop_attribute(), dbt_drop_class_attribute(), dbt_drop_class_method(), dbt_drop_class_resolution(), dbt_drop_constraint(), dbt_drop_method(), dbt_drop_method_file(), dbt_drop_method_files(), dbt_drop_query_spec(), dbt_drop_resolution(), dbt_drop_set_attribute_domain(), dbt_drop_shared_attribute(), dbt_drop_super(), dbt_drop_super_connect(), dbt_put(), dbt_put_internal(), dbt_rename(), dbt_rename_method_file(), dbt_reset_query_spec(), dbt_set_label(), dbt_set_loader_commands(), drop_internal(), and fetch_set_internal().

#define CHECK_CONNECT_FALSE ( )    CHECK_CONNECT_AND_RETURN_EXPR(false)
#define CHECK_CONNECT_NULL ( )    CHECK_CONNECT_AND_RETURN_EXPR(NULL)

Definition at line 91 of file db.h.

Referenced by db_add_user(), db_attdesc_domain(), db_col_copy(), db_col_create(), db_col_domain(), db_copy(), db_cp_query_type(), db_create(), db_create_by_name(), db_create_by_name_internal(), db_create_class(), db_create_internal(), db_create_trigger(), db_create_vclass(), db_dfind_multi_unique(), db_dfind_unique(), db_execute_oid(), db_fetch_all_classes(), db_fetch_all_objects(), db_fetch_base_classes(), db_find_class(), db_find_class_of_index(), db_find_class_with_purpose(), db_find_multi_unique(), db_find_primary_key(), db_find_trigger(), db_find_unique(), db_find_unique_write_mode(), db_find_user(), db_get_all_classes(), db_get_all_objects(), db_get_attribute(), db_get_attribute_class(), db_get_attribute_domain(), db_get_attribute_names(), db_get_attributes(), db_get_base_classes(), db_get_class(), db_get_class_attribute(), db_get_class_attribute_names(), db_get_class_attributes(), db_get_class_method(), db_get_class_method_names(), db_get_class_methods(), db_get_class_name(), db_get_class_resolutions(), db_get_constraints(), db_get_database_comments(), db_get_database_name(), db_get_db_value_query_result(), db_get_loader_commands(), db_get_method(), db_get_method_file_names(), db_get_method_files(), db_get_method_function(), db_get_method_names(), db_get_method_source_file(), db_get_methods(), db_get_ordered_attribute_names(), db_get_ordered_attributes(), db_get_owner(), db_get_query_specs(), db_get_resolutions(), db_get_shared_attribute(), db_get_shared_attribute_names(), db_get_subclass_names(), db_get_subclasses(), db_get_superclass_names(), db_get_superclasses(), db_get_user_name(), db_make_session_for_one_statement_execution(), db_namelist_copy(), db_open_buffer(), db_open_file(), db_open_file_name(), db_query_get_tplpos(), db_real_instance(), db_seq_copy(), db_seq_create(), db_set_copy(), db_set_create(), db_set_create_basic(), db_set_create_multi(), db_value_copy(), db_value_create(), dbt_copy_class(), dbt_create_class(), dbt_create_object(), dbt_create_object_internal(), dbt_create_vclass(), dbt_edit_class(), dbt_edit_object(), dbt_finish_class(), dbt_finish_object(), and dbt_finish_object_and_decache_when_failure().

#define CHECK_CONNECT_VOID ( )
Value:
do { \
{ \
return; \
} \
} while (0)
int db_Connect_status
Definition: db_macro.c:88
#define ER_OBJ_NO_CONNECT
Definition: error_code.h:295
#define DB_CONNECTION_STATUS_CONNECTED
Definition: db.h:47
void er_set(int severity, const char *file_name, const int line_no, int err_id, int num_args,...)
if(extra_options)
Definition: dynamic_load.c:958
#define ARG_FILE_LINE
Definition: error_manager.h:44

Definition at line 70 of file db.h.

Referenced by db_force_method_reload(), db_fprint(), db_get_tran_settings(), db_preload_classes(), db_print(), db_set_interrupt(), db_synchronize_cache(), db_value_fprint(), db_value_print(), and db_warnspace().

#define CHECK_CONNECT_ZERO_TYPE (   TYPE)    CHECK_CONNECT_AND_RETURN_EXPR((TYPE)0)

Definition at line 97 of file db.h.

Referenced by db_get_attribute_type(), and db_vol_label().

#define CHECK_MODIFICATION_AND_RETURN_EXPR (   return_expr_)
Value:
return (return_expr_); \
}
#define ER_DB_NO_MODIFICATIONS
Definition: error_code.h:683
void er_set(int severity, const char *file_name, const int line_no, int err_id, int num_args,...)
int db_Disable_modifications
Definition: db_macro.c:90
#define ARG_FILE_LINE
Definition: error_manager.h:44

Definition at line 115 of file db.h.

#define CHECK_MODIFICATION_ERROR ( )    CHECK_MODIFICATION_AND_RETURN_EXPR(ER_DB_NO_MODIFICATIONS)

Definition at line 121 of file db.h.

Referenced by add_arg_domain(), add_method_internal(), db_2pc_attach_transaction(), db_2pc_prepare_to_commit_transaction(), db_2pc_prepared_transactions(), db_abort_to_savepoint(), db_add_attribute_internal(), db_add_class_resolution(), db_add_constraint(), db_add_index(), db_add_member(), db_add_method_file(), db_add_query_spec(), db_add_resolution(), db_add_set_attribute_domain(), db_add_super(), db_add_super_internal(), db_alter_trigger_priority(), db_alter_trigger_status(), db_change_default(), db_change_method_implementation(), db_change_query_spec(), db_col_add(), db_col_drop(), db_col_drop_element(), db_col_drop_nulls(), db_col_filter(), db_col_insert(), db_col_put(), db_dput(), db_dput_internal(), db_drop(), db_drop_attribute(), db_drop_class_ex(), db_drop_class_resolution(), db_drop_constraint(), db_drop_deferred_activities(), db_drop_index(), db_drop_member(), db_drop_method_file(), db_drop_method_files(), db_drop_query_spec(), db_drop_resolution(), db_drop_set_attribute_domain(), db_drop_super(), db_drop_super_connect(), db_drop_trigger(), db_drop_user(), db_execute_deferred_activities(), db_get_global_transaction_info(), db_grant(), db_put(), db_put_internal(), db_rename(), db_rename_class(), db_rename_internal(), db_rename_trigger(), db_revoke(), db_seq_drop(), db_seq_filter(), db_seq_insert(), db_seq_put(), db_set_add(), db_set_drop(), db_set_filter(), db_set_global_transaction_info(), db_set_password(), db_set_user_comment(), db_truncate_class(), dbt_add_argument(), dbt_add_attribute(), dbt_add_class_attribute(), dbt_add_class_method(), dbt_add_class_resolution(), dbt_add_constraint(), dbt_add_method(), dbt_add_method_file(), dbt_add_query_spec(), dbt_add_resolution(), dbt_add_set_argument_domain(), dbt_add_set_attribute_domain(), dbt_add_shared_attribute(), dbt_add_super(), dbt_change_default(), dbt_change_domain(), dbt_change_method_implementation(), dbt_change_query_spec(), dbt_constrain_non_null(), dbt_constrain_unique(), dbt_dput(), dbt_dput_internal(), dbt_drop_attribute(), dbt_drop_class_attribute(), dbt_drop_class_method(), dbt_drop_class_resolution(), dbt_drop_constraint(), dbt_drop_method(), dbt_drop_method_file(), dbt_drop_method_files(), dbt_drop_query_spec(), dbt_drop_resolution(), dbt_drop_set_attribute_domain(), dbt_drop_shared_attribute(), dbt_drop_super(), dbt_drop_super_connect(), dbt_put(), dbt_put_internal(), dbt_rename(), dbt_rename_method_file(), dbt_reset_query_spec(), dbt_set_label(), dbt_set_loader_commands(), do_alter(), do_alter_index(), do_alter_index_rebuild(), do_alter_serial(), do_alter_trigger(), do_alter_user(), do_create_entity(), do_create_index(), do_create_partition(), do_create_serial(), do_create_trigger(), do_create_user(), do_delete(), do_drop(), do_drop_index(), do_drop_partitioned_class(), do_drop_serial(), do_drop_trigger(), do_drop_user(), do_execute_delete(), do_execute_insert(), do_execute_merge(), do_execute_trigger(), do_execute_update(), do_grant(), do_insert(), do_merge(), do_prepare_select(), do_remove_trigger(), do_rename(), do_rename_trigger(), do_revoke(), do_select_internal(), do_truncate(), do_update(), do_update_stats(), drop_internal(), jsp_alter_stored_procedure(), jsp_create_stored_procedure(), and jsp_drop_stored_procedure().

#define CHECK_MODIFICATION_MINUSONE ( )    CHECK_MODIFICATION_AND_RETURN_EXPR(-1)

Definition at line 127 of file db.h.

Referenced by db_2pc_prepare_transaction(), db_2pc_start_transaction(), and db_set_lock_timeout().

#define CHECK_MODIFICATION_NO_RETURN (   error)
Value:
er_log_debug (ARG_FILE_LINE, "db_Disable_modification = %d\n", \
} else { \
}
#define NO_ERROR
Definition: error_code.h:46
#define ER_DB_NO_MODIFICATIONS
Definition: error_code.h:683
#define er_log_debug(...)
void er_set(int severity, const char *file_name, const int line_no, int err_id, int num_args,...)
int db_Disable_modifications
Definition: db_macro.c:90
static void error(const char *msg)
Definition: gencat.c:331
#define ARG_FILE_LINE
Definition: error_manager.h:44

Definition at line 135 of file db.h.

Referenced by net_server_request(), qexec_execute_mainblock_internal(), serial_update_cur_val_of_serial(), and xserial_get_next_value().

#define CHECK_MODIFICATION_VOID ( )
Value:
do { \
return; \
} \
} while (0)
#define ER_DB_NO_MODIFICATIONS
Definition: error_code.h:683
void er_set(int severity, const char *file_name, const int line_no, int err_id, int num_args,...)
int db_Disable_modifications
Definition: db_macro.c:90
if(extra_options)
Definition: dynamic_load.c:958
#define ARG_FILE_LINE
Definition: error_manager.h:44

Definition at line 107 of file db.h.

#define DB_CONNECTION_STATUS_CONNECTED   1
#define DB_CONNECTION_STATUS_NOT_CONNECTED   0
#define DB_CONNECTION_STATUS_RESET   -1

Definition at line 48 of file db.h.

Referenced by tran_commit(), tran_server_abort(), and tran_server_commit().

Function Documentation

int db_abort_to_savepoint_internal ( const char *  savepoint_name)

Definition at line 1210 of file db_admin.c.

References db_abort_transaction(), error(), NULL, and tran_abort_upto_user_savepoint().

Referenced by db_abort_to_savepoint(), and do_rollback().

Here is the caller graph for this function:

int db_add_attribute_internal ( MOP  class_,
const char *  name,
const char *  domain,
DB_VALUE default_value,
SM_NAME_SPACE  name_space 
)
int db_add_super_internal ( DB_OBJECT classobj,
DB_OBJECT super 
)
int db_col_optimize ( DB_COLLECTION col)

Definition at line 1478 of file db_set.c.

References CHECK_1ARG_ERROR, CHECK_CONNECT_ERROR, error(), NO_ERROR, and set_optimize().

int db_compile_and_execute_local ( const char *  CSQL_query,
void *  result,
DB_QUERY_ERROR query_error 
)
int db_compile_and_execute_queries_internal ( const char *  CSQL_query,
void *  result,
DB_QUERY_ERROR query_error,
int  include_oid,
int  execute,
bool  is_new_statement 
)
int db_compile_statement_local ( DB_SESSION session)

Definition at line 510 of file db_vdb.c.

References ARG_FILE_LINE, parser_node::cannot_prepare, db_query_type::col_type, CUBRID_STMT_EXECUTE_PREPARE, CUBRID_STMT_SELECT, DB_COL_PATH, DB_NO_OIDS, DB_ROW_OIDS, db_session::dimension, do_cast_host_variables_to_expected_domain(), do_get_prepared_statement_info(), pt_query_info::do_not_cache, do_prepare_statement(), er_clear(), er_errid(), ER_ERROR_SEVERITY, ER_IT_EMPTY_STATEMENT, ER_IT_INVALID_SESSION, ER_OUT_OF_VIRTUAL_MEMORY, ER_QPROC_INVALID_XASLNODE, er_set(), ER_WARNING_SEVERITY, err, pt_query_info::flag, parser_node::flag, parser_context::flag, db_session::include_oid, parser_node::info, db_session::is_subsession_for_prepared, parser_node::is_system_generated_stmt, parser_context::is_system_generated_stmt, mq_translate(), mq_updatable(), db_query_type::next, NO_ERROR, NULL, p, db_session::parser, parser, prm_get_integer_value(), PRM_ID_XASL_CACHE_MAX_ENTRIES, pt_add_row_oid(), pt_class_pre_fetch(), pt_compile(), pt_fillin_type_size(), pt_get_titles(), pt_has_error, pt_node_to_cmd_type(), pt_report_to_ersys(), pt_report_to_ersys_with_statement(), pt_reset_error(), PT_SEMANTIC, PT_SYNTAX, PT_UPDATABLE, pt_statement_info::query, parser_context::set_host_var, db_session::stage, StatementCompiledStage, StatementPreparedStage, db_session::statements, db_session::stmt_ndx, db_session::type_list, parser_node::use_plan_cache, parser_node::use_query_cache, and parser_node::xasl_id.

Referenced by au_delete_auth_of_dropping_table(), db_compile_and_execute_queries_internal(), db_compile_statement(), db_execute_and_keep_statement_local(), db_open_buffer_and_compile_first_statement(), do_process_prepare_statement(), stmt_exec_batch_query_internal(), stmt_exec_one_statement(), and stmt_prepare_internal().

Here is the caller graph for this function:

BTID* db_constraint_index ( DB_CONSTRAINT constraint,
BTID index 
)

Definition at line 2107 of file db_info.c.

References BTID_COPY, sm_class_constraint::index_btid, and NULL.

Referenced by util_get_class_oids_and_index_btid().

Here is the caller graph for this function:

DB_OBJECT* db_create_by_name_internal ( const char *  name)

Definition at line 145 of file db_obj.c.

References CHECK_1ARG_NULL, CHECK_CONNECT_NULL, CHECK_MODIFICATION_NULL, and obj_create_by_name().

Referenced by db_create_by_name().

Here is the caller graph for this function:

DB_OBJECT* db_create_internal ( DB_OBJECT obj)
int db_dput_internal ( DB_OBJECT obj,
DB_ATTDESC attribute,
DB_VALUE value 
)

Definition at line 933 of file db_obj.c.

References CHECK_CONNECT_ERROR, CHECK_MODIFICATION_ERROR, and obj_desc_set().

Referenced by db_dput().

Here is the caller graph for this function:

int db_drop_attribute_internal ( DB_OBJECT classobj,
const char *  name 
)
int db_drop_set_attribute_domain ( MOP  class_,
const char *  name,
int  class_attribute,
const char *  domain 
)
int db_error_code_test ( void  )

Definition at line 2123 of file db_admin.c.

References db_error_code().

const char* db_error_string_test ( int  level)

Definition at line 2089 of file db_admin.c.

References db_error_string().

int db_get_connect_status ( void  )

Definition at line 4930 of file db_macro.c.

References db_Connect_status.

DB_VALUE* db_get_hostvars ( DB_SESSION session)

Definition at line 1562 of file db_vdb.c.

References parser_context::host_variables, and db_session::parser.

int db_get_line_col_of_1st_error ( DB_SESSION session,
DB_QUERY_ERROR linecol 
)
int db_get_line_of_statement ( DB_SESSION session,
int  stmt_id 
)

Definition at line 4236 of file db_vdb.c.

References assert, db_session::dimension, parser_node::line_number, NULL, and db_session::statements.

Referenced by ldr_exec_query_from_file().

Here is the caller graph for this function:

char** db_get_lock_classes ( DB_SESSION session)

Definition at line 1573 of file db_vdb.c.

References parser_context::lcks_classes, NULL, and db_session::parser.

PARSER_CONTEXT* db_get_parser ( DB_SESSION session)

Definition at line 3714 of file db_vdb.c.

References db_session::parser.

Referenced by do_run_update_query_for_class(), and uci_static().

Here is the caller graph for this function:

int db_get_parser_line_col ( DB_SESSION session,
int *  line,
int *  col 
)

Definition at line 355 of file db_vdb.c.

References parser_context::column, parser_context::line, and db_session::parser.

DB_NODE* db_get_statement ( DB_SESSION session,
int  id 
)

Definition at line 3729 of file db_vdb.c.

References db_session::statements.

Referenced by uci_static().

Here is the caller graph for this function:

int db_init ( const char *  program,
int  print_version,
const char *  dbname,
const char *  db_path,
const char *  vol_path,
const char *  log_path,
const char *  lob_path,
const char *  host_name,
const bool  overwrite,
const char *  comments,
const char *  addmore_vols_file,
int  npages,
int  desired_pagesize,
int  log_npages,
int  desired_log_page_size,
const char *  lang_charset 
)
DB_SESSION* db_make_session_for_one_statement_execution ( FILE *  file)

Definition at line 276 of file db_vdb.c.

References CHECK_CONNECT_NULL, db_open_local(), parse_one_statement(), db_session::parser, and pt_init_one_statement_parser().

Referenced by ldr_exec_query_from_file().

Here is the caller graph for this function:

int db_open_buffer_and_compile_first_statement ( const char *  CSQL_query,
DB_QUERY_ERROR query_error,
int  include_oid,
DB_SESSION **  session,
int *  stmt_no 
)
int db_rename_internal ( DB_OBJECT classobj,
const char *  name,
int  class_namespace,
const char *  newname 
)
int db_savepoint_transaction_internal ( const char *  savepoint_name)

Definition at line 1166 of file db_admin.c.

References tran_savepoint_internal(), and USER_SAVEPOINT.

Referenced by db_savepoint_transaction(), and do_savepoint().

Here is the caller graph for this function:

void db_set_connect_status ( int  status)

Definition at line 4936 of file db_macro.c.

References db_Connect_status.

int db_set_system_generated_statement ( DB_SESSION session)
DB_DATA* db_value_get_db_data ( DB_VALUE value)

Definition at line 1211 of file db_macro.c.

References CHECK_1ARG_NULL, and db_value::data.

int dbt_dput_internal ( DB_OTMPL def,
DB_ATTDESC attribute,
DB_VALUE value 
)

Definition at line 977 of file db_obj.c.

References CHECK_CONNECT_ERROR, CHECK_MODIFICATION_ERROR, and obt_desc_set().

Referenced by db_gadget_exec(), dbt_dput(), insert_object_attr(), and update_object_attribute().

Here is the caller graph for this function:

int parse_one_statement ( int  state)

Referenced by db_make_session_for_one_statement_execution(), and db_parse_one_statement().

Here is the caller graph for this function:

Variable Documentation

char db_Database_name[]

Definition at line 100 of file db_admin.c.

Referenced by conn_restart_client(), db_get_database_name(), db_restart(), and db_shutdown().

char db_Program_name[]

Definition at line 101 of file db_admin.c.

Referenced by conn_restart_client(), db_restart(), and db_shutdown().

int db_Row_count

Definition at line 81 of file db_macro.c.

Referenced by db_get_row_count_cache(), and db_update_row_count_cache().