CUBRID Engine  latest
string_opfunc.c File Reference
#include "config.h"
#include <assert.h>
#include <ctype.h>
#include <string.h>
#include <errno.h>
#include <math.h>
#include <sys/timeb.h>
#include "string_opfunc.h"
#include "chartype.h"
#include "system_parameter.h"
#include "intl_support.h"
#include "error_manager.h"
#include "tz_support.h"
#include "db_date.h"
#include "misc_string.h"
#include "crypt_opfunc.h"
#include "base64.h"
#include "object_primitive.h"
#include "object_representation.h"
#include "dbtype.h"
#include "elo.h"
#include "es_common.h"
#include "db_elo.h"
#include "string_regex.hpp"
#include "util_func.h"
#include <algorithm>
#include <string>
#include <locale>
#include "parse_tree.h"

Go to the source code of this file.

Macros

#define BYTE_SIZE   (8)
 
#define QSTR_VALUE_PRECISION(value)
 
#define QSTR_MAX_PRECISION(str_type)
 
#define ABS(i)   ((i) >= 0 ? (i) : -(i))
 
#define STACK_SIZE   100
 
#define LEAP(y)   (((y) % 400 == 0) || ((y) % 100 != 0 && (y) % 4 == 0))
 
#define DBL_MAX_DIGITS   ((int)ceil(DBL_MAX_EXP * log10((double) FLT_RADIX)))
 
#define UINT64_MAX_HEX_DIGITS   16
 
#define UINT64_MAX_BIN_DIGITS   64
 
#define LOB_CHUNK_SIZE   (128 * 1024)
 
#define DB_GET_UCHAR(dbval)   (REINTERPRET_CAST (const unsigned char *, db_get_string ((dbval))))
 
#define WHITE_CHARS   " \r\t\n"
 
#define QSTR_DATE_LENGTH   10
 
#define QSTR_TIME_LENGTH   11
 
#define QSTR_TIME_STAMPLENGTH   22
 
#define QSTR_DATETIME_LENGTH   26
 
#define QSTR_TO_CHAR_LEN_MULTIPLIER_RATIO   LOC_PARSE_FRMT_TO_TOKEN_MULT
 
#define MAX_TOKEN_SIZE   16000
 
#define GUID_STANDARD_BYTES_LENGTH   16
 
#define TRIM_FORMAT_STRING(sz, n)   {if (strlen(sz) > n) sz[n] = 0;}
 
#define WHITESPACE(c)   ((c) == ' ' || (c) == '\t' || (c) == '\r' || (c) == '\n')
 
#define ALPHABETICAL(c)
 
#define DIGIT(c)   ((c) >= '0' && (c) <= '9')
 
#define PUNCTUATIONAL(c)
 
#define ESCAPE_CHAR(c)   (c <= 0x1f || (c) == '"' || (c) == '\\')
 
#define STRCHCAT(s, c)
 
#define SKIP_SPACES(ch, end)
 
#define TZD_DEFAULT_EXPECTED_LEN   4
 
#define TZD_MAX_EXPECTED_LEN   TZ_DS_STRING_SIZE
 
#define REPL_POS_ARRAY_EXTENT   32
 
#define PAD   '\0' /* str_pad_char(INTL_CODESET_RAW_BITS, pad, &pad_size) */
 
#define PAD   '\0' /* str_pad_char(INTL_CODESET_RAW_BITS, pad, &pad_size) */
 
#define MAX_STRING_DATE_TOKEN_LEN   LOC_DATA_MONTH_WIDE_SIZE
 
#define AM_NAME_KR   "ojeon"
 
#define PM_NAME_KR   "ohu"
 
#define AM_NAME_KR_EUC   "\xbf\xc0\xc0\xfc"
 
#define PM_NAME_KR_EUC   "\xbf\xc0\xc8\xc4"
 
#define AM_NAME_KR_UTF8   "\xec\x98\xa4\xec\xa0\x84"
 
#define PM_NAME_KR_UTF8   "\xec\x98\xa4\xed\x9b\x84"
 
#define DB_NUMERIC_E38_MAX   "99999999999999999999999999999999999999"
 
#define PLUS   1
 
#define MINUS   0
 

Enumerations

enum  QSTR_CATEGORY { QSTR_UNKNOWN, QSTR_CHAR, QSTR_NATIONAL_CHAR, QSTR_BIT }
 
enum  {
  am_NAME = 0, pm_NAME, Am_NAME, Pm_NAME,
  AM_NAME, PM_NAME, a_m_NAME, p_m_NAME,
  A_m_NAME, P_m_NAME, A_M_NAME, P_M_NAME
}
 
enum  NUMBER_FORMAT {
  N_END = -2, N_INVALID = -1, N_FORMAT, N_SPACE,
  N_TEXT
}
 
enum  STRING_DATE_TOKEN {
  SDT_DAY = 0, SDT_MONTH, SDT_DAY_SHORT, SDT_MONTH_SHORT,
  SDT_AM_PM
}
 

Functions

static int db_string_prefix_compare (const DB_VALUE *string1, const DB_VALUE *string2, DB_VALUE *result)
 
static char db_string_escape_char (char c)
 
static int qstr_trim (MISC_OPERAND tr_operand, const unsigned char *trim, int trim_length, int trim_size, const unsigned char *src_ptr, DB_TYPE src_type, int src_length, int src_size, INTL_CODESET codeset, unsigned char **res, DB_TYPE *res_type, int *res_length, int *res_size)
 
static void trim_leading (const unsigned char *trim_charset_ptr, int trim_charset_size, const unsigned char *src_ptr, DB_TYPE src_type, int src_length, int src_size, INTL_CODESET codeset, unsigned char **lead_trimmed_ptr, int *lead_trimmed_length, int *lead_trimmed_size, bool skip_spaces)
 
static int qstr_pad (MISC_OPERAND pad_operand, int pad_length, const unsigned char *pad_charset_ptr, int pad_charset_length, int pad_charset_size, const unsigned char *src_ptr, DB_TYPE src_type, int src_length, int src_size, INTL_CODESET codeset, unsigned char **result, DB_TYPE *result_type, int *result_length, int *result_size)
 
static int qstr_eval_like (const char *tar, int tar_length, const char *expr, int expr_length, const char *escape, INTL_CODESET codeset, int coll_id)
 
static int qstr_replace (const unsigned char *src_buf, int src_len, int src_size, INTL_CODESET codeset, int coll_id, const unsigned char *srch_str_buf, int srch_str_size, const unsigned char *repl_str_buf, int repl_str_size, unsigned char **result_buf, int *result_len, int *result_size)
 
static int qstr_translate (const unsigned char *src_ptr, DB_TYPE src_type, int src_size, INTL_CODESET codeset, const unsigned char *from_str_ptr, int from_str_size, const unsigned char *to_str_ptr, int to_str_size, unsigned char **result_ptr, DB_TYPE *result_type, int *result_len, int *result_size)
 
static QSTR_CATEGORY qstr_get_category (const DB_VALUE *s)
 
static bool is_char_string (const DB_VALUE *s)
 
static bool is_integer (const DB_VALUE *i)
 
static bool is_number (const DB_VALUE *n)
 
static int qstr_grow_string (DB_VALUE *src_string, DB_VALUE *result, int new_size)
 
static int qstr_concatenate (const unsigned char *s1, int s1_length, int s1_precision, DB_TYPE s1_type, const unsigned char *s2, int s2_length, int s2_precision, DB_TYPE s2_type, INTL_CODESET codeset, unsigned char **result, int *result_length, int *result_size, DB_TYPE *result_type, DB_DATA_STATUS *data_status)
 
static int qstr_bit_concatenate (const unsigned char *s1, int s1_length, int s1_precision, DB_TYPE s1_type, const unsigned char *s2, int s2_length, int s2_precision, DB_TYPE s2_type, unsigned char **result, int *result_length, int *result_size, DB_TYPE *result_type, DB_DATA_STATUS *data_status)
 
static bool varchar_truncated (const unsigned char *s, DB_TYPE s_type, int s_length, int used_chars, INTL_CODESET codeset)
 
static bool varbit_truncated (const unsigned char *s, int s_length, int used_bits)
 
static void bit_ncat (unsigned char *r, int offset, const unsigned char *s, int n)
 
static int bstring_fls (const char *s, int n)
 
static int qstr_bit_coerce (const unsigned char *src, int src_length, int src_precision, DB_TYPE src_type, unsigned char **dest, int *dest_length, int dest_precision, DB_TYPE dest_type, DB_DATA_STATUS *data_status)
 
static int qstr_coerce (const unsigned char *src, int src_length, int src_precision, DB_TYPE src_type, INTL_CODESET src_codeset, INTL_CODESET dest_codeset, unsigned char **dest, int *dest_length, int *dest_size, int dest_precision, DB_TYPE dest_type, DB_DATA_STATUS *data_status)
 
static int qstr_position (const char *sub_string, const int sub_size, const int sub_length, const char *src_string, const char *src_end, const char *src_string_bound, int src_length, int coll_id, bool is_forward_search, int *position)
 
static int qstr_bit_position (const unsigned char *sub_string, int sub_length, const unsigned char *src_string, int src_length, int *position)
 
static int shift_left (unsigned char *bit_string, int bit_string_size)
 
static int qstr_substring (const unsigned char *src, int src_length, int start, int length, INTL_CODESET codeset, unsigned char **r, int *r_length, int *r_size)
 
static int qstr_bit_substring (const unsigned char *src, int src_length, int start, int length, unsigned char **r, int *r_length)
 
static void left_nshift (const unsigned char *bit_string, int bit_string_size, int shift_amount, unsigned char *r, int r_size)
 
static int qstr_ffs (int v)
 
static int hextoi (char hex_char)
 
static int adjust_precision (char *data, int precision, int scale)
 
static int date_to_char (const DB_VALUE *src_value, const DB_VALUE *format_str, const DB_VALUE *date_lang, DB_VALUE *result_str, const TP_DOMAIN *domain)
 
static int number_to_char (const DB_VALUE *src_value, const DB_VALUE *format_str, const DB_VALUE *number_lang, DB_VALUE *result_str, const TP_DOMAIN *domain)
 
static int lob_to_bit_char (const DB_VALUE *src_value, DB_VALUE *result_value, DB_TYPE lob_type, int max_length)
 
static int lob_from_file (const char *path, const DB_VALUE *src_value, DB_VALUE *lob_value, DB_TYPE lob_type)
 
static int lob_length (const DB_VALUE *src_value, DB_VALUE *result_value)
 
static int make_number_to_char (const INTL_LANG lang, char *num_string, char *format_str, int *length, DB_CURRENCY currency, char **result_str, INTL_CODESET codeset)
 
static int make_scientific_notation (char *src_string, int cipher)
 
static int roundoff (const INTL_LANG lang, char *src_string, int flag, int *cipher, char *format)
 
static int scientific_to_decimal_string (const INTL_LANG lang, char *src_string, char **scientific_str)
 
static int to_number_next_state (const int previous_state, const int input_char, const INTL_LANG number_lang_id)
 
static int make_number (char *src, char *last_src, INTL_CODESET codeset, char *token, int *token_length, DB_VALUE *r, const int precision, const int scale, const INTL_LANG number_lang_id)
 
static int get_number_token (const INTL_LANG lang, char *fsp, int *length, char *last_position, char **next_fsp, INTL_CODESET codeset)
 
static TIMESTAMP_FORMAT get_next_format (const char *sp, const INTL_CODESET codeset, DB_TYPE str_type, int *format_length, const char **next_pos)
 
static int get_cur_year (void)
 
static int get_cur_month (void)
 
static int add_and_normalize_date_time (int *years, int *months, int *days, int *hours, int *minutes, int *seconds, int *milliseconds, DB_BIGINT y, DB_BIGINT m, DB_BIGINT d, DB_BIGINT h, DB_BIGINT mi, DB_BIGINT s, DB_BIGINT ms)
 
static int sub_and_normalize_date_time (int *years, int *months, int *days, int *hours, int *minutes, int *seconds, int *milliseconds, DB_BIGINT y, DB_BIGINT m, DB_BIGINT d, DB_BIGINT h, DB_BIGINT mi, DB_BIGINT s, DB_BIGINT ms)
 
static void set_time_argument (struct tm *dest, int year, int month, int day, int hour, int min, int sec)
 
static long calc_unix_timestamp (struct tm *time_argument)
 
static int db_str_to_millisec (const char *str)
 
