diff options
author | Rucha Deodhar <rucha.deodhar@mariadb.com> | 2023-03-02 17:19:36 +0530 |
---|---|---|
committer | Rucha Deodhar <rucha.deodhar@mariadb.com> | 2023-04-26 11:00:09 +0530 |
commit | 2c4c7c8b02140ff3abb8325f6261ccf1ae18b477 (patch) | |
tree | eb823175f618dc8d059bc34eb05baba638170891 /sql/json_schema.h | |
parent | dffd1679ba97e5e8145575f0f11cb87553670c6f (diff) | |
download | mariadb-git-2c4c7c8b02140ff3abb8325f6261ccf1ae18b477.tar.gz |
MDEV-30704: JSON_SCHEMA_VALID: multipleOf must be greater than zero
Analysis: multipleOf must be strictly greater then 0. However the
implementation only disallowed values strcitly less than 0
Fix: check if value is less than or equal to 0 instead of less than 0 and
return true.
Also fixed the incorrect return value for some other keywords.
Diffstat (limited to 'sql/json_schema.h')
-rw-r--r-- | sql/json_schema.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/json_schema.h b/sql/json_schema.h index 4f1e146c862..53b6aaaff9f 100644 --- a/sql/json_schema.h +++ b/sql/json_schema.h @@ -227,6 +227,8 @@ class Json_schema_minimum : public Json_schema_keyword class Json_schema_multiple_of : public Json_schema_keyword { + private: + double multiple_of; public: bool validate(const json_engine_t *je, const uchar *k_start= NULL, const uchar *k_end= NULL) override; |