mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-11557 port MySQL-5.7 JSON tests to MariaDB.
json_no_table.test ported.
This commit is contained in:
@@ -219,7 +219,7 @@ typedef struct st_json_engine_t
|
||||
/* string constants. */
|
||||
|
||||
int stack[JSON_DEPTH_LIMIT]; /* Keeps the stack of nested JSON structures. */
|
||||
int *stack_p; /* The 'stack' pointer. */
|
||||
int stack_p; /* The 'stack' pointer. */
|
||||
} json_engine_t;
|
||||
|
||||
|
||||
@@ -308,7 +308,7 @@ typedef const int *json_level_t;
|
||||
*/
|
||||
#define json_get_level(j) (j->stack_p)
|
||||
|
||||
int json_skip_to_level(json_engine_t *j, json_level_t level);
|
||||
int json_skip_to_level(json_engine_t *j, int level);
|
||||
|
||||
/*
|
||||
json_skip_level() works as above with just current structre.
|
||||
@@ -391,6 +391,27 @@ int json_append_ascii(CHARSET_INFO *json_cs,
|
||||
uchar *json, uchar *json_end,
|
||||
const uchar *ascii, const uchar *ascii_end);
|
||||
|
||||
|
||||
/*
|
||||
Scan the JSON and return paths met one-by-one.
|
||||
json_get_path_start(&p)
|
||||
while (json_get_path_next(&p))
|
||||
{
|
||||
handle_the_next_path();
|
||||
}
|
||||
*/
|
||||
|
||||
int json_get_path_start(json_engine_t *je, CHARSET_INFO *i_cs,
|
||||
const uchar *str, const uchar *end,
|
||||
json_path_t *p);
|
||||
|
||||
|
||||
int json_get_path_next(json_engine_t *je, json_path_t *p);
|
||||
|
||||
|
||||
int json_path_compare(const json_path_t *a, const json_path_t *b);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user