static void copy_and_shift_values (int shift, int n, DB_BIGINT *first,...)
 
static DB_BIGINT get_single_unit_value (const char *expr, DB_BIGINT int_val)
 
static int db_date_add_sub_interval_expr (DB_VALUE *result, const DB_VALUE *date, const DB_VALUE *expr, const int unit, int is_add)
 
static int db_date_add_sub_interval_days (DB_VALUE *result, const DB_VALUE *date, const DB_VALUE *db_days, bool is_add)
 
static int db_round_dbvalue_to_int (const DB_VALUE *src, int *result)
 
static int db_get_next_like_pattern_character (const char *const pattern, const int length, const INTL_CODESET codeset, const bool has_escape_char, const char *escape_str, int *const position, char **crt_char_p, bool *const is_escaped)
 
static bool is_safe_last_char_for_like_optimization (const char *chr, const bool is_escaped, INTL_CODESET codeset)
 
static int db_check_or_create_null_term_string (const DB_VALUE *str_val, char *pre_alloc_buf, int pre_alloc_buf_size, bool ignore_prec_spaces, bool ignore_trail_spaces, char **str_out, bool *do_alloc)
 
static bool is_str_valid_number (char *num_p, char *str_end, int base, INTL_CODESET codeset)
 
static bool is_valid_ip_slice (const char *ipslice)
 
static int parse_digits (char *s, int *nr, int cnt)
 
static int parse_time_string (const char *timestr, int timestr_size, int *sign, int *h, int *m, int *s, int *ms)
 
static int get_string_date_token_id (const STRING_DATE_TOKEN token_type, const INTL_LANG intl_lang_id, const char *cs, const INTL_CODESET codeset, int *token_id, int *token_size)
 
static int print_string_date_token (const STRING_DATE_TOKEN token_type, const INTL_LANG intl_lang_id, const INTL_CODESET codeset, int token_id, int case_mode, char *buffer, int *token_size)
 
static void convert_locale_number (char *sz, const int size, const INTL_LANG src_locale, const INTL_LANG dst_locale)
 
static int parse_tzd (const char *str, const int max_expect_len)
 
int db_string_compare (const DB_VALUE *string1, const DB_VALUE *string2, DB_VALUE *result)
 
int db_string_unique_prefix (const DB_VALUE *db_string1, const DB_VALUE *db_string2, DB_VALUE *db_result, TP_DOMAIN *key_domain)
 
int db_string_concatenate (const DB_VALUE *string1, const DB_VALUE *string2, DB_VALUE *result, DB_DATA_STATUS *data_status)
 
int db_string_chr (DB_VALUE *res, DB_VALUE *dbval1, DB_VALUE *dbval2)
 
int db_string_instr (const DB_VALUE *src_string, const DB_VALUE *sub_string, const DB_VALUE *start_pos, DB_VALUE *result)
 
int db_string_space (DB_VALUE const *count, DB_VALUE *result)
 
int db_string_position (const DB_VALUE *sub_string, const DB_VALUE *src_string, DB_VALUE *result)
 
int db_string_substring (const MISC_OPERAND substr_operand, const DB_VALUE *src_string, const DB_VALUE *start_position, const DB_VALUE *extraction_length, DB_VALUE *sub_string)
 
int db_string_escape_str (const char *src_str, size_t src_size, char **res_string, size_t *dest_size)
 
int db_string_quote (const DB_VALUE *str, DB_VALUE *res)
 
int db_string_repeat (const DB_VALUE *src_string, const DB_VALUE *count, DB_VALUE *result)
 
int db_string_substring_index (DB_VALUE *src_string, DB_VALUE *delim_string, const DB_VALUE *count, DB_VALUE *result)
 
int db_string_sha_one (DB_VALUE const *src, DB_VALUE *result)
 
int db_string_sha_two (DB_VALUE const *src, DB_VALUE const *hash_len, DB_VALUE *result)
 
int db_string_aes_encrypt (DB_VALUE const *src, DB_VALUE const *key, DB_VALUE *result)
 
int db_string_aes_decrypt (DB_VALUE const *src, DB_VALUE const *key, DB_VALUE *result)
 
int db_string_md5 (DB_VALUE const *val, DB_VALUE *result)
 
int db_string_insert_substring (DB_VALUE *src_string, const DB_VALUE *position, const DB_VALUE *length, DB_VALUE *sub_string, DB_VALUE *result)
 
int db_string_elt (DB_VALUE *result, DB_VALUE *arg[], int const num_args)
 
int db_string_bit_length (const DB_VALUE *string, DB_VALUE *bit_count)
 
int db_string_char_length (const DB_VALUE *string, DB_VALUE *char_count)
 
int db_string_lower (const DB_VALUE *string, DB_VALUE *lower_string)
 
int db_string_upper (const DB_VALUE *string, DB_VALUE *upper_string)
 
int db_string_trim (const MISC_OPERAND tr_operand, const DB_VALUE *trim_charset, const DB_VALUE *src_string, DB_VALUE *trimmed_string)
 
void qstr_trim_trailing (const unsigned char *trim_charset_ptr, int trim_charset_size, const unsigned char *src_ptr, DB_TYPE src_type, int src_length, int src_size, INTL_CODESET codeset, int *trail_trimmed_length, int *trail_trimmed_size, bool trim_ascii_spaces)
 
int db_string_pad (const MISC_OPERAND pad_operand, const DB_VALUE *src_string, const DB_VALUE *pad_length, const DB_VALUE *pad_charset, DB_VALUE *padded_string)
 
int db_string_like (const DB_VALUE *src_string, const DB_VALUE *pattern, const DB_VALUE *esc_char, int *result)
 
int db_string_rlike (const DB_VALUE *src, const DB_VALUE *pattern, const DB_VALUE *case_sensitive, cub_regex_object **comp_regex, char **comp_pattern, int *result)
 
int db_string_regexp_count (DB_VALUE *result, DB_VALUE *args[], int const num_args, cub_regex_object **comp_regex, char **comp_pattern)
 
int db_string_regexp_instr (DB_VALUE *result, DB_VALUE *args[], int const num_args, cub_regex_object **comp_regex, char **comp_pattern)
 
int db_string_regexp_like (DB_VALUE *result, DB_VALUE *args[], int const num_args, cub_regex_object **comp_regex, char **comp_pattern)
 
int db_string_regexp_replace (DB_VALUE *result, DB_VALUE *args[], int const num_args, cub_regex_object **comp_regex, char **comp_pattern)
 
int db_string_regexp_substr (DB_VALUE *result, DB_VALUE *args[], int const num_args, cub_regex_object **comp_regex, char **comp_pattern)
 
int db_string_limit_size_string (DB_VALUE *src_string, DB_VALUE *result, const int new_size, int *spare_bytes)
 
int db_string_fix_string_size (DB_VALUE *src_string)
 
int db_string_replace (const DB_VALUE *src_string, const DB_VALUE *srch_string, const DB_VALUE *repl_string, DB_VALUE *replaced_string)
 
int db_string_translate (const DB_VALUE *src_string, const DB_VALUE *from_string, const DB_VALUE *to_string, DB_VALUE *transed_string)
 
int db_bit_string_coerce (const DB_VALUE *src_string, DB_VALUE *dest_string, DB_DATA_STATUS *data_status)
 
int db_char_string_coerce (const DB_VALUE *src_string, DB_VALUE *dest_string, DB_DATA_STATUS *data_status)
 
int db_string_make_empty_typed_string (DB_VALUE *db_val, const DB_TYPE db_type, int precision, int codeset, int collation_id)
 
int db_find_string_in_in_set (const DB_VALUE *needle, const DB_VALUE *stack, DB_VALUE *result)
 
int db_bigint_to_binary_string (const DB_VALUE *src_bigint, DB_VALUE *result)
 
int db_add_time (const DB_VALUE *left, const DB_VALUE *right, DB_VALUE *result, const TP_DOMAIN *domain)
 
int db_json_convert_to_utf8 (DB_VALUE *dbval)
 
int db_json_copy_and_convert_to_utf8 (const DB_VALUE *src_dbval, DB_VALUE *dest_dbval, const DB_VALUE **json_str_dbval)
 
int db_string_convert_to (const DB_VALUE *src_str_dbval, DB_VALUE *dest_str_dbval, INTL_CODESET dest_codeset, int dest_col)
 
unsigned char * qstr_pad_string (unsigned char *s, int length, INTL_CODESET codeset)
 
int qstr_bin_to_hex (char *dest, int dest_size, const char *src, int src_size)
 
int qstr_hex_to_bin (char *dest, int dest_size, const char *src, int src_size)
 
int qstr_bit_to_bin (char *dest, int dest_size, const char *src, int src_size)
 
void qstr_bit_to_hex_coerce (char *buffer, int buffer_size, const char *src, int src_length, int pad_flag, int *copy_size, int *truncation)
 
int db_get_string_length (const DB_VALUE *value)
 
void qstr_make_typed_string (const DB_TYPE db_type, DB_VALUE *value, const int precision, DB_CONST_C_CHAR src, const int s_unit, const int codeset, const int collation_id)
 
int bit_compare (const unsigned char *string1, int size1, const unsigned char *string2, int size2)
 
int varbit_compare (const unsigned char *string1, int size1, const unsigned char *string2, int size2)
 
int db_unix_timestamp (const DB_VALUE *src_date, DB_VALUE *result_timestamp)
 
int db_datetime_to_timestamp (const DB_VALUE *src_datetime, DB_VALUE *result_timestamp)
 
int db_get_date_dayofyear (const DB_VALUE *src_date, DB_VALUE *result)
 
int db_get_date_weekday (const DB_VALUE *src_date, const int mode, DB_VALUE *result)
 
int db_get_date_quarter (const DB_VALUE *src_date, DB_VALUE *result)
 
int db_get_date_totaldays (const DB_VALUE *src_date, DB_VALUE *result)
 
int db_get_date_from_days (const DB_VALUE *src, DB_VALUE *result)
 
int db_add_days_to_year (const DB_VALUE *src_year, const DB_VALUE *src_days, DB_VALUE *result)
 
int db_convert_to_time (const DB_VALUE *src_hour, const DB_VALUE *src_minute, const DB_VALUE *src_second, DB_VALUE *result)
 
int db_convert_sec_to_time (const DB_VALUE *src, DB_VALUE *result)
 
int db_convert_time_to_sec (const DB_VALUE *src_date, DB_VALUE *result)
 
int db_get_date_week (const DB_VALUE *src_date, const DB_VALUE *mode, DB_VALUE *result)
 
int db_get_date_item (const DB_VALUE *src_date, const int item_type, DB_VALUE *result)
 
int db_get_time_item (const DB_VALUE *src_date, const int item_type, DB_VALUE *result)
 
int db_time_format (const DB_VALUE *src_value, const DB_VALUE *format, const DB_VALUE *date_lang, DB_VALUE *result, const TP_DOMAIN *domain)
 
int db_timestamp (const DB_VALUE *src_datetime1, const DB_VALUE *src_time2, DB_VALUE *result_datetime)
 
int db_add_months (const DB_VALUE *src_date, const DB_VALUE *nmonth, DB_VALUE *result_date)
 
int db_last_day (const DB_VALUE *src_date, DB_VALUE *result_day)
 
int db_months_between (const DB_VALUE *start_mon, const DB_VALUE *end_mon, DB_VALUE *result_mon)
 
int db_sys_date (DB_VALUE *result_date)
 
int db_sys_time (DB_VALUE *result_time)
 
int db_sys_timestamp (DB_VALUE *result_timestamp)
 
int db_sys_datetime (DB_VALUE *result_datetime)
 
int db_sys_date_and_epoch_time (DB_VALUE *dt_dbval, DB_VALUE *ts_dbval)
 
int db_sys_timezone (DB_VALUE *result_timezone)
 
int get_last_day (int month, int year)
 
int db_to_char (const DB_VALUE *src_value, const DB_VALUE *format_or_length, const DB_VALUE *lang_str, DB_VALUE *result_str, const TP_DOMAIN *domain)
 
int db_to_date (const DB_VALUE *src_str, const DB_VALUE *format_str, const DB_VALUE *date_lang, DB_VALUE *result_date)
 
int db_to_time (const DB_VALUE *src_str, const DB_VALUE *format_str, const DB_VALUE *date_lang, const DB_TYPE type, DB_VALUE *result_time)
 
int db_to_timestamp (const DB_VALUE *src_str, const DB_VALUE *format_str, const DB_VALUE *date_lang, const DB_TYPE type, DB_VALUE *result_timestamp)
 
