diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/json_lib.h | 20 | ||||
-rw-r--r-- | include/m_ctype.h | 9 | ||||
-rw-r--r-- | include/my_base.h | 2 | ||||
-rw-r--r-- | include/mysql_com.h | 2 |
4 files changed, 21 insertions, 12 deletions
diff --git a/include/json_lib.h b/include/json_lib.h index 2d85a7653f2..1f12487d7e8 100644 --- a/include/json_lib.h +++ b/include/json_lib.h @@ -83,7 +83,9 @@ enum json_path_step_types JSON_PATH_KEY_WILD= 1+4, JSON_PATH_KEY_DOUBLEWILD= 1+8, JSON_PATH_ARRAY_WILD= 2+4, - JSON_PATH_ARRAY_DOUBLEWILD= 2+8 + JSON_PATH_ARRAY_DOUBLEWILD= 2+8, + JSON_PATH_NEGATIVE_INDEX= 16, + JSON_PATH_ARRAY_RANGE= 32 }; @@ -93,7 +95,8 @@ typedef struct st_json_path_step_t /* see json_path_step_types */ const uchar *key; /* Pointer to the beginning of the key. */ const uchar *key_end; /* Pointer to the end of the key. */ - uint n_item; /* Item number in an array. No meaning for the key step. */ + int n_item; /* Item number in an array. No meaning for the key step. */ + int n_item_end; /* Last index of the range. */ } json_path_step_t; @@ -356,7 +359,7 @@ int json_skip_level_and_count(json_engine_t *j, int *n_items_skipped); */ int json_find_path(json_engine_t *je, json_path_t *p, json_path_step_t **p_cur_step, - uint *array_counters); + int *array_counters); typedef struct st_json_find_paths_t @@ -365,7 +368,7 @@ typedef struct st_json_find_paths_t json_path_t *paths; uint cur_depth; uint *path_depths; - uint array_counters[JSON_DEPTH_LIMIT]; + int array_counters[JSON_DEPTH_LIMIT]; } json_find_paths_t; @@ -425,13 +428,8 @@ int json_get_path_start(json_engine_t *je, CHARSET_INFO *i_cs, int json_get_path_next(json_engine_t *je, json_path_t *p); - -int json_path_parts_compare( - const json_path_step_t *a, const json_path_step_t *a_end, - const json_path_step_t *b, const json_path_step_t *b_end, - enum json_value_types vt); int json_path_compare(const json_path_t *a, const json_path_t *b, - enum json_value_types vt); + enum json_value_types vt, const int* array_size_counter); int json_valid(const char *js, size_t js_len, CHARSET_INFO *cs); @@ -443,6 +441,8 @@ int json_locate_key(const char *js, const char *js_end, int json_normalize(DYNAMIC_STRING *result, const char *s, size_t size, CHARSET_INFO *cs); +int json_skip_array_and_count(json_engine_t *j, int* n_item); + #ifdef __cplusplus } #endif diff --git a/include/m_ctype.h b/include/m_ctype.h index 442133f3ba7..83b12c3c4f6 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -1269,6 +1269,15 @@ extern struct charset_info_st my_charset_utf8mb4_general_nopad_ci; extern struct charset_info_st my_charset_utf8mb4_unicode_ci; extern struct charset_info_st my_charset_utf8mb4_unicode_nopad_ci; +/* + Contextually typed collations, e.g.: + CHAR(10) COLLATE DEFAULT + CHAR(10) BINARY +*/ +extern struct charset_info_st my_collation_contextually_typed_default; +extern struct charset_info_st my_collation_contextually_typed_binary; + + #define MY_UTF8MB3 "utf8mb3" #define MY_UTF8MB4 "utf8mb4" diff --git a/include/my_base.h b/include/my_base.h index f96e569cae4..388eab97d44 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -35,7 +35,7 @@ #define HA_OPEN_ABORT_IF_LOCKED 0U /* default */ #define HA_OPEN_WAIT_IF_LOCKED 1U -#define HA_OPEN_IGNORE_IF_LOCKED 2U +#define HA_OPEN_IGNORE_IF_LOCKED 2U /* Ignore lock error */ #define HA_OPEN_TMP_TABLE 4U /* Table is a temp table */ #define HA_OPEN_DELAY_KEY_WRITE 8U /* Don't update index */ #define HA_OPEN_ABORT_IF_CRASHED 16U diff --git a/include/mysql_com.h b/include/mysql_com.h index b0d5b026dd8..a2befe2d324 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -180,7 +180,7 @@ enum enum_indicator_type #define NUM_FLAG 32768U /* Field is num (for clients) */ #define PART_KEY_FLAG 16384U /* Intern; Part of some key */ #define GROUP_FLAG 32768U /* Intern: Group field */ -#define BINCMP_FLAG 131072U /* Intern: Used by sql_yacc */ +#define CONTEXT_COLLATION_FLAG 131072U /* Intern: Used by sql_yacc */ #define GET_FIXED_FIELDS_FLAG (1U << 18) /* Used to get fields in item tree */ #define FIELD_IN_PART_FUNC_FLAG (1U << 19)/* Field part of partition func */ #define PART_INDIRECT_KEY_FLAG (1U << 20) |