CUBRID Engine
latest
|
Go to the source code of this file.
Macros | |
#define | PI ((double) (3.14159265358979323846264338)) |
#define PI ((double) (3.14159265358979323846264338)) |
Definition at line 34 of file arithmetic.h.
Referenced by fetch_peek_arith().
Definition at line 565 of file arithmetic.c.
References ARG_FILE_LINE, assert, db_get_bigint(), db_get_double(), db_get_float(), db_get_int(), db_get_monetary(), db_get_short(), DB_IS_NULL, db_locate_numeric, db_make_bigint(), db_make_double(), db_make_float(), db_make_int(), db_make_monetary(), db_make_null(), db_make_numeric(), db_make_short(), DB_NUMERIC_BUF_SIZE, DB_TYPE_BIGINT, DB_TYPE_CHAR, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_SHORT, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, DB_VALUE_DOMAIN_TYPE, DB_VALUE_PRECISION, DB_VALUE_SCALE, ER_ERROR_SEVERITY, ER_QPROC_INVALID_DATATYPE, er_set(), NO_ERROR, numeric_db_value_abs(), prm_get_bool_value(), PRM_ID_RETURN_NULL_ON_FUNCTION_ERRORS, and tp_value_str_auto_cast_to_number().
Referenced by do_alter_serial(), do_create_serial(), fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 5383 of file arithmetic.c.
References assert, ASSERT_ERROR, db_get_json_document(), DB_IS_NULL, db_json_add_element_to_array(), db_make_json_from_doc_store_and_release(), db_make_null(), db_value_to_json_value(), ER_FAILED, NO_ERROR, and NULL.
Referenced by qdata_aggregate_value_to_accumulator().
int db_accumulate_json_objectagg | ( | const DB_VALUE * | json_key, |
const DB_VALUE * | json_db_val, | ||
DB_VALUE * | json_res | ||
) |
Definition at line 5437 of file arithmetic.c.
References assert, ASSERT_ERROR, db_get_json_document(), DB_IS_NULL, db_json_add_member_to_object(), db_make_json_from_doc_store_and_release(), db_make_null(), db_value_to_json_key(), db_value_to_json_value(), er_clear(), ER_FAILED, ER_JSON_DUPLICATE_KEY, NO_ERROR, and NULL.
Referenced by qdata_aggregate_multiple_values_to_accumulator().
Definition at line 3872 of file arithmetic.c.
References ARG_FILE_LINE, COMPAT_MYSQL, DB_IS_NULL, db_make_double(), db_make_null(), DB_TYPE_NULL, DB_VALUE_DOMAIN_TYPE, ER_ERROR_SEVERITY, ER_QPROC_FUNCTION_ARG_ERROR, er_set(), err, error(), get_number_dbval_as_double(), NO_ERROR, prm_get_integer_value(), and PRM_ID_COMPAT_MODE.
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 3921 of file arithmetic.c.
References ARG_FILE_LINE, COMPAT_MYSQL, DB_IS_NULL, db_make_double(), db_make_null(), DB_TYPE_NULL, DB_VALUE_DOMAIN_TYPE, ER_ERROR_SEVERITY, ER_QPROC_FUNCTION_ARG_ERROR, er_set(), err, error(), get_number_dbval_as_double(), NO_ERROR, prm_get_integer_value(), and PRM_ID_COMPAT_MODE.
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 4006 of file arithmetic.c.
References DB_IS_NULL, db_make_double(), db_make_null(), DB_TYPE_NULL, DB_VALUE_DOMAIN_TYPE, err, get_number_dbval_as_double(), and NO_ERROR.
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 3970 of file arithmetic.c.
References DB_IS_NULL, db_make_double(), db_make_null(), DB_TYPE_NULL, DB_VALUE_DOMAIN_TYPE, err, get_number_dbval_as_double(), and NO_ERROR.
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 4178 of file arithmetic.c.
References ARG_FILE_LINE, db_get_bigint(), db_get_double(), db_get_float(), db_get_int(), db_get_monetary(), db_get_short(), DB_IS_NULL, db_make_int(), db_make_null(), DB_TYPE_BIGINT, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_NUMERIC, DB_TYPE_SHORT, DB_VALUE_DOMAIN_TYPE, DOMAIN_COMPATIBLE, ER_ERROR_SEVERITY, ER_FAILED, ER_QPROC_INVALID_DATATYPE, er_set(), i, NO_ERROR, NULL, tp_Double_domain, and tp_value_cast().
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 254 of file arithmetic.c.
References ARG_FILE_LINE, assert, db_get_bigint(), db_get_double(), db_get_float(), db_get_int(), db_get_monetary(), db_get_short(), DB_IS_NULL, db_locate_numeric, db_make_bigint(), db_make_double(), db_make_float(), db_make_int(), db_make_monetary(), db_make_null(), db_make_numeric(), db_make_short(), DB_MAX_NUMERIC_PRECISION, DB_NUMERIC_BUF_SIZE, DB_TYPE_BIGINT, DB_TYPE_CHAR, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_SHORT, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, DB_VALUE_DOMAIN_TYPE, DB_VALUE_PRECISION, DB_VALUE_SCALE, ER_ERROR_SEVERITY, ER_QPROC_INVALID_DATATYPE, er_set(), NO_ERROR, numeric_coerce_dec_str_to_num(), numeric_coerce_num_to_dec_str(), p, prm_get_bool_value(), PRM_ID_RETURN_NULL_ON_FUNCTION_ERRORS, strlen, and tp_value_str_auto_cast_to_number().
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 3737 of file arithmetic.c.
References DB_IS_NULL, db_make_double(), db_make_null(), DB_TYPE_NULL, DB_VALUE_DOMAIN_TYPE, err, get_number_dbval_as_double(), and NO_ERROR.
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 3833 of file arithmetic.c.
References DB_IS_NULL, db_make_double(), db_make_null(), DB_TYPE_NULL, DB_VALUE_DOMAIN_TYPE, err, get_number_dbval_as_double(), and NO_ERROR.
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 5020 of file arithmetic.c.
References ARG_FILE_LINE, assert, crypt_crc32(), db_get_string(), db_get_string_size(), DB_IS_NULL, db_make_int(), DB_VALUE_DOMAIN_TYPE, er_clear(), er_errid(), ER_ERROR_SEVERITY, ER_QSTR_INVALID_DATA_TYPE, er_set(), error(), NO_ERROR, NULL, PRIM_SET_NULL(), prm_get_bool_value(), PRM_ID_RETURN_NULL_ON_FUNCTION_ERRORS, and QSTR_IS_ANY_CHAR.
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 4054 of file arithmetic.c.
References DB_IS_NULL, db_make_double(), db_make_null(), DB_TYPE_NULL, DB_VALUE_DOMAIN_TYPE, err, get_number_dbval_as_double(), and NO_ERROR.
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
int db_drandom_dbval | ( | DB_VALUE * | result | ) |
Definition at line 3672 of file arithmetic.c.
References db_make_double(), and NO_ERROR.
Definition at line 5626 of file arithmetic.c.
References ASSERT_ERROR, db_json_add_element_to_array(), db_json_make_json_array(), db_make_json_from_doc_store_and_release(), db_make_null(), db_value_to_json_value(), i, and NO_ERROR.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 5964 of file arithmetic.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, DB_IS_NULL, db_json_array_append_func(), db_make_json_from_doc_store_and_release(), db_make_null(), db_value_to_json_doc(), db_value_to_json_path(), db_value_to_json_value(), ER_ERROR_SEVERITY, ER_FAILED, ER_OBJ_INVALID_ARGUMENTS, er_set(), F_JSON_ARRAY_APPEND, i, and NO_ERROR.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 6032 of file arithmetic.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, DB_IS_NULL, db_json_array_insert_func(), db_make_json_from_doc_store_and_release(), db_make_null(), db_value_to_json_doc(), db_value_to_json_path(), db_value_to_json_value(), ER_ERROR_SEVERITY, ER_FAILED, ER_OBJ_INVALID_ARGUMENTS, er_set(), F_JSON_ARRAY_INSERT, i, and NO_ERROR.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 5069 of file arithmetic.c.
References assert, ASSERT_ERROR, db_json_extract_document_from_path(), db_json_value_is_contained_in_doc(), db_make_int(), db_make_null(), db_value_to_json_doc(), db_value_to_json_path(), ER_FAILED, F_JSON_CONTAINS, is_any_arg_null(), NO_ERROR, and NULL.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 6100 of file arithmetic.c.
References ASSERT_ERROR, db_json_contains_path(), db_make_int(), db_make_null(), db_value_to_json_doc(), db_value_to_json_path(), F_JSON_CONTAINS_PATH, i, is_any_arg_null(), is_str_find_all(), and NO_ERROR.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 5269 of file arithmetic.c.
References assert, DB_IS_NULL, db_json_get_depth(), db_make_int(), db_make_null(), db_value_to_json_doc(), ER_FAILED, and NO_ERROR.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 5511 of file arithmetic.c.
References assert, ASSERT_ERROR, db_json_extract_document_from_path(), db_json_get_type(), db_make_json_from_doc_store_and_release(), db_make_null(), db_value_to_json_doc(), db_value_to_json_path(), ER_FAILED, F_JSON_EXTRACT, is_any_arg_null(), and NO_ERROR.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 6419 of file arithmetic.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, DB_IS_NULL, db_json_allocate_doc(), db_json_get_all_paths_func(), db_make_json(), db_make_null(), db_value_to_json_doc(), ER_ERROR_SEVERITY, ER_FAILED, ER_OBJ_INVALID_ARGUMENTS, er_set(), and NO_ERROR.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 5653 of file arithmetic.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, DB_IS_NULL, db_json_insert_func(), db_make_json_from_doc_store_and_release(), db_make_null(), db_value_to_json_doc(), db_value_to_json_path(), db_value_to_json_value(), ER_ERROR_SEVERITY, ER_FAILED, ER_OBJ_INVALID_ARGUMENTS, er_set(), F_JSON_INSERT, i, and NO_ERROR.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 5855 of file arithmetic.c.
References ARG_FILE_LINE, ASSERT_ERROR, assert_release, db_json_keys_func(), db_make_json_from_doc_store_and_release(), db_make_null(), db_value_to_json_doc(), db_value_to_json_path(), ER_ERROR_SEVERITY, ER_FAILED, ER_OBJ_INVALID_ARGUMENTS, er_set(), F_JSON_KEYS, is_any_arg_null(), and NO_ERROR.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 5212 of file arithmetic.c.
References assert, ASSERT_ERROR, db_json_extract_document_from_path(), db_json_get_length(), db_make_int(), db_make_null(), db_value_to_json_doc(), db_value_to_json_path(), ER_FAILED, F_JSON_LENGTH, is_any_arg_null(), NO_ERROR, and NULL.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 6215 of file arithmetic.c.
References db_json_merge_patch_func(), db_make_json_from_doc_store_and_release(), db_make_null(), db_value_to_json_doc(), i, is_any_arg_null(), and NO_ERROR.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
int db_evaluate_json_merge_preserve | ( | DB_VALUE * | result, |
DB_VALUE *const * | arg, | ||
int const | num_args | ||
) |
Definition at line 6163 of file arithmetic.c.
References ASSERT_ERROR, db_json_merge_preserve_func(), db_make_json_from_doc_store_and_release(), db_make_null(), db_value_to_json_doc(), i, is_any_arg_null(), and NO_ERROR.
Referenced by pt_evaluate_function_w_args(), qdata_aggregate_accumulator_to_accumulator(), and qdata_evaluate_function().
Definition at line 5569 of file arithmetic.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, DB_IS_NULL, db_json_add_member_to_object(), db_json_make_json_object(), db_make_json_from_doc_store_and_release(), db_make_null(), db_value_to_json_key(), db_value_to_json_value(), ER_ERROR_SEVERITY, ER_FAILED, ER_JSON_OBJECT_NAME_IS_NULL, ER_OBJ_INVALID_ARGUMENTS, er_set(), i, and NO_ERROR.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 5345 of file arithmetic.c.
References assert, ASSERT_ERROR, DB_IS_NULL, db_json_pretty_func(), db_make_null(), db_make_string(), db_value_to_json_doc(), ER_FAILED, db_value::need_clear, NO_ERROR, and NULL.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 5294 of file arithmetic.c.
References assert, db_string_quote(), and ER_FAILED.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 5912 of file arithmetic.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, db_json_remove_func(), db_make_json_from_doc_store_and_release(), db_make_null(), db_value_to_json_doc(), db_value_to_json_path(), ER_ERROR_SEVERITY, ER_FAILED, ER_OBJ_INVALID_ARGUMENTS, er_set(), F_JSON_REMOVE, i, is_any_arg_null(), and NO_ERROR.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 5721 of file arithmetic.c.
References ARG_FILE_LINE, ASSERT_ERROR, assert_release, DB_IS_NULL, db_json_replace_func(), db_make_json_from_doc_store_and_release(), db_make_null(), db_value_to_json_doc(), db_value_to_json_path(), db_value_to_json_value(), ER_ERROR_SEVERITY, ER_FAILED, ER_OBJ_INVALID_ARGUMENTS, er_set(), F_JSON_REPLACE, i, and NO_ERROR.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 6268 of file arithmetic.c.
References ARG_FILE_LINE, ASSERT_ERROR, DB_IS_NULL, db_json_add_element_to_array(), db_json_get_json_from_str(), db_json_path_unquote_object_keys_external(), db_json_search_func(), db_make_json(), db_make_json_from_doc_store_and_release(), db_make_null(), db_make_string(), db_string_escape_str(), db_value_to_json_doc(), db_value_to_json_path(), ER_ERROR_SEVERITY, ER_FAILED, ER_OBJ_INVALID_ARGUMENTS, er_set(), F_JSON_SEARCH, i, is_str_find_all(), NO_ERROR, NULL, prm_get_bool_value(), and PRM_ID_NO_BACKSLASH_ESCAPES.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 5788 of file arithmetic.c.
References ARG_FILE_LINE, ASSERT_ERROR, assert_release, DB_IS_NULL, db_json_set_func(), db_make_json_from_doc_store_and_release(), db_make_null(), db_value_to_json_doc(), db_value_to_json_path(), db_value_to_json_value(), ER_ERROR_SEVERITY, ER_FAILED, ER_OBJ_INVALID_ARGUMENTS, er_set(), F_JSON_SET, i, and NO_ERROR.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 5145 of file arithmetic.c.
References assert, DB_IS_NULL, db_json_get_type_as_str(), db_make_null(), db_make_varchar(), db_value_to_json_doc(), ER_FAILED, LANG_COERCIBLE_CODESET, LANG_COERCIBLE_COLL, NO_ERROR, and strlen.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 5305 of file arithmetic.c.
References assert, ASSERT_ERROR, DB_IS_NULL, db_json_unquote(), db_make_null(), db_make_string(), db_value_to_json_doc(), ER_FAILED, db_value::need_clear, NO_ERROR, and NULL.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 5178 of file arithmetic.c.
References assert, db_get_string(), db_get_string_size(), DB_IS_NULL, db_json_is_valid(), db_make_int(), db_make_null(), DB_TYPE_JSON, db_value_domain_type(), ER_FAILED, NO_ERROR, and TP_IS_CHAR_TYPE.
Referenced by pt_evaluate_function_w_args(), and qdata_evaluate_function().
Definition at line 659 of file arithmetic.c.
References ARG_FILE_LINE, db_get_bigint(), db_get_double(), db_get_float(), db_get_int(), db_get_monetary(), db_get_short(), DB_IS_NULL, db_locate_numeric, db_make_double(), DB_TYPE_BIGINT, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_SHORT, DB_VALUE_DOMAIN_TYPE, DB_VALUE_SCALE, ER_ERROR_SEVERITY, ER_FAILED, ER_QPROC_INVALID_DATATYPE, ER_QPROC_OVERFLOW_EXP, er_set(), i, NO_ERROR, numeric_coerce_num_to_double(), and OR_CHECK_DOUBLE_OVERFLOW.
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 87 of file arithmetic.c.
References ARG_FILE_LINE, assert, db_get_bigint(), db_get_double(), db_get_float(), db_get_int(), db_get_monetary(), db_get_numeric(), db_get_short(), DB_IS_NULL, db_make_bigint(), db_make_double(), db_make_float(), db_make_int(), db_make_monetary(), db_make_null(), db_make_numeric(), db_make_short(), DB_MAX_NUMERIC_PRECISION, DB_NUMERIC_BUF_SIZE, DB_TYPE_BIGINT, DB_TYPE_CHAR, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_SHORT, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, DB_VALUE_DOMAIN_TYPE, DB_VALUE_PRECISION, DB_VALUE_SCALE, ER_ERROR_SEVERITY, ER_QPROC_INVALID_DATATYPE, er_set(), NO_ERROR, numeric_coerce_dec_str_to_num(), numeric_coerce_num_to_dec_str(), p, prm_get_bool_value(), PRM_ID_RETURN_NULL_ON_FUNCTION_ERRORS, strlen, and tp_value_str_auto_cast_to_number().
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 6454 of file arithmetic.c.
References assert_release, DB_EQ, DB_GT, DB_IS_NULL, DB_LT, db_make_null(), DB_UNK, ER_FAILED, NO_ERROR, pr_clone_value(), and tp_value_compare_with_error().
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 2603 of file arithmetic.c.
References ARG_FILE_LINE, d1, db_get_bigint(), db_get_double(), db_get_float(), db_get_int(), db_get_monetary(), db_get_short(), DB_IS_NULL, db_locate_numeric, db_make_double(), DB_TYPE_BIGINT, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_NUMERIC, DB_TYPE_SHORT, DB_VALUE_DOMAIN_TYPE, DB_VALUE_SCALE, ER_ERROR_SEVERITY, ER_FAILED, ER_QPROC_FUNCTION_ARG_ERROR, ER_QPROC_INVALID_DATATYPE, er_set(), NO_ERROR, and numeric_coerce_num_to_double().
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 4118 of file arithmetic.c.
References ARG_FILE_LINE, assert, DB_IS_NULL, db_make_double(), db_make_null(), DB_TYPE_NULL, DB_VALUE_DOMAIN_TYPE, ER_ERROR_SEVERITY, ER_QPROC_FUNCTION_ARG_ERROR, er_set(), err, get_number_dbval_as_double(), and NO_ERROR.
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 1928 of file arithmetic.c.
References ARG_FILE_LINE, DB_IS_NULL, db_mod_bigint(), db_mod_double(), db_mod_float(), db_mod_int(), db_mod_monetary(), db_mod_numeric(), db_mod_short(), db_mod_string(), DB_TYPE_BIGINT, DB_TYPE_CHAR, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_NCHAR, DB_TYPE_NUMERIC, DB_TYPE_SHORT, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, DB_VALUE_DOMAIN_TYPE, ER_ERROR_SEVERITY, ER_QPROC_INVALID_DATATYPE, er_set(), NO_ERROR, prm_get_bool_value(), and PRM_ID_RETURN_NULL_ON_FUNCTION_ERRORS.
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 836 of file arithmetic.c.
References ARG_FILE_LINE, COMPAT_MYSQL, d1, DB_IS_NULL, db_make_double(), db_make_null(), ER_ERROR_SEVERITY, ER_FAILED, ER_QPROC_OVERFLOW_POWER, ER_QPROC_POWER_ERROR, er_set(), error(), get_number_dbval_as_double(), NO_ERROR, OR_CHECK_DOUBLE_OVERFLOW, prm_get_integer_value(), and PRM_ID_COMPAT_MODE.
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 4086 of file arithmetic.c.
References DB_IS_NULL, db_make_double(), db_make_null(), DB_TYPE_NULL, DB_VALUE_DOMAIN_TYPE, err, get_number_dbval_as_double(), and NO_ERROR.
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
int db_random_dbval | ( | DB_VALUE * | result | ) |
Definition at line 3659 of file arithmetic.c.
References db_make_int(), and NO_ERROR.
Definition at line 2315 of file arithmetic.c.
References ARG_FILE_LINE, assert, d1, DB_BIGINT_MAX, DB_BIGINT_MIN, db_get_bigint(), db_get_double(), db_get_float(), db_get_int(), db_get_monetary(), db_get_short(), DB_GET_STRING_SAFE, DB_IS_NULL, db_locate_numeric, db_make_bigint(), db_make_double(), db_make_float(), db_make_int(), db_make_monetary(), db_make_null(), db_make_numeric(), db_make_short(), db_make_string(), DB_MAX_NUMERIC_PRECISION, DB_NUMERIC_BUF_SIZE, DB_TYPE_BIGINT, DB_TYPE_CHAR, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_NCHAR, DB_TYPE_NUMERIC, DB_TYPE_SHORT, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, DB_TYPE_UNKNOWN, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, DB_VALUE_DOMAIN_TYPE, DB_VALUE_PRECISION, DB_VALUE_SCALE, DOMAIN_COMPATIBLE, er_clear(), er_errid(), ER_ERROR_SEVERITY, ER_IT_DATA_OVERFLOW, ER_QPROC_INVALID_DATATYPE, er_set(), NO_ERROR, NULL, numeric_coerce_dec_str_to_num(), numeric_coerce_num_to_dec_str(), p, pr_type_name(), prm_get_bool_value(), PRM_ID_RETURN_NULL_ON_FUNCTION_ERRORS, QSTR_IS_ANY_CHAR, round_date(), round_double(), strlen, tp_domain_resolve_default(), TP_DOMAIN_TYPE, TP_IS_NUMERIC_TYPE, tp_value_coerce(), and tp_value_str_auto_cast_to_number().
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 429 of file arithmetic.c.
References db_get_bigint(), db_get_double(), db_get_float(), db_get_int(), db_get_monetary(), db_get_short(), DB_IS_NULL, db_locate_numeric, db_make_int(), DB_TYPE_BIGINT, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_SHORT, DB_VALUE_DOMAIN_TYPE, DB_VALUE_SCALE, NO_ERROR, and numeric_coerce_num_to_double().
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 3769 of file arithmetic.c.
References DB_IS_NULL, db_make_double(), db_make_null(), DB_TYPE_NULL, DB_VALUE_DOMAIN_TYPE, err, get_number_dbval_as_double(), and NO_ERROR.
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 4976 of file arithmetic.c.
References ARG_FILE_LINE, assert, db_get_double(), DB_IS_NULL, db_make_int(), db_make_null(), DB_TYPE_DOUBLE, DB_TYPE_NULL, DB_VALUE_DOMAIN_TYPE, ER_ERROR_SEVERITY, ER_OBJ_INVALID_ARGUMENTS, er_set(), error(), msleep(), NO_ERROR, and NULL.
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 731 of file arithmetic.c.
References ARG_FILE_LINE, COMPAT_MYSQL, db_get_bigint(), db_get_double(), db_get_float(), db_get_int(), db_get_monetary(), db_get_short(), DB_IS_NULL, db_locate_numeric, db_make_double(), db_make_null(), DB_TYPE_BIGINT, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_SHORT, DB_VALUE_DOMAIN_TYPE, DB_VALUE_SCALE, ER_ERROR_SEVERITY, ER_FAILED, ER_QPROC_FUNCTION_ARG_ERROR, ER_QPROC_INVALID_DATATYPE, er_set(), i, NO_ERROR, numeric_coerce_num_to_double(), prm_get_integer_value(), and PRM_ID_COMPAT_MODE.
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 3801 of file arithmetic.c.
References DB_IS_NULL, db_make_double(), db_make_null(), DB_TYPE_NULL, DB_VALUE_DOMAIN_TYPE, err, get_number_dbval_as_double(), and NO_ERROR.
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 3311 of file arithmetic.c.
References ARG_FILE_LINE, assert, d1, db_datetime::date, db_datetimetz::datetime, db_get_bigint(), db_get_date(), db_get_datetime(), db_get_datetimetz(), db_get_double(), db_get_float(), db_get_int(), db_get_monetary(), db_get_short(), db_get_string(), db_get_timestamp(), db_get_timestamptz(), DB_IS_NULL, db_locate_numeric, db_make_bigint(), db_make_double(), db_make_float(), db_make_int(), db_make_monetary(), db_make_null(), db_make_numeric(), db_make_short(), db_make_string(), DB_MAX_NUMERIC_PRECISION, DB_NUMERIC_BUF_SIZE, db_timestamp_decode_ses(), db_timestamp_decode_w_tz_id(), DB_TYPE_BIGINT, DB_TYPE_CHAR, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_NUMERIC, DB_TYPE_SHORT, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, DB_TYPE_UNKNOWN, DB_VALUE_DOMAIN_TYPE, DB_VALUE_PRECISION, db_value_put_encoded_date(), DB_VALUE_SCALE, DOMAIN_COMPATIBLE, er_clear(), ER_ERROR_SEVERITY, ER_QPROC_INVALID_DATATYPE, ER_QSTR_INVALID_FORMAT, er_set(), NO_ERROR, NULL, numeric_coerce_dec_str_to_num(), numeric_coerce_num_to_dec_str(), p, pr_clear_value(), prm_get_bool_value(), PRM_ID_RETURN_NULL_ON_FUNCTION_ERRORS, QSTR_IS_ANY_CHAR, strlen, db_timestamptz::timestamp, tp_domain_resolve_default(), TP_IS_DATE_TYPE, tp_value_coerce(), truncate_bigint(), truncate_date(), truncate_double(), tz_datetimeltz_to_local(), db_timestamptz::tz_id, db_datetimetz::tz_id, and tz_utc_datetimetz_to_local().
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
Definition at line 4302 of file arithmetic.c.
References ARG_FILE_LINE, db_domain_info::char_info, db_make_null(), db_make_string(), db_private_alloc, DB_TYPE_BIT, DB_TYPE_CHAR, DB_TYPE_NCHAR, DB_TYPE_NUMERIC, DB_TYPE_VARBIT, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, DB_VALUE_TYPE, db_value::domain, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), db_domain_info::char_info::length, db_value::need_clear, NO_ERROR, NULL, db_domain_info::numeric_info, pr_type_name(), db_domain_info::numeric_info::precision, and db_domain_info::numeric_info::scale.
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
int db_width_bucket | ( | DB_VALUE * | result, |
const DB_VALUE * | value1, | ||
const DB_VALUE * | value2, | ||
const DB_VALUE * | value3, | ||
const DB_VALUE * | value4 | ||
) |
Definition at line 4598 of file arithmetic.c.
References assert, d1, db_datetime::date, db_datetimetz::datetime, DB_BIGINT_PRECISION, DB_FLOAT_DECIMAL_PRECISION, db_get_date(), db_get_datetime(), db_get_datetimetz(), db_get_double(), db_get_time(), db_get_timestamp(), db_get_timestamptz(), DB_INT32_MAX, DB_INTEGER_PRECISION, db_make_int(), db_make_null(), DB_TYPE_BIGINT, DB_TYPE_CHAR, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_SHORT, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, DB_TYPE_UNKNOWN, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, DB_VALUE_DOMAIN_TYPE, DB_VALUE_TYPE, db_width_bucket_calculate_numeric(), DOMAIN_COMPATIBLE, er_clear(), er_errid(), ER_IT_DATA_OVERFLOW, ER_PROC_WIDTH_BUCKET_COUNT, ER_QPROC_INVALID_DATATYPE, ER_QPROC_OVERFLOW_ADDITION, ER_QPROC_OVERFLOW_DIVISION, ER_QPROC_OVERFLOW_SUBTRACTION, get_number_dbval_as_double(), MAX_DOMAIN_NAME_SIZE, MILLISECONDS_OF_ONE_DAY, NO_ERROR, NULL, OR_CHECK_DOUBLE_OVERFLOW, OR_CHECK_INT_OVERFLOW, tp_domain::precision, RETURN_ERROR, RETURN_ERROR_WITH_ARG, tp_domain::scale, db_datetime::time, db_timestamptz::timestamp, tp_domain_free(), tp_domain_name(), tp_domain_new(), tp_domain_resolve_default(), and tp_value_coerce().
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().