int db_to_datetime (const DB_VALUE *src_str, const DB_VALUE *format_str, const DB_VALUE *date_lang, const DB_TYPE type, DB_VALUE *result_datetime)
 
int db_to_number (const DB_VALUE *src_str, const DB_VALUE *format_str, const DB_VALUE *number_lang, DB_VALUE *result_num)
 
int get_day (int month, int day, int year)
 
int db_format (const DB_VALUE *value, const DB_VALUE *decimals, const DB_VALUE *number_lang, DB_VALUE *result, const TP_DOMAIN *domain)
 
int db_string_reverse (const DB_VALUE *src_str, DB_VALUE *result_str)
 
int db_date_add_interval_days (DB_VALUE *result, const DB_VALUE *date, const DB_VALUE *db_days)
 
int db_date_sub_interval_days (DB_VALUE *result, const DB_VALUE *date, const DB_VALUE *db_days)
 
int db_date_add_interval_expr (DB_VALUE *result, const DB_VALUE *date, const DB_VALUE *expr, const int unit)
 
int db_date_sub_interval_expr (DB_VALUE *result, const DB_VALUE *date, const DB_VALUE *expr, const int unit)
 
int db_date_format (const DB_VALUE *date_value, const DB_VALUE *format, const DB_VALUE *date_lang, DB_VALUE *result, const TP_DOMAIN *domain)
 
int db_str_to_date (const DB_VALUE *str, const DB_VALUE *format, const DB_VALUE *date_lang, DB_VALUE *result, TP_DOMAIN *domain)
 
int db_time_dbval (DB_VALUE *result, const DB_VALUE *datetime_value, const TP_DOMAIN *domain)
 
int db_date_dbval (DB_VALUE *result, const DB_VALUE *date_value, const TP_DOMAIN *domain)
 
int count_leap_years_up_to (int year)
 
int count_nonleap_years_up_to (int year)
 
int db_date_diff (const DB_VALUE *date_value1, const DB_VALUE *date_value2, DB_VALUE *result)
 
int db_from_unixtime (const DB_VALUE *src_value, const DB_VALUE *format, const DB_VALUE *date_lang, DB_VALUE *result, const TP_DOMAIN *domain)
 
int db_time_diff (const DB_VALUE *val1, const DB_VALUE *val2, DB_VALUE *result)
 
int db_bit_to_blob (const DB_VALUE *src_value, DB_VALUE *result_value)
 
int db_char_to_blob (const DB_VALUE *src_value, DB_VALUE *result_value)
 
int db_blob_to_bit (const DB_VALUE *src_value, const DB_VALUE *length_value, DB_VALUE *result_value)
 
int db_blob_from_file (const DB_VALUE *src_value, DB_VALUE *result_value)
 
int db_blob_length (const DB_VALUE *src_value, DB_VALUE *result_value)
 
int db_char_to_clob (const DB_VALUE *src_value, DB_VALUE *result_value)
 
int db_clob_to_char (const DB_VALUE *src_value, const DB_VALUE *codeset_value, DB_VALUE *result_value)
 
int db_clob_from_file (const DB_VALUE *src_value, DB_VALUE *result_value)
 
int db_clob_length (const DB_VALUE *src_value, DB_VALUE *result_value)
 
int db_get_datetime_from_dbvalue (const DB_VALUE *src_date, int *year, int *month, int *day, int *hour, int *minute, int *second, int *millisecond, const char **endp)
 
int db_get_time_from_dbvalue (const DB_VALUE *src_date, int *hour, int *minute, int *second, int *millisecond)
 
int db_get_info_for_like_optimization (const DB_VALUE *const pattern, const bool has_escape_char, const char *escape_str, int *const num_logical_chars, int *const last_safe_logical_pos, int *const num_match_many, int *const num_match_one)
 
int db_get_like_optimization_bounds (const DB_VALUE *const pattern, DB_VALUE *bound, const bool has_escape_char, const char *escape_str, const bool compute_lower_bound, const int last_safe_logical_pos)
 
int db_compress_like_pattern (const DB_VALUE *const pattern, DB_VALUE *compressed_pattern, const bool has_escape_char, const char *escape_str)
 
int db_like_bound (const DB_VALUE *const src_pattern, const DB_VALUE *const src_escape, DB_VALUE *const result_bound, const bool compute_lower_bound)
 
int db_hex (const DB_VALUE *param, DB_VALUE *result)
 
int db_guid (THREAD_ENTRY *thread_p, DB_VALUE *result)
 
int db_ascii (const DB_VALUE *param, DB_VALUE *result)
 
int db_conv (const DB_VALUE *num, const DB_VALUE *from_base, const DB_VALUE *to_base, DB_VALUE *result)
 
void init_builtin_calendar_names (LANG_LOCALE_DATA *lld)
 
int db_value_to_enumeration_value (const DB_VALUE *src, DB_VALUE *result, const TP_DOMAIN *enum_domain)
 
int db_inet_aton (DB_VALUE *result_numbered_ip, const DB_VALUE *string)
 
int db_inet_ntoa (DB_VALUE *result_ip_string, const DB_VALUE *number)
 
int db_get_date_format (const DB_VALUE *format_str, TIMESTAMP_FORMAT *format)
 
int db_get_cs_coll_info (DB_VALUE *result, const DB_VALUE *val, const int mode)
 
int db_string_index_prefix (const DB_VALUE *string1, const DB_VALUE *string2, const DB_VALUE *index_type, DB_VALUE *prefix_index)
 
int db_string_to_base64 (DB_VALUE const *src, DB_VALUE *result)
 
int db_string_from_base64 (DB_VALUE const *src, DB_VALUE *result)
 
int db_string_extract_dbval (const MISC_OPERAND extr_operand, DB_VALUE *dbval_p, DB_VALUE *result_p, TP_DOMAIN *domain_p)
 
int db_new_time (DB_VALUE *time_val, DB_VALUE *tz_source, DB_VALUE *tz_dest, DB_VALUE *result_time)
 
int db_tz_offset (const DB_VALUE *src_str, DB_VALUE *result_str, DB_DATETIME *datetime)
 
int db_from_tz (DB_VALUE *time_val, DB_VALUE *tz, DB_VALUE *time_val_with_tz)
 
int db_conv_tz (DB_VALUE *time_val, DB_VALUE *result_time)
 

Variables

const char * Month_name_ISO [][12]
 
const char * Month_name_UTF8 [][12]
 
const char * Month_name_EUCKR [][12]
 
const char Month_name_parse_order [][12]
 
const char * Day_name_ISO [][7]
 
const char * Day_name_UTF8 [][7]
 
const char * Day_name_EUCKR [][7]
 
const char Day_name_parse_order [][7]
 
const char * Short_Month_name_ISO [][12]
 
const char * Short_Month_name_UTF8 [][12]
 
const char * Short_Month_name_EUCKR [][12]
 
const char Short_Month_name_parse_order [][12]
 
const char * Short_Day_name_ISO [][7]
 
const char * Short_Day_name_UTF8 [][7]
 
const char * Short_Day_name_EUCKR [][7]
 
const char Short_Day_name_parse_order [][7]
 
const char AM_PM_parse_order [][12]
 
const char * Am_Pm_name_ISO [][12]
 
const char * Am_Pm_name_UTF8 [][12]
 
const char * Am_Pm_name_EUCKR [][12]
 

Macro Definition Documentation

#define ABS (   i)    ((i) >= 0 ? (i) : -(i))

Definition at line 86 of file string_opfunc.c.

Referenced by db_conv(), db_date_add_sub_interval_expr(), and db_string_substring().

#define ALPHABETICAL (   c)
Value:
(((c) >= 'A' && (c) <= 'Z') || \
((c) >= 'a' && (c) <= 'z'))

Definition at line 300 of file string_opfunc.c.

#define AM_NAME_KR   "ojeon"

Definition at line 13722 of file string_opfunc.c.

#define AM_NAME_KR_EUC   "\xbf\xc0\xc0\xfc"

Definition at line 13725 of file string_opfunc.c.

#define AM_NAME_KR_UTF8   "\xec\x98\xa4\xec\xa0\x84"

Definition at line 13728 of file string_opfunc.c.

#define DB_NUMERIC_E38_MAX   "99999999999999999999999999999999999999"

Referenced by db_to_number().

#define DBL_MAX_DIGITS   ((int)ceil(DBL_MAX_EXP * log10((double) FLT_RADIX)))

Definition at line 92 of file string_opfunc.c.

#define DIGIT (   c)    ((c) >= '0' && (c) <= '9')

Definition at line 302 of file string_opfunc.c.

#define ESCAPE_CHAR (   c)    (c <= 0x1f || (c) == '"' || (c) == '\\')

Definition at line 310 of file string_opfunc.c.

Referenced by db_string_escape_str().

#define GUID_STANDARD_BYTES_LENGTH   16

Definition at line 159 of file string_opfunc.c.

Referenced by db_guid().

#define LEAP (   y)    (((y) % 400 == 0) || ((y) % 100 != 0 && (y) % 4 == 0))
#define LOB_CHUNK_SIZE   (128 * 1024)

Definition at line 96 of file string_opfunc.c.

Referenced by lob_from_file().

#define MAX_STRING_DATE_TOKEN_LEN   LOC_DATA_MONTH_WIDE_SIZE

Definition at line 13430 of file string_opfunc.c.

#define MAX_TOKEN_SIZE   16000
#define MINUS   0
#define PAD   '\0' /* str_pad_char(INTL_CODESET_RAW_BITS, pad, &pad_size) */

Referenced by is_number().

#define PAD   '\0' /* str_pad_char(INTL_CODESET_RAW_BITS, pad, &pad_size) */
#define PLUS   1
#define PM_NAME_KR   "ohu"

Definition at line 13723 of file string_opfunc.c.

#define PM_NAME_KR_EUC   "\xbf\xc0\xc8\xc4"

Definition at line 13726 of file string_opfunc.c.

#define PM_NAME_KR_UTF8   "\xec\x98\xa4\xed\x9b\x84"

Definition at line 13729 of file string_opfunc.c.

#define PUNCTUATIONAL (   c)
Value:
((c) == '-' || (c) == '/' || (c) == ',' || (c) == '.' \
|| (c) == ';' || (c) == ':' || (c) == ' ' \
|| (c) == '\t' || (c) == '\n')

Definition at line 305 of file string_opfunc.c.

#define QSTR_DATE_LENGTH   10

Definition at line 147 of file string_opfunc.c.

Referenced by date_to_char().

#define QSTR_DATETIME_LENGTH   26

Definition at line 150 of file string_opfunc.c.

Referenced by date_to_char(), and db_add_time().

#define QSTR_MAX_PRECISION (   str_type)
Value:
#define QSTR_IS_CHAR(s)
Definition: string_opfunc.h:40
#define DB_MAX_VARBIT_PRECISION
Definition: dbtype_def.h:552
#define DB_MAX_VARCHAR_PRECISION
Definition: dbtype_def.h:536
#define QSTR_IS_NATIONAL_CHAR(s)
Definition: string_opfunc.h:42
#define DB_MAX_VARNCHAR_PRECISION
Definition: dbtype_def.h:546

Definition at line 81 of file string_opfunc.c.

Referenced by db_string_concatenate(), db_string_pad(), db_string_trim(), qstr_concatenate(), and qstr_grow_string().

#define QSTR_TIME_LENGTH   11

Definition at line 148 of file string_opfunc.c.

Referenced by date_to_char(), and db_add_time().

#define QSTR_TIME_STAMPLENGTH   22

Definition at line 149 of file string_opfunc.c.

Referenced by date_to_char().

#define QSTR_TO_CHAR_LEN_MULTIPLIER_RATIO   LOC_PARSE_FRMT_TO_TOKEN_MULT

Definition at line 155 of file string_opfunc.c.

Referenced by date_to_char().

#define QSTR_VALUE_PRECISION (   value)
Value:
#define DB_VALUE_PRECISION(value)
Definition: dbtype.h:73
#define TP_FLOATING_PRECISION_VALUE
int db_get_string_length(const DB_VALUE *value)

Definition at line 76 of file string_opfunc.c.

Referenced by db_bit_string_coerce(), db_char_string_coerce(), db_string_concatenate(), and db_string_convert_to().

#define REPL_POS_ARRAY_EXTENT   32

Referenced by qstr_replace().

