summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2017-01-24 17:34:44 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2017-01-24 17:34:44 +0400
commit50831b0f197fd1edb98aa56085e391e5033e2a54 (patch)
treeee2ce1697dc7a8b8f3478c47b14cbfd0eb3cb1ba /include
parente5398aca766536bc6151270a6dcd57260dada713 (diff)
downloadmariadb-git-50831b0f197fd1edb98aa56085e391e5033e2a54.tar.gz
MDEV-11557 port MySQL-5.7 JSON tests to MariaDB.
json_no_table.test ported.
Diffstat (limited to 'include')
-rw-r--r--include/json_lib.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/include/json_lib.h b/include/json_lib.h
index ce7f27317bc..ddba571ac59 100644
--- a/include/json_lib.h
+++ b/include/json_lib.h
@@ -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