diff options
author | Anel Husakovic <anel@mariadb.org> | 2019-07-10 02:27:35 -0700 |
---|---|---|
committer | Anel Husakovic <anel@mariadb.org> | 2019-07-11 00:52:27 -0700 |
commit | 81ad7b12d09f5c4b50fdfa5d7105fed82f9a463c (patch) | |
tree | 9d732508b86d8c24fbca5dc4efdfe63275c268c4 /sql/mysql_json.h | |
parent | 0a3aec0a75cfd929c3383d034270c15166db83ee (diff) | |
download | mariadb-git-bb-anel-json-v2-10.3-recursion.tar.gz |
After review fixesbb-anel-json-v2-10.3-recursion
- Indentation fixed
- Logic of empty string fixed
- Added read_variable_length() to opaque data type
- Added logic and test case for MYSQL_TYPE_NEWDECIMAL
- Added new utf8 test
- Added support encoding for other opaque data types
(MYSQL_TYPE_{LONG/MEDIUM/TINY}BLOB, MYSQL_TYPE_VARCHAR, MYSQL_TYPE_YEAR) found in json
suite of mysql and test cases
- Added big array test (--do-test=anel/mysql_j)
- alter force @todo
Diffstat (limited to 'sql/mysql_json.h')
-rw-r--r-- | sql/mysql_json.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/sql/mysql_json.h b/sql/mysql_json.h index 31bed6ac1af..ed5c58651e7 100644 --- a/sql/mysql_json.h +++ b/sql/mysql_json.h @@ -8,7 +8,6 @@ #include "mysql_com.h" #include "mysqld_error.h" -// defines of mysql @todo anel put in single file #define JSONB_TYPE_SMALL_OBJECT 0x0 #define JSONB_TYPE_LARGE_OBJECT 0x1 #define JSONB_TYPE_SMALL_ARRAY 0x2 @@ -56,7 +55,6 @@ #define JSON_DOCUMENT_MAX_DEPTH 100 /* - @todo anel enums used in json_dom Json values in MySQL comprises the stand set of JSON values plus a MySQL specific set. A Json _number_ type is subdivided into _int_, _uint_, _double_ and _decimal_. @@ -128,7 +126,7 @@ enum enum_json_type { J_ERROR }; - /** +/* Extended type ids so that JSON_TYPE() can give useful type names to certain sub-types of J_OPAQUE. */ @@ -138,15 +136,14 @@ enum enum_json_opaque_type { J_OPAQUE_GEOMETRY }; -// Prototypes + size_t read_offset_or_size(const char *, bool); -bool get_mysql_string(String *buffer, size_t type, const char *data, size_t len, bool large); -bool parse_value(String *buffer, size_t type, const char *data, size_t len, bool large, size_t depth); +bool get_mysql_string(String *buffer, size_t type, const char *data, size_t len, + bool large); +bool parse_value(String *buffer, size_t type, const char *data, size_t len, + bool large, size_t depth); bool parse_array_or_object(String * buffer, Field_mysql_json::enum_type, - const char *,size_t , bool); + const char *, size_t, bool); bool parse_mysql_scalar(String* buffer, size_t type, const char *data, size_t len, bool large, size_t depth); - -// static bool read_variable_length(const char *data, size_t data_length, -// size_t *length, size_t *num) #endif /* MYSQL_JSON_INCLUDED */
\ No newline at end of file |