#define SKIP_SPACES (   ch,
  end 
)
Value:
do {\
while (ch != end && char_isspace(*(ch))) (ch)++; \
} while(0)
int char_isspace(int c)
Definition: chartype.c:109
while(1)
Definition: cnvlex.c:816

Definition at line 319 of file string_opfunc.c.

Referenced by parse_time_string().

#define STACK_SIZE   100

Definition at line 88 of file string_opfunc.c.

Referenced by qstr_eval_like().

#define STRCHCAT (   s,
 
)
Value:
{\
char __cch__[2];\
__cch__[0] = c;__cch__[1] = 0; strcat(s, __cch__);\
}

Definition at line 313 of file string_opfunc.c.

Referenced by db_date_format(), db_str_to_date(), db_time_format(), and parse_digits().

#define TRIM_FORMAT_STRING (   sz,
 
)    {if (strlen(sz) > n) sz[n] = 0;}

Definition at line 298 of file string_opfunc.c.

#define TZD_DEFAULT_EXPECTED_LEN   4

Definition at line 323 of file string_opfunc.c.

Referenced by db_str_to_date().

#define TZD_MAX_EXPECTED_LEN   TZ_DS_STRING_SIZE

Definition at line 324 of file string_opfunc.c.

Referenced by db_str_to_date(), db_to_datetime(), db_to_time(), and db_to_timestamp().

#define UINT64_MAX_BIN_DIGITS   64

Definition at line 94 of file string_opfunc.c.

Referenced by db_conv().

#define UINT64_MAX_HEX_DIGITS   16

Definition at line 93 of file string_opfunc.c.

Referenced by db_hex().

#define WHITE_CHARS   " \r\t\n"
#define WHITESPACE (   c)    ((c) == ' ' || (c) == '\t' || (c) == '\r' || (c) == '\n')

Definition at line 299 of file string_opfunc.c.

Referenced by db_str_to_date(), get_string_date_token_id(), and parse_digits().

Enumeration Type Documentation

anonymous enum
Enumerator
am_NAME 
pm_NAME 
Am_NAME 
Pm_NAME 
AM_NAME 
PM_NAME 
a_m_NAME 
p_m_NAME 
A_m_NAME 
P_m_NAME 
A_M_NAME 
P_M_NAME 

Definition at line 119 of file string_opfunc.c.

Enumerator
N_END 
N_INVALID 
N_FORMAT 
N_SPACE 
N_TEXT 

Definition at line 127 of file string_opfunc.c.

Enumerator
QSTR_UNKNOWN 
QSTR_CHAR 
QSTR_NATIONAL_CHAR 
QSTR_BIT 

Definition at line 110 of file string_opfunc.c.

Enumerator
SDT_DAY 
SDT_MONTH 
SDT_DAY_SHORT 
SDT_MONTH_SHORT 
SDT_AM_PM 

Definition at line 136 of file string_opfunc.c.

Function Documentation

int add_and_normalize_date_time ( int *  years,
int *  months,
int *  days,
int *  hours,
int *  minutes,
int *  seconds,
int *  milliseconds,
DB_BIGINT  y,
DB_BIGINT  m,
DB_BIGINT  d,
DB_BIGINT  h,
DB_BIGINT  mi,
DB_BIGINT  s,
DB_BIGINT  ms 
)
static

Definition at line 20710 of file string_opfunc.c.

References ER_FAILED, i, LEAP, and NO_ERROR.

Referenced by db_add_time(), db_date_add_sub_interval_days(), and db_date_add_sub_interval_expr().

Here is the caller graph for this function:

static int adjust_precision ( char *  data,
int  precision,
int  scale 
)
static

Definition at line 16777 of file string_opfunc.c.

References char_isdigit(), char_isspace(), DB_DEFAULT_NUMERIC_PRECISION, DB_MAX_NUMERIC_PRECISION, DOMAIN_COMPATIBLE, DOMAIN_INCOMPATIBLE, DOMAIN_OVERFLOW, i, NO_ERROR, and NULL.

Referenced by make_number().

Here is the caller graph for this function:

int bit_compare ( const unsigned char *  string1,
int  size1,
const unsigned char *  string2,
int  size2 
)

Definition at line 8958 of file string_opfunc.c.

References assert, cmp, and i.

Referenced by mr_cmpdisk_bit_internal(), mr_cmpval_bit(), and mr_cmpval_bit2().

Here is the caller graph for this function:

static void bit_ncat ( unsigned char *  r,
int  offset,
const unsigned char *  s,
int  n 
)
static

Definition at line 9947 of file string_opfunc.c.

References BYTE_SIZE, i, and QSTR_NUM_BYTES.

Referenced by qstr_bit_coerce(), and qstr_bit_concatenate().

Here is the caller graph for this function:

static int bstring_fls ( const char *  s,
int  n 
)
static

Definition at line 10017 of file string_opfunc.c.

References BYTE_SIZE, and qstr_ffs().

Referenced by varbit_truncated().

Here is the caller graph for this function:

static long calc_unix_timestamp ( struct tm *  time_argument)
static

Definition at line 11037 of file string_opfunc.c.

References char_isalpha(), char_isdigit(), i, and NULL.

static void convert_locale_number ( char *  sz,
const int  size,
const INTL_LANG  src_locale,
const INTL_LANG  dst_locale 
)
static

Definition at line 27041 of file string_opfunc.c.

References assert, lang_digit_fractional_symbol(), and lang_digit_grouping_symbol().

Referenced by db_format(), make_number(), and number_to_char().

Here is the caller graph for this function:

static void copy_and_shift_values ( int  shift,
int  n,
DB_BIGINT first,
  ... 
)
static

Definition at line 21579 of file string_opfunc.c.

References cubregex::count(), and i.

Referenced by db_date_add_sub_interval_expr().

Here is the caller graph for this function:

int count_leap_years_up_to ( int  year)

Definition at line 24656 of file string_opfunc.c.

Referenced by count_nonleap_years_up_to(), db_date_diff(), db_get_date_totaldays(), and db_time_diff().

Here is the caller graph for this function:

int count_nonleap_years_up_to ( int  year)

Definition at line 24667 of file string_opfunc.c.

References count_leap_years_up_to().

Referenced by db_date_diff().

Here is the caller graph for this function:

static int date_to_char ( const DB_VALUE src_value,
const DB_VALUE format_str,
const DB_VALUE date_lang,
DB_VALUE result_str,
const TP_DOMAIN domain 
)
static

Definition at line 17260 of file string_opfunc.c.

References a_m_NAME, A_m_NAME, A_M_NAME, AM_NAME, am_NAME, Am_NAME, ARG_FILE_LINE, assert, db_datetimetz::datetime, DATETIMETZ_BUF_SIZE, db_check_or_create_null_term_string(), db_date_decode(), db_date_to_string(), db_datetime_decode(), db_datetime_to_string(), db_datetimeltz_to_string(), db_datetimetz_to_string(), db_get_date(), db_get_datetime(), db_get_datetimetz(), db_get_int(), db_get_string_codeset(), db_get_string_length(), db_get_string_size(), db_get_time(), db_get_timestamp(), db_get_timestamptz(), DB_IS_NULL, db_make_null(), db_make_varchar(), db_private_alloc, db_private_free_and_init, db_time_decode(), db_time_to_string(), db_timestamp_decode_ses(), db_timestamp_decode_w_tz_id(), db_timestamp_to_string(), db_timestampltz_to_string(), db_timestamptz_to_string(), DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_INTEGER, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, DB_VALUE_DOMAIN_TYPE, DB_VALUE_TYPE, DT_A_M, DT_AM, DT_CC, DT_D, DT_DAY, DT_DD, DT_DY, DT_HH, DT_HH12, DT_HH24, DT_INVALID, DT_MI, DT_MM, DT_MON, DT_MONTH, DT_MS, DT_NORMAL, DT_P_M, DT_PM, DT_PUNCTUATION, DT_Q, DT_SS, DT_TEXT, DT_TZD, DT_TZH, DT_TZM, DT_TZR, DT_YY, DT_YYYY, ER_ERROR_SEVERITY, ER_OBJ_INVALID_ARGUMENTS, ER_OUT_OF_VIRTUAL_MEMORY, ER_QSTR_EMPTY_STRING, ER_QSTR_FORMAT_TOO_LONG, ER_QSTR_INVALID_DATA_TYPE, ER_QSTR_INVALID_FORMAT, er_set(), get_day(), get_next_format(), i, INTL_CODESET_MULT, lang_get_lang_id_from_flag(), MAX_TOKEN_SIZE, db_value::need_clear, NO_ERROR, NULL, p_m_NAME, P_m_NAME, P_M_NAME, PM_NAME, Pm_NAME, pm_NAME, print_string_date_token(), QSTR_DATE_LENGTH, QSTR_DATETIME_LENGTH, QSTR_TIME_LENGTH, QSTR_TIME_STAMPLENGTH, QSTR_TO_CHAR_LEN_MULTIPLIER_RATIO, SDT_AM_PM, SDT_DAY, SDT_DAY_SHORT, SDT_MONTH, SDT_MONTH_SHORT, strlen, db_timestamptz::timestamp, TIMESTAMPTZ_BUF_SIZE, TP_DOMAIN_CODESET, TP_DOMAIN_COLLATION, TP_IS_DATE_OR_TIME_TYPE, tz_create_session_tzid_for_datetime(), tz_create_session_tzid_for_time(), tz_create_session_tzid_for_timestamp(), TZ_DS_STRING_SIZE, tz_explain_tz_id(), db_timestamptz::tz_id, db_datetimetz::tz_id, tz_utc_datetimetz_to_local(), and TZR_SIZE.

Referenced by db_to_char().

Here is the caller graph for this function:

int db_add_time ( const DB_VALUE left,
const DB_VALUE right,
DB_VALUE result,
const TP_DOMAIN domain 
)

Definition at line 7318 of file string_opfunc.c.

References add_and_normalize_date_time(), ARG_FILE_LINE, assert, db_datetime::date, db_datetimetz::datetime, db_date_parse_datetime_parts(), db_date_parse_time(), db_datetime_decode(), db_datetime_encode(), db_datetime_to_string(), db_get_date(), db_get_datetime(), db_get_datetimetz(), db_get_string(), db_get_string_size(), db_get_time(), db_get_time_from_dbvalue(), db_get_timestamp(), db_get_timestamptz(), DB_IS_NULL, db_make_datetime(), db_make_datetimeltz(), db_make_datetimetz(), db_make_null(), db_make_time(), db_make_varchar(), db_private_alloc, db_private_free, db_string_to_datetimetz_ex(), db_time_decode(), db_time_encode(), db_time_to_string(), db_timestamp_decode_utc(), DB_TYPE_CHAR, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, DB_VALUE_TYPE, ER_ATTEMPT_TO_USE_ZERODATE, er_clear(), ER_DATE_CONVERSION, ER_ERROR_SEVERITY, ER_QSTR_INVALID_DATA_TYPE, er_set(), ER_TIME_CONVERSION, error(), db_value::need_clear, NO_ERROR, NULL, prm_get_bool_value(), PRM_ID_RETURN_NULL_ON_FUNCTION_ERRORS, QSTR_DATETIME_LENGTH, QSTR_TIME_LENGTH, strlen, db_datetime::time, db_timestamptz::timestamp, TP_DOMAIN_CODESET, TP_DOMAIN_COLLATION, TP_DOMAIN_TYPE, tz_create_datetimetz_from_parts(), tz_datetimeltz_to_local(), db_timestamptz::tz_id, and db_datetimetz::tz_id.

Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().

Here is the caller graph for this function:

int db_blob_length ( const DB_VALUE src_value,
DB_VALUE result_value 
)
int db_blob_to_bit ( const DB_VALUE src_value,
const DB_VALUE length_value,
DB_VALUE result_value 
)
static int db_check_or_create_null_term_string ( const DB_VALUE str_val,
char *  pre_alloc_buf,
int  pre_alloc_buf_size,
bool  ignore_prec_spaces,
bool  ignore_trail_spaces,
char **  str_out,
bool do_alloc 
)
static
int db_clob_length ( const DB_VALUE src_value,
DB_VALUE result_value 
)
int db_convert_time_to_sec ( const DB_VALUE src_date,
DB_VALUE result 
)
int db_convert_to_time ( const DB_VALUE src_hour,
const DB_VALUE src_minute,
const DB_VALUE src_second,
DB_VALUE result 
)
int db_date_add_interval_days ( DB_VALUE result,
const DB_VALUE date,
const DB_VALUE db_days 
)

Definition at line 21499 of file string_opfunc.c.

References db_date_add_sub_interval_days().

Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().

Here is the caller graph for this function:

int db_date_add_interval_expr ( DB_VALUE result,
const DB_VALUE date,
const DB_VALUE expr,
const int  unit 
)

Definition at line 22580 of file string_opfunc.c.

References db_date_add_sub_interval_expr().

Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().

Here is the caller graph for this function:

static int db_date_add_sub_interval_days ( DB_VALUE result,
const DB_VALUE date,
const DB_VALUE db_days,
bool  is_add 
)
static

Definition at line 21047 of file string_opfunc.c.

References add_and_normalize_date_time(), ARG_FILE_LINE, assert, db_datetime::date, db_datetimetz::datetime, db_date_decode(), db_date_encode(), db_date_parse_datetime_parts(), db_date_to_string(), db_datetime_decode(), db_datetime_encode(), db_datetime_to_string(), db_datetimetz_to_string(), db_get_date(), db_get_datetime(), db_get_datetimetz(), db_get_int(), db_get_string(), db_get_string_size(), db_get_timestamp(), db_get_timestamptz(), DB_IS_NULL, db_make_date(), db_make_datetime(), db_make_datetimeltz(), db_make_datetimetz(), db_make_null(), db_make_string(), db_private_alloc, db_string_to_time_ex(), db_time_decode(), db_timestamp(), db_timestamp_decode_utc(), DB_TYPE_CHAR, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_STRING, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, DB_TYPE_VARNCHAR, DB_VALUE_DOMAIN_TYPE, ER_ATTEMPT_TO_USE_ZERODATE, er_clear(), ER_DATE_CONVERSION, ER_ERROR_SEVERITY, ER_OBJ_INVALID_ARGUMENTS, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), ER_TIME_CONVERSION, ER_TIMESTAMP_CONVERSION, error(), db_value::need_clear, NO_ERROR, NULL, prm_get_bool_value(), PRM_ID_RETURN_NULL_ON_FUNCTION_ERRORS, strlen, sub_and_normalize_date_time(), db_timestamptz::timestamp, tz_create_datetimetz_from_parts(), db_timestamptz::tz_id, db_datetimetz::tz_id, and tz_utc_datetimetz_to_local().

Referenced by db_date_add_interval_days(), and db_date_sub_interval_days().

Here is the caller graph for this function:

static int db_date_add_sub_interval_expr ( DB_VALUE result,
const DB_VALUE date,
const DB_VALUE expr,
const int  unit,
int  is_add 
)
static

Definition at line 21663 of file string_opfunc.c.

References ABS, add_and_normalize_date_time(), ARG_FILE_LINE, assert, BOTH, copy_and_shift_values(), db_datetime::date, db_datetimetz::datetime, db_date_decode(), db_date_encode(), db_date_parse_datetime_parts(), db_date_to_string(), db_datetime_decode(), db_datetime_encode(), db_datetime_to_string(), db_datetimetz_to_string(), db_get_bigint(), db_get_date(), db_get_datetime(), db_get_datetimetz(), db_get_double(), db_get_float(), db_get_int(), db_get_short(), db_get_string(), db_get_string_size(), db_get_timestamp(), db_get_timestamptz(), DB_IS_NULL, db_locate_numeric, db_make_date(), db_make_datetime(), db_make_datetimeltz(), db_make_datetimetz(), db_make_null(), db_make_string(), db_private_alloc, db_str_to_millisec(), db_string_to_datetimetz_ex(), db_string_to_time_ex(), db_string_trim(), db_time_decode(), db_timestamp(), db_timestamp_decode_utc(), 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_NCHAR, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_SHORT, DB_TYPE_STRING, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, DB_VALUE_DOMAIN_TYPE, DB_VALUE_SCALE, er_clear(), ER_DATE_CONVERSION, ER_ERROR_SEVERITY, ER_OBJ_INVALID_ARGUMENTS, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), ER_TIME_CONVERSION, ER_TIMESTAMP_CONVERSION, error(), get_single_unit_value(), db_value::need_clear, NO_ERROR, NULL, numeric_coerce_num_to_double(), pr_clear_value(), prm_get_bool_value(), PRM_ID_RETURN_NULL_ON_FUNCTION_ERRORS, PT_DAY, PT_DAY_HOUR, PT_DAY_MILLISECOND, PT_DAY_MINUTE, PT_DAY_SECOND, PT_HOUR, PT_HOUR_MILLISECOND, PT_HOUR_MINUTE, PT_HOUR_SECOND, PT_MILLISECOND, PT_MINUTE, PT_MINUTE_MILLISECOND, PT_MINUTE_SECOND, PT_MONTH, PT_QUARTER, PT_SECOND, PT_SECOND_MILLISECOND, PT_WEEK, PT_YEAR, PT_YEAR_MONTH, strlen, sub_and_normalize_date_time(), db_datetime::time, db_timestamptz::timestamp, tz_create_datetimetz(), tz_create_datetimetz_from_parts(), tz_create_datetimetz_from_ses(), db_timestamptz::tz_id, db_datetimetz::tz_id, tz_id_to_region(), and tz_utc_datetimetz_to_local().

Referenced by db_date_add_interval_expr(), and db_date_sub_interval_expr().

Here is the caller graph for this function:

int db_date_format ( const DB_VALUE date_value,
const DB_VALUE format,
const DB_VALUE date_lang,
DB_VALUE result,
const TP_DOMAIN domain 
)

Definition at line 22621 of file string_opfunc.c.

References AM_NAME, lang_locale_data::am_pm, ARG_FILE_LINE, assert, tp_domain::collation_flag, db_datetimetz::datetime, lang_locale_data::day_name, lang_locale_data::day_short_name, db_date_decode(), db_datetime_decode(), db_get_date(), db_get_datetime(), db_get_datetimetz(), db_get_day_of_week(), db_get_int(), db_get_string(), db_get_string_codeset(), db_get_string_collation(), db_get_string_size(), db_get_timestamp(), db_get_timestamptz(), DB_IS_NULL, db_make_null(), db_make_string(), db_private_alloc, db_private_free_and_init, db_string_put_cs_and_collation(), db_time_decode(), db_timestamp_decode_ses(), db_timestamp_decode_w_tz_id(), DB_TYPE_CHAR, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_INTEGER, DB_TYPE_NCHAR, DB_TYPE_STRING, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, db_type_to_db_domain(), DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, DB_VALUE_DOMAIN_TYPE, DB_VALUE_TYPE, DOMAIN_COMPATIBLE, er_clear(), er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_LANG_CODESET_NOT_AVAILABLE, ER_OUT_OF_VIRTUAL_MEMORY, ER_QSTR_INVALID_DATA_TYPE, er_set(), ER_TZ_LOAD_ERROR, error(), i, INTL_LANG_ENGLISH, is_char_string(), lang_charset_name(), lang_get_lang_id_from_flag(), lang_get_lang_name_from_id(), lang_get_specific_locale(), LEAP, lang_locale_data::month_name, lang_locale_data::month_short_name, db_value::need_clear, NO_ERROR, NULL, PM_NAME, STRCHCAT, strlen, db_timestamptz::timestamp, TP_DOMAIN_CODESET, TP_DOMAIN_COLL_LEAVE, TP_DOMAIN_COLLATION, tp_value_cast(), tz_create_session_tzid_for_datetime(), tz_create_session_tzid_for_timestamp(), TZ_DS_STRING_SIZE, tz_explain_tz_id(), db_timestamptz::tz_id, db_datetimetz::tz_id, tz_utc_datetimetz_to_local(), and TZR_SIZE.

Referenced by db_from_unixtime(), fetch_peek_arith(), and pt_evaluate_db_value_expr().

Here is the caller graph for this function:

int db_date_sub_interval_days ( DB_VALUE result,
const DB_VALUE date,
const DB_VALUE db_days 
)

Definition at line 21505 of file string_opfunc.c.

References db_date_add_sub_interval_days().

Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().

Here is the caller graph for this function:

int db_date_sub_interval_expr ( DB_VALUE result,
const DB_VALUE date,
const DB_VALUE expr,
const int  unit 
)

Definition at line 22599 of file string_opfunc.c.

References db_date_add_sub_interval_expr().

Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().

Here is the caller graph for this function:

int db_datetime_to_timestamp ( const DB_VALUE src_datetime,
DB_VALUE result_timestamp 
)
int db_get_date_from_days ( const DB_VALUE src,
DB_VALUE result 
)

Definition at line 11635 of file string_opfunc.c.

References DB_IS_NULL, db_make_date(), db_make_null(), db_round_dbvalue_to_int(), julian_decode(), julian_encode(), and NO_ERROR.

Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().

Here is the caller graph for this function:

int db_get_date_item ( const DB_VALUE src_date,
const int  item_type,
DB_VALUE result 
)
int db_get_info_for_like_optimization ( const DB_VALUE *const  pattern,
const bool  has_escape_char,
const char *  escape_str,
int *const  num_logical_chars,
int *const  last_safe_logical_pos,
int *const  num_match_many,
int *const  num_match_one 
)
static int db_get_next_like_pattern_character ( const char *const  pattern,
const int  length,
const INTL_CODESET  codeset,
const bool  has_escape_char,
const char *  escape_str,
int *const  position,
char **  crt_char_p,
bool *const  is_escaped 
)
static
int db_get_string_length ( const DB_VALUE value)

Definition at line 8247 of file string_opfunc.c.

References db_char::buf, db_data::ch, db_char::codeset, db_value::data, DB_TYPE_BIT, DB_TYPE_VARBIT, db_value::domain, db_domain_info::general_info, if(), db_char::info, intl_char_count(), LARGE_STRING, db_char::medium, MEDIUM_STRING, NULL, db_char::size, SMALL_STRING, db_char::style, and db_domain_info::general_info::type.

Referenced by bit_to_string(), catcls_get_or_value_from_partition(), coerce_char_to_dbvalue(), date_to_char(), db_bit_string_coerce(), db_char_string_coerce(), db_like_bound(), db_string_aes_decrypt(), db_string_aes_encrypt(), db_string_bit_length(), db_string_char_length(), db_string_concatenate(), db_string_insert_substring(), db_string_instr(), db_string_lower(), db_string_md5(), db_string_pad(), db_string_position(), db_string_repeat(), db_string_replace(), db_string_reverse(), db_string_sha_two(), db_string_substring(), db_string_substring_index(), db_string_translate(), db_string_trim(), db_string_truncate(), db_string_upper(), db_value_get(), fetch_peek_arith(), fprint_special_strings(), heap_object_upgrade_domain(), mr_data_lengthval_nchar(), mr_lengthval_varbit_internal(), mr_lengthval_varnchar_internal(), mr_setmem_varbit(), mr_setval_varbit(), mr_writeval_bit_internal(), mr_writeval_nchar_internal(), mr_writeval_varbit_internal(), mr_writeval_varnchar_internal(), pt_evaluate_db_value_expr(), qdata_get_tuple_value_size_from_dbval(), qstr_grow_string(), scan_regu_key_to_index_key(), tp_can_steal_string(), tp_check_value_size(), tp_value_cast_internal(), transfer_bit_string(), and valcnv_convert_bit_to_string().

int db_get_time_item ( const DB_VALUE src_date,
const int  item_type,
DB_VALUE result 
)
int db_json_convert_to_utf8 ( DB_VALUE dbval)

Definition at line 7677 of file string_opfunc.c.

References assert, db_get_string_codeset(), DB_IS_STRING, db_string_convert_to(), INTL_CODESET_UTF8, LANG_COLL_UTF8_BINARY, NO_ERROR, NULL, and pr_clear_value().

Referenced by pt_check_json_table_node().

Here is the caller graph for this function:

int db_json_copy_and_convert_to_utf8 ( const DB_VALUE src_dbval,
DB_VALUE dest_dbval,
const DB_VALUE **  json_str_dbval 
)
int db_months_between ( const DB_VALUE start_mon,
const DB_VALUE end_mon,
DB_VALUE result_mon 
)
int db_str_to_date ( const DB_VALUE str,
const DB_VALUE format,
const DB_VALUE date_lang,
DB_VALUE result,
TP_DOMAIN domain 
)
static int db_str_to_millisec ( const char *  str)
static

Definition at line 21521 of file string_opfunc.c.

References NULL, and strlen.

Referenced by db_date_add_sub_interval_expr().

Here is the caller graph for this function:

int db_string_char_length ( const DB_VALUE string,
DB_VALUE char_count 
)
static char db_string_escape_char ( char  c)
static

Definition at line 1913 of file string_opfunc.c.

Referenced by db_string_escape_str().

Here is the caller graph for this function:

int db_string_escape_str ( const char *  src_str,
size_t  src_size,
char **  res_string,
size_t *  dest_size 
)
int db_sys_date_and_epoch_time ( DB_VALUE dt_dbval,
DB_VALUE ts_dbval 
)
int db_sys_timestamp ( DB_VALUE result_timestamp)
int db_sys_timezone ( DB_VALUE result_timezone)

Definition at line 13282 of file string_opfunc.c.

References assert, DB_DEFAULT_PRECISION, DB_DEFAULT_SCALE, db_make_int(), DB_TYPE_INTEGER, db_value_domain_init(), NO_ERROR, NULL, and tz_get_offset_in_mins().

Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().

Here is the caller graph for this function:

int db_time_format ( const DB_VALUE src_value,
const DB_VALUE format,
const DB_VALUE date_lang,
DB_VALUE result,
const TP_DOMAIN domain 
)

Definition at line 12256 of file string_opfunc.c.

References AM_NAME, lang_locale_data::am_pm, ARG_FILE_LINE, assert, tp_domain::collation_flag, db_datetimetz::datetime, db_datetime_decode(), db_get_datetime(), db_get_datetimetz(), db_get_int(), db_get_string(), db_get_string_codeset(), db_get_string_collation(), db_get_string_size(), db_get_time(), db_get_timestamp(), db_get_timestamptz(), DB_IS_NULL, db_make_null(), db_make_string(), db_private_alloc, db_private_free_and_init, db_string_put_cs_and_collation(), db_time_decode(), db_timestamp_decode_ses(), db_timestamp_decode_w_tz_id(), DB_TYPE_CHAR, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_INTEGER, DB_TYPE_NCHAR, DB_TYPE_STRING, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, db_type_to_db_domain(), DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, DB_VALUE_DOMAIN_TYPE, DB_VALUE_TYPE, DOMAIN_COMPATIBLE, er_clear(), er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_LANG_CODESET_NOT_AVAILABLE, ER_OUT_OF_VIRTUAL_MEMORY, ER_QSTR_INVALID_DATA_TYPE, er_set(), ER_TZ_LOAD_ERROR, error(), lang_charset_name(), lang_get_lang_id_from_flag(), lang_get_lang_name_from_id(), lang_get_specific_locale(), db_value::need_clear, NO_ERROR, NULL, PM_NAME, pr_clear_value(), STRCHCAT, strlen, db_timestamptz::timestamp, TP_DOMAIN_CODESET, TP_DOMAIN_COLL_LEAVE, TP_DOMAIN_COLLATION, tp_domain_resolve_default(), TP_IS_CHAR_TYPE, TP_IS_DATE_OR_TIME_TYPE, tp_value_auto_cast(), tp_value_cast(), tz_create_session_tzid_for_datetime(), tz_create_session_tzid_for_time(), tz_create_session_tzid_for_timestamp(), TZ_DS_STRING_SIZE, tz_explain_tz_id(), db_timestamptz::tz_id, db_datetimetz::tz_id, tz_utc_datetimetz_to_local(), and TZR_SIZE.

Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().

Here is the caller graph for this function:

int db_to_date ( const DB_VALUE src_str,
const DB_VALUE format_str,
const DB_VALUE date_lang,
DB_VALUE result_date 
)
int db_to_datetime ( const DB_VALUE src_str,
const DB_VALUE format_str,
const DB_VALUE date_lang,
const DB_TYPE  type,
DB_VALUE result_datetime 
)

Definition at line 15813 of file string_opfunc.c.

References ARG_FILE_LINE, assert, CAST_BUFLEN, char_isdigit(), cmp, db_check_or_create_null_term_string(), db_datetime_encode(), db_get_day_of_week(), db_get_int(), db_get_string_codeset(), db_get_string_size(), DB_IS_NULL, db_make_char(), db_make_datetime(), db_make_datetimetz(), db_make_null(), db_private_free, db_string_to_datetime_ex(), db_string_to_datetimetz_ex(), DB_TYPE_DATETIME, DB_TYPE_DATETIMETZ, DB_TYPE_INTEGER, DB_VALUE_TYPE, DT_A_M, DT_AM, DT_CC, DT_D, DT_DAY, DT_DD, DT_DY, DT_H, DT_HH, DT_HH12, DT_HH24, DT_INVALID, DT_MI, DT_MM, DT_MON, DT_MONTH, DT_MS, DT_NORMAL, DT_P_M, DT_PM, DT_PUNCTUATION, DT_Q, DT_SS, DT_TEXT, DT_TZD, DT_TZH, DT_TZM, DT_TZR, DT_YY, DT_YYYY, ER_DATE_CONVERSION, ER_ERROR_SEVERITY, ER_LANG_CODESET_NOT_AVAILABLE, ER_OBJ_INVALID_ARGUMENTS, ER_QSTR_EMPTY_STRING, ER_QSTR_FORMAT_DUPLICATION, ER_QSTR_FORMAT_TOO_LONG, ER_QSTR_INCOMPATIBLE_CODE_SETS, ER_QSTR_INVALID_DATA_TYPE, ER_QSTR_INVALID_FORMAT, ER_QSTR_MISMATCHING_ARGUMENTS, ER_QSTR_SRC_TOO_LONG, er_set(), ER_SYSTEM_DATE, ER_TIME_CONVERSION, ER_TIMESTAMP_CONVERSION, get_cur_month(), get_cur_year(), get_next_format(), get_string_date_token_id(), i, intl_backskip_spaces(), intl_case_match_tok(), is_char_string(), lang_charset_name(), lang_date_format_parse(), LANG_GET_BINARY_COLLATION, lang_get_lang_id_from_flag(), lang_get_lang_name_from_id(), lang_get_specific_locale(), MAX_TOKEN_SIZE, NO_ERROR, NULL, p, parse_digits(), parse_tzd(), SDT_AM_PM, SDT_DAY, SDT_DAY_SHORT, SDT_MONTH, SDT_MONTH_SHORT, strlen, tz_create_datetimetz_from_offset(), tz_create_datetimetz_from_zoneid_and_tzd(), tz_get_best_match_zone(), tz_get_session_tz_region(), TZD_MAX_EXPECTED_LEN, and WHITE_CHARS.

Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().

Here is the caller graph for this function:

int db_to_time ( const DB_VALUE src_str,
const DB_VALUE format_str,
const DB_VALUE date_lang,
const DB_TYPE  type,
DB_VALUE result_time 
)
int db_to_timestamp ( const DB_VALUE src_str,
const DB_VALUE format_str,
const DB_VALUE date_lang,
const DB_TYPE  type,
DB_VALUE result_timestamp 
)

Definition at line 14900 of file string_opfunc.c.

References ARG_FILE_LINE, assert, CAST_BUFLEN, cmp, db_check_or_create_null_term_string(), db_date_encode(), db_get_day_of_week(), db_get_int(), db_get_string_codeset(), db_get_string_size(), DB_IS_NULL, db_make_char(), db_make_null(), db_make_timestamp(), db_make_timestamptz(), db_private_free, db_string_to_timestamp_ex(), db_string_to_timestamptz_ex(), db_time_encode(), db_timestamp_encode_ses(), DB_TYPE_INTEGER, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPTZ, DB_VALUE_TYPE, DT_A_M, DT_AM, DT_CC, DT_D, DT_DAY, DT_DD, DT_DY, DT_HH, DT_HH12, DT_HH24, DT_INVALID, DT_MI, DT_MM, DT_MON, DT_MONTH, DT_NORMAL, DT_P_M, DT_PM, DT_PUNCTUATION, DT_Q, DT_SS, DT_TEXT, DT_TZD, DT_TZH, DT_TZM, DT_TZR, DT_YY, DT_YYYY, ER_DATE_CONVERSION, ER_ERROR_SEVERITY, ER_LANG_CODESET_NOT_AVAILABLE, ER_OBJ_INVALID_ARGUMENTS, ER_QSTR_EMPTY_STRING, ER_QSTR_FORMAT_DUPLICATION, ER_QSTR_FORMAT_TOO_LONG, ER_QSTR_INCOMPATIBLE_CODE_SETS, ER_QSTR_INVALID_DATA_TYPE, ER_QSTR_INVALID_FORMAT, ER_QSTR_MISMATCHING_ARGUMENTS, ER_QSTR_SRC_TOO_LONG, er_set(), ER_SYSTEM_DATE, ER_TIME_CONVERSION, ER_TIMESTAMP_CONVERSION, get_cur_month(), get_cur_year(), get_next_format(), get_string_date_token_id(), i, intl_backskip_spaces(), intl_case_match_tok(), is_char_string(), lang_charset_name(), lang_date_format_parse(), LANG_GET_BINARY_COLLATION, lang_get_lang_id_from_flag(), lang_get_lang_name_from_id(), lang_get_specific_locale(), MAX_TOKEN_SIZE, NO_ERROR, NULL, p, parse_digits(), parse_tzd(), SDT_AM_PM, SDT_DAY, SDT_DAY_SHORT, SDT_MONTH, SDT_MONTH_SHORT, strlen, tz_create_timestamptz_from_offset(), tz_create_timestamptz_from_zoneid_and_tzd(), tz_get_best_match_zone(), tz_get_session_tz_region(), TZD_MAX_EXPECTED_LEN, and WHITE_CHARS.

Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().

Here is the caller graph for this function:

int db_value_to_enumeration_value ( const DB_VALUE src,
DB_VALUE result,
const TP_DOMAIN enum_domain 
)
static int get_cur_month ( void  )
static

Definition at line 20400 of file string_opfunc.c.

References NULL.

Referenced by db_to_date(), db_to_datetime(), and db_to_timestamp().

Here is the caller graph for this function:

static int get_cur_year ( void  )
static

Definition at line 20377 of file string_opfunc.c.

References NULL.

Referenced by db_to_date(), db_to_datetime(), and db_to_timestamp().

Here is the caller graph for this function:

int get_day ( int  month,
int  day,
int  year 
)

Definition at line 20423 of file string_opfunc.c.

References day_of_week(), and julian_encode().

Referenced by date_to_char().

Here is the caller graph for this function:

int get_last_day ( int  month,
int  year 
)

Definition at line 13297 of file string_opfunc.c.

Referenced by db_add_months(), db_last_day(), and db_months_between().

Here is the caller graph for this function:

static TIMESTAMP_FORMAT get_next_format ( const char *  sp,
const INTL_CODESET  codeset,
DB_TYPE  str_type,
int *  format_length,
const char **  next_pos 
)
static
static int get_number_token ( const INTL_LANG  lang,
char *  fsp,
int *  length,
char *  last_position,
char **  next_fsp,
INTL_CODESET  codeset 
)
static

Definition at line 19963 of file string_opfunc.c.

References char_tolower(), INTL_CODESET_KSC5601_EUC, lang_digit_fractional_symbol(), lang_digit_grouping_symbol(), N_END, N_FORMAT, N_INVALID, N_SPACE, N_TEXT, and strlen.

Referenced by db_to_number(), and number_to_char().

Here is the caller graph for this function:

static DB_BIGINT get_single_unit_value ( const char *  expr,
DB_BIGINT  int_val 
)
static

Definition at line 21631 of file string_opfunc.c.

References NULL.

Referenced by db_date_add_sub_interval_expr().

Here is the caller graph for this function:

static int hextoi ( char  hex_char)
static

Definition at line 10981 of file string_opfunc.c.

Referenced by qstr_hex_to_bin().

Here is the caller graph for this function:

static bool is_integer ( const DB_VALUE i)
static
static bool is_number ( const DB_VALUE n)
static
static bool is_safe_last_char_for_like_optimization ( const char *  chr,
const bool  is_escaped,
INTL_CODESET  codeset 
)
static

Definition at line 25994 of file string_opfunc.c.

References assert, intl_is_max_bound_chr(), intl_is_min_bound_chr(), NULL, and QSTR_IS_LIKE_WILDCARD_CHAR.

Referenced by db_get_info_for_like_optimization(), and db_get_like_optimization_bounds().

Here is the caller graph for this function:

bool is_str_valid_number ( char *  num_p,
char *  str_end,
int  base,
INTL_CODESET  codeset 
)
static

Definition at line 27747 of file string_opfunc.c.

References assert, and intl_is_space().

Referenced by db_conv().

Here is the caller graph for this function:

static bool is_valid_ip_slice ( const char *  ipslice)
static

Definition at line 28173 of file string_opfunc.c.

References assert, char_isdigit(), char_isxdigit(), char_tolower(), and NULL.

Referenced by db_inet_aton().

Here is the caller graph for this function:

static void left_nshift ( const unsigned char *  bit_string,
int  bit_string_size,
int  shift_amount,
unsigned char *  r,
int  r_size 
)
static

Definition at line 10884 of file string_opfunc.c.

References BYTE_SIZE, and i.

Referenced by qstr_bit_substring().

Here is the caller graph for this function:

static int lob_from_file ( const char *  path,
const DB_VALUE src_value,
DB_VALUE lob_value,
DB_TYPE  lob_type 
)
static
static int lob_length ( const DB_VALUE src_value,
DB_VALUE result_value 
)
static

Definition at line 18593 of file string_opfunc.c.

References db_elo_size(), db_get_elo(), db_make_bigint(), db_make_null(), er_clear(), er_errid(), ER_ES_GENERAL, NO_ERROR, and db_elo::size.

Referenced by db_blob_length(), and db_clob_length().

Here is the caller graph for this function:

static int make_number_to_char ( const INTL_LANG  lang,
char *  num_string,
char *  format_str,
int *  length,
DB_CURRENCY  currency,
char **  result_str,
INTL_CODESET  codeset 
)
static
static int make_scientific_notation ( char *  src_string,
int  cipher 
)
static

Definition at line 19294 of file string_opfunc.c.

References NO_ERROR, and strlen.

Referenced by make_number_to_char().

Here is the caller graph for this function:

static int number_to_char ( const DB_VALUE src_value,
const DB_VALUE format_str,
const DB_VALUE number_lang,
DB_VALUE result_str,
const TP_DOMAIN domain 
)
static
int parse_digits ( char *  s,
int *  nr,
int  cnt 
)
static

Definition at line 23272 of file string_opfunc.c.

References cubregex::count(), STRCHCAT, strlen, and WHITESPACE.

Referenced by db_str_to_date(), db_to_date(), db_to_datetime(), db_to_time(), db_to_timestamp(), and get_string_date_token_id().

Here is the caller graph for this function:

static int parse_time_string ( const char *  timestr,
int  timestr_size,
int *  sign,
int *  h,
int *  m,
int *  s,
int *  ms 
)
static

Definition at line 25035 of file string_opfunc.c.

References assert, CAST_BUFLEN, char_isdigit(), NO_ERROR, NULL, and SKIP_SPACES.

Referenced by db_timestamp().

Here is the caller graph for this function:

static int parse_tzd ( const char *  str,
const int  max_expect_len 
)
static

Definition at line 29087 of file string_opfunc.c.

References assert, CAST_BUFLEN, char_isalnum(), and p.

Referenced by db_str_to_date(), db_to_datetime(), db_to_time(), and db_to_timestamp().

Here is the caller graph for this function:

int qstr_bin_to_hex ( char *  dest,
int  dest_size,
const char *  src,
int  src_size 
)

Definition at line 7985 of file string_opfunc.c.

References i.

Referenced by db_conv(), and qstr_bit_to_hex_coerce().

Here is the caller graph for this function:

static int qstr_bit_coerce ( const unsigned char *  src,
int  src_length,
int  src_precision,
DB_TYPE  src_type,
unsigned char **  dest,
int *  dest_length,
int  dest_precision,
DB_TYPE  dest_type,
DB_DATA_STATUS data_status 
)
static

Definition at line 10070 of file string_opfunc.c.

References assert, bit_ncat(), DATA_STATUS_OK, DATA_STATUS_TRUNCATED, db_private_alloc, er_errid(), i, NO_ERROR, NULL, QSTR_IS_FIXED_LENGTH, and QSTR_NUM_BYTES.

Referenced by db_bit_string_coerce().

Here is the caller graph for this function:

static int qstr_bit_concatenate ( const unsigned char *  s1,
int  s1_length,
int  s1_precision,
DB_TYPE  s1_type,
const unsigned char *  s2,
int  s2_length,
int  s2_precision,
DB_TYPE  s2_type,
unsigned char **  result,
int *  result_length,
int *  result_size,
DB_TYPE result_type,
DB_DATA_STATUS data_status 
)
static
static int qstr_bit_position ( const unsigned char *  sub_string,
int  sub_length,
const unsigned char *  src_string,
int  src_length,
int *  position 
)
static

Definition at line 10548 of file string_opfunc.c.

References assert, BYTE_SIZE, db_private_alloc, db_private_free_and_init, er_errid(), i, NO_ERROR, NULL, QSTR_NUM_BYTES, and shift_left().

Referenced by db_string_position().

Here is the caller graph for this function:

static int qstr_bit_substring ( const unsigned char *  src,
int  src_length,
int  start,
int  length,
unsigned char **  r,
int *  r_length 
)
static

Definition at line 10795 of file string_opfunc.c.

References assert, BYTE_SIZE, db_private_alloc, er_errid(), left_nshift(), NO_ERROR, NULL, and QSTR_NUM_BYTES.

Referenced by db_string_substring().

Here is the caller graph for this function:

int qstr_bit_to_bin ( char *  dest,
int  dest_size,
const char *  src,
int  src_size 
)

Definition at line 8096 of file string_opfunc.c.

Referenced by ldr_bstr_elem(), pt_db_value_initialize(), and cubload::to_db_varbit_from_bin_str().

Here is the caller graph for this function:

void qstr_bit_to_hex_coerce ( char *  buffer,
int  buffer_size,
const char *  src,
int  src_length,
int  pad_flag,
int *  copy_size,
int *  truncation 
)

Definition at line 8168 of file string_opfunc.c.

References NULL, qstr_bin_to_hex(), and QSTR_NUM_BYTES.

Referenced by db_value_get().

Here is the caller graph for this function:

static int qstr_coerce ( const unsigned char *  src,
int  src_length,
int  src_precision,
DB_TYPE  src_type,
INTL_CODESET  src_codeset,
INTL_CODESET  dest_codeset,
unsigned char **  dest,
int *  dest_length,
int *  dest_size,
int  dest_precision,
DB_TYPE  dest_type,
DB_DATA_STATUS data_status 
)
static
static int qstr_concatenate ( const unsigned char *  s1,
int  s1_length,
int  s1_precision,
DB_TYPE  s1_type,
const unsigned char *  s2,
int  s2_length,
int  s2_precision,
DB_TYPE  s2_type,
INTL_CODESET  codeset,
unsigned char **  result,
int *  result_length,
int *  result_size,
DB_TYPE result_type,
DB_DATA_STATUS data_status 
)
static
static int qstr_eval_like ( const char *  tar,
int  tar_length,
const char *  expr,
int  expr_length,
const char *  escape,
INTL_CODESET  codeset,
int  coll_id 
)
static
static int qstr_ffs ( int  v)
static

Definition at line 10937 of file string_opfunc.c.

References i, and nbits.

Referenced by bstring_fls().

Here is the caller graph for this function:

int qstr_hex_to_bin ( char *  dest,
int  dest_size,
const char *  src,
int  src_size 
)

Definition at line 8028 of file string_opfunc.c.

References hextoi(), and i.

Referenced by ldr_xstr_elem(), pt_db_value_initialize(), cubload::to_db_varbit_from_hex_str(), and tp_value_cast_internal().

Here is the caller graph for this function:

static int qstr_pad ( MISC_OPERAND  pad_operand,
int  pad_length,
const unsigned char *  pad_charset_ptr,
int  pad_charset_length,
int  pad_charset_size,
const unsigned char *  src_ptr,
DB_TYPE  src_type,
int  src_length,
int  src_size,
INTL_CODESET  codeset,
unsigned char **  result,
DB_TYPE result_type,
int *  result_length,
int *  result_size 
)
static
unsigned char* qstr_pad_string ( unsigned char *  s,
int  length,
INTL_CODESET  codeset 
)

Definition at line 7929 of file string_opfunc.c.

References assert, i, and intl_pad_char().

Referenced by db_string_convert_to(), print_string_date_token(), qstr_coerce(), qstr_concatenate(), qstr_grow_string(), and transfer_string().

Here is the caller graph for this function:

static int qstr_position ( const char *  sub_string,
const int  sub_size,
const int  sub_length,
const char *  src_string,
const char *  src_end,
const char *  src_string_bound,
int  src_length,
int  coll_id,
bool  is_forward_search,
int *  position 
)
static
static int qstr_replace ( const unsigned char *  src_buf,
int  src_len,
int  src_size,
INTL_CODESET  codeset,
int  coll_id,
const unsigned char *  srch_str_buf,
int  srch_str_size,
const unsigned char *  repl_str_buf,
int  repl_str_size,
unsigned char **  result_buf,
int *  result_len,
int *  result_size 
)
static
static int qstr_substring ( const unsigned char *  src,
int  src_length,
int  start,
int  length,
INTL_CODESET  codeset,
unsigned char **  r,
int *  r_length,
int *  r_size 
)
static

Definition at line 10711 of file string_opfunc.c.

References assert, db_private_alloc, er_errid(), intl_char_size(), NO_ERROR, and NULL.

Referenced by db_string_substring().

Here is the caller graph for this function:

static int qstr_translate ( const unsigned char *  src_ptr,
DB_TYPE  src_type,
int  src_size,
INTL_CODESET  codeset,
const unsigned char *  from_str_ptr,
int  from_str_size,
const unsigned char *  to_str_ptr,
int  to_str_size,
unsigned char **  result_ptr,
DB_TYPE result_type,
int *  result_len,
int *  result_size 
)
static
static int qstr_trim ( MISC_OPERAND  tr_operand,
const unsigned char *  trim,
int  trim_length,
int  trim_size,
const unsigned char *  src_ptr,
DB_TYPE  src_type,
int  src_length,
int  src_size,
INTL_CODESET  codeset,
unsigned char **  res,
DB_TYPE res_type,
int *  res_length,
int *  res_size 
)
static

Definition at line 3814 of file string_opfunc.c.

References assert, BOTH, db_private_alloc, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, er_errid(), intl_pad_char(), LEADING, NO_ERROR, NULL, QSTR_IS_NATIONAL_CHAR, qstr_trim_trailing(), TRAILING, and trim_leading().

Referenced by db_string_trim().

Here is the caller graph for this function:

void qstr_trim_trailing ( const unsigned char *  trim_charset_ptr,
int  trim_charset_size,
const unsigned char *  src_ptr,
DB_TYPE  src_type,
int  src_length,
int  src_size,
INTL_CODESET  codeset,
int *  trail_trimmed_length,
int *  trail_trimmed_size,
bool  trim_ascii_spaces 
)

Definition at line 3984 of file string_opfunc.c.

References intl_prev_char().

Referenced by pt_check_enum_data_type(), qstr_trim(), and varchar_truncated().

Here is the caller graph for this function:

static int roundoff ( const INTL_LANG  lang,
char *  src_string,
int  flag,
int *  cipher,
char *  format 
)
static

Definition at line 19332 of file string_opfunc.c.

References ER_FAILED, i, lang_digit_fractional_symbol(), lang_digit_grouping_symbol(), NO_ERROR, NULL, and strlen.

Referenced by _DEFUN(), and make_number_to_char().

Here is the caller graph for this function:

static int scientific_to_decimal_string ( const INTL_LANG  lang,
char *  src_string,
char **  scientific_str 
)
static

Definition at line 19491 of file string_opfunc.c.

References char_isdigit(), char_isspace(), db_private_alloc, ER_FAILED, i, lang_digit_fractional_symbol(), MINUS, NO_ERROR, NULL, PLUS, and strlen.

Referenced by make_number(), and number_to_char().

Here is the caller graph for this function:

static void set_time_argument ( struct tm *  dest,
int  year,
int  month,
int  day,
int  hour,
int  min,
int  sec 
)
static

Definition at line 11013 of file string_opfunc.c.

References min.

static int shift_left ( unsigned char *  bit_string,
int  bit_string_size 
)
static

Definition at line 10668 of file string_opfunc.c.

References i.

Referenced by qstr_bit_position().

Here is the caller graph for this function:

int sub_and_normalize_date_time ( int *  years,
int *  months,
int *  days,
int *  hours,
int *  minutes,
int *  seconds,
int *  milliseconds,
DB_BIGINT  y,
DB_BIGINT  m,
DB_BIGINT  d,
DB_BIGINT  h,
DB_BIGINT  mi,
DB_BIGINT  s,
DB_BIGINT  ms 
)
static

Definition at line 20860 of file string_opfunc.c.

References ER_FAILED, i, LEAP, and NO_ERROR.

Referenced by db_date_add_sub_interval_days(), and db_date_add_sub_interval_expr().

Here is the caller graph for this function:

static int to_number_next_state ( const int  previous_state,
const int  input_char,
const INTL_LANG  number_lang_id 
)
static

Definition at line 19664 of file string_opfunc.c.

References char_tolower(), lang_digit_fractional_symbol(), and lang_digit_grouping_symbol().

Referenced by make_number().

Here is the caller graph for this function:

static void trim_leading ( const unsigned char *  trim_charset_ptr,
int  trim_charset_size,
const unsigned char *  src_ptr,
DB_TYPE  src_type,
int  src_length,
int  src_size,
INTL_CODESET  codeset,
unsigned char **  lead_trimmed_ptr,
int *  lead_trimmed_length,
int *  lead_trimmed_size,
bool  skip_spaces 
)
static

Definition at line 3906 of file string_opfunc.c.

References intl_char_size().

Referenced by qstr_trim().

Here is the caller graph for this function:

int varbit_compare ( const unsigned char *  string1,
int  size1,
const unsigned char *  string2,
int  size2 
)

Definition at line 9002 of file string_opfunc.c.

References cmp, and i.

Referenced by db_string_compare(), db_string_prefix_compare(), mr_cmpval_varbit(), mr_cmpval_varbit2(), and mr_data_cmpdisk_varbit().

Here is the caller graph for this function:

static bool varbit_truncated ( const unsigned char *  s,
int  s_length,
int  used_bits 
)
static

Definition at line 9909 of file string_opfunc.c.

References bstring_fls(), and QSTR_NUM_BYTES.

Referenced by qstr_bit_concatenate().

Here is the caller graph for this function:

static bool varchar_truncated ( const unsigned char *  s,
DB_TYPE  s_type,
int  s_length,
int  used_chars,
INTL_CODESET  codeset 
)
static

Definition at line 9861 of file string_opfunc.c.

References intl_char_size(), intl_pad_char(), and qstr_trim_trailing().

Referenced by qstr_coerce(), qstr_concatenate(), and qstr_grow_string().

Here is the caller graph for this function:

Variable Documentation

const char* Am_Pm_name_EUCKR[][12]
Initial value:
= {
{"am", "pm", "Am", "Pm", "AM", "PM",
"a.m.", "p.m.", "A.m.", "P.m.", "A.M.", "P.M."},
PM_NAME_KR_EUC, AM_NAME_KR_EUC, PM_NAME_KR_EUC},
{"am", "pm", "Am", "Pm", "AM", "PM",
"a.m.", "p.m.", "A.m.", "P.m.", "A.M.", "P.M."},
}
#define PM_NAME_KR_EUC
#define AM_NAME_KR_EUC

Definition at line 13761 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().

const char* Am_Pm_name_ISO[][12]
Initial value:
= {
{"am", "pm", "Am", "Pm", "AM", "PM",
"a.m.", "p.m.", "A.m.", "P.m.", "A.M.", "P.M."},
{"am", "pm", "Am", "Pm", "AM", "PM",
"a.m.", "p.m.", "A.m.", "P.m.", "A.M.", "P.M."},
}
#define AM_NAME_KR
#define PM_NAME_KR

Definition at line 13739 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().

const char* Am_Pm_name_UTF8[][12]
Initial value:
= {
{"am", "pm", "Am", "Pm", "AM", "PM",
"a.m.", "p.m.", "A.m.", "P.m.", "A.M.", "P.M."},
PM_NAME_KR_UTF8, AM_NAME_KR_UTF8, PM_NAME_KR_UTF8},
{"am", "pm", "Am", "Pm", "AM", "PM",
"a.m.", "p.m.", "A.m.", "P.m.", "A.M.", "P.M."},
}
#define PM_NAME_KR_UTF8
#define AM_NAME_KR_UTF8

Definition at line 13749 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().

const char AM_PM_parse_order[][12]
Initial value:
= {
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11},
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11},
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
}

Definition at line 13731 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().

const char* Day_name_EUCKR[][7]
Initial value:
= {
{"Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday"},
{"\xc0\xcf\xbf\xe4\xc0\xcf",
"\xbf\xf9\xbf\xe4\xc0\xcf",
"\xc8\xad\xbf\xe4\xc0\xcf",
"\xbc\xf6\xbf\xe4\xc0\xcf",
"\xb8\xf1\xbf\xe4\xc0\xcf",
"\xb1\xdd\xbf\xe4\xc0\xcf",
"\xc5\xe4\xbf\xe4\xc0\xcf"},
{"Pazar", "Pazartesi", "Sali",
"Carsamba",
"Persembe", "Cuma",
"Cumartesi"}
}

Definition at line 13559 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().

const char* Day_name_ISO[][7]
Initial value:
= {
{"Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday"},
{"Iryoil",
"Woryoil",
"Hwayoil",
"Suyoil",
"Mogyoil",
"Geumyoil",
"Toyoil"},
{"Pazar", "Pazartesi", "Sali",
"Carsamba",
"Persembe", "Cuma",
"Cumartesi"}
}

Definition at line 13527 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().

const char Day_name_parse_order[][7]
Initial value:
= {
{0, 1, 2, 3, 4, 5, 6},
{0, 1, 2, 3, 4, 5, 6},
{1, 0, 2, 3, 4, 6, 5}
}

Definition at line 13575 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().

const char* Day_name_UTF8[][7]
Initial value:
= {
{"Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday"},
{"\xec\x9d\xbc\xec\x9a\x94\xec\x9d\xbc",
"\xec\x9b\x94\xec\x9a\x94\xec\x9d\xbc",
"\xed\x99\x94\xec\x9a\x94\xec\x9d\xbc",
"\xec\x88\x98\xec\x9a\x94\xec\x9d\xbc",
"\xeb\xaa\xa9\xec\x9a\x94\xec\x9d\xbc",
"\xea\xb8\x88\xec\x9a\x94\xec\x9d\xbc",
"\xed\x86\xa0\xec\x9a\x94\xec\x9d\xbc"},
{"Pazar", "Pazartesi", "Sal\xc4\xb1",
"\xc3\x87" "ar" "\xc5\x9f" "amba",
"Per" "\xc5\x9f" "embe", "Cuma",
"Cumartesi"}
}

Definition at line 13543 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().

const char* Month_name_EUCKR[][12]
Initial value:
= {
{"January", "February", "March", "April",
"May", "June", "July", "August", "September", "October",
"November", "December"},
{"1\xbf\xf9",
"2\xbf\xf9",
"3\xbf\xf9",
"4\xbf\xf9",
"5\xbf\xf9",
"6\xbf\xf9",
"7\xbf\xf9",
"8\xbf\xf9",
"9\xbf\xf9",
"10\xbf\xf9",
"11\xbf\xf9",
"12\xbf\xf9"},
{"Ocak",
"Subat",
"Mart",
"Nisan",
"Mayis",
"Haziran",
"Temmuz",
"Agustos",
"Eylul",
"Ekim",
"Kasim",
"Aralik"}
}

Definition at line 13491 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().

const char* Month_name_ISO[][12]
Initial value:
= {
{"January", "February", "March", "April",
"May", "June", "July", "August", "September", "October",
"November", "December"},
{"1wol",
"2wol",
"3wol",
"4wol",
"5wol",
"6wol",
"7wol",
"8wol",
"9wol",
"10wol",
"11wol",
"12wol"},
{"Ocak",
"Subat",
"Mart",
"Nisan",
"Mayis",
"Haziran",
"Temmuz",
"Agustos",
"Eylul",
"Ekim",
"Kasim",
"Aralik"}
}

Definition at line 13431 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().

const char Month_name_parse_order[][12]
Initial value:
= {
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11},
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11},
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
}

Definition at line 13521 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().

const char* Month_name_UTF8[][12]
Initial value:
= {
{"January", "February", "March", "April",
"May", "June", "July", "August", "September", "October",
"November", "December"},
{"1\xec\x9b\x94",
"2\xec\x9b\x94",
"3\xec\x9b\x94",
"4\xec\x9b\x94",
"5\xec\x9b\x94",
"6\xec\x9b\x94",
"7\xec\x9b\x94",
"8\xec\x9b\x94",
"9\xec\x9b\x94",
"10\xec\x9b\x94",
"11\xec\x9b\x94",
"12\xec\x9b\x94"},
{"Ocak",
"\xc5\x9e" "ubat",
"Mart",
"Nisan",
"May" "\xc4\xb1" "s",
"Haziran",
"Temmuz",
"A" "\xc4\x9f" "ustos",
"Eyl" "\xc3\xbc" "l",
"Ekim",
"Kas" "\xc4\xb1" "m",
"Aral" "\xc4\xb1" "k"}
}

Definition at line 13461 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().

const char* Short_Day_name_EUCKR[][7]
Initial value:
= {
{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"},
{"\xc0\xcf",
"\xbf\xf9",
"\xc8\xad",
"\xbc\xf6",
"\xb8\xf1",
"\xb1\xdd",
"\xc5\xe4"},
{"Pz", "Pt", "Sa",
"Ca",
"Pe", "Cu", "Ct"}
}

Definition at line 13702 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().

const char* Short_Day_name_ISO[][7]
Initial value:
= {
{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"},
{"Il",
"Wol",
"Hwa",
"Su",
"Mok",
"Geum",
"To"},
{"Pz", "Pt", "Sa",
"Ca",
"Pe", "Cu", "Ct"}
}

Definition at line 13674 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().

const char Short_Day_name_parse_order[][7]
Initial value:
= {
{0, 1, 2, 3, 4, 5, 6},
{0, 1, 2, 3, 4, 5, 6},
{0, 1, 2, 3, 4, 5, 6}
}

Definition at line 13716 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().

const char* Short_Day_name_UTF8[][7]
Initial value:
= {
{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"},
{"\xec\x9d\xbc",
"\xec\x9b\x94",
"\xed\x99\x94",
"\xec\x88\x98",
"\xeb\xaa\xa9",
"\xea\xb8\x88",
"\xed\x86\xa0"},
{"Pz", "Pt", "Sa",
"\xc3\x87" "a",
"Pe", "Cu", "Ct"}
}

Definition at line 13688 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().

const char* Short_Month_name_EUCKR[][12]
Initial value:
= {
{"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"},
{"1\xbf\xf9",
"2\xbf\xf9",
"3\xbf\xf9",
"4\xbf\xf9",
"5\xbf\xf9",
"6\xbf\xf9",
"7\xbf\xf9",
"8\xbf\xf9",
"9\xbf\xf9",
"10\xbf\xf9",
"11\xbf\xf9",
"12\xbf\xf9"},
{"Ock",
"Sbt",
"Mrt",
"Nsn",
"Mys",
"Hzr",
"Tmz",
"Ags",
"Eyl",
"Ekm",
"Ksm",
"Arl"}
}

Definition at line 13639 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().

const char* Short_Month_name_ISO[][12]
Initial value:
= {
{"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"},
{"1wol",
"2wol",
"3wol",
"4wol",
"5wol",
"6wol",
"7wol",
"8wol",
"9wol",
"10wol",
"11wol",
"12wol"},
{"Ock",
"Sbt",
"Mrt",
"Nsn",
"Mys",
"Hzr",
"Tmz",
"Ags",
"Eyl",
"Ekm",
"Ksm",
"Arl"}
}

Definition at line 13581 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().

const char Short_Month_name_parse_order[][12]
Initial value:
= {
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11},
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11},
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
}

Definition at line 13668 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().

const char* Short_Month_name_UTF8[][12]
Initial value:
= {
{"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"},
{"1\xec\x9b\x94",
"2\xec\x9b\x94",
"3\xec\x9b\x94",
"4\xec\x9b\x94",
"5\xec\x9b\x94",
"6\xec\x9b\x94",
"7\xec\x9b\x94",
"8\xec\x9b\x94",
"9\xec\x9b\x94",
"10\xec\x9b\x94",
"11\xec\x9b\x94",
"12\xec\x9b\x94"},
{"Ock",
"\xc5\x9e" "bt",
"Mrt",
"Nsn",
"Mys",
"Hzr",
"Tmz",
"A" "\xc4\x9f" "s",
"Eyl",
"Ekm",
"Ksm",
"Arl"}
}

Definition at line 13610 of file string_opfunc.c.

Referenced by init_builtin_calendar_names().