diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-07-02 17:00:05 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-07-02 17:00:05 +0300 |
commit | 0ad8a825a8901d4b5e704fed3fc65e93cea18f18 (patch) | |
tree | 69238e9b52a7166b603e3ebbb2c7ea1b616765ed /sql/spatial.cc | |
parent | 315380a4d16ddb16461d906a23be341e354c30ed (diff) | |
parent | 779262842edf86c989c099c6930ae4683cbde609 (diff) | |
download | mariadb-git-0ad8a825a8901d4b5e704fed3fc65e93cea18f18.tar.gz |
Merge 10.5 into 10.6
Diffstat (limited to 'sql/spatial.cc')
-rw-r--r-- | sql/spatial.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/spatial.cc b/sql/spatial.cc index df5a46ac8cc..527a1df9d1f 100644 --- a/sql/spatial.cc +++ b/sql/spatial.cc @@ -563,7 +563,11 @@ Geometry *Geometry::create_from_json(Geometry_buffer *buffer, goto handle_geometry_key; feature_type_found= 1; } + else /* can't understand the type. */ + break; } + else /* The "type" value can only be string. */ + break; } else if (key_len == coord_keyname_len && memcmp(key_buf, coord_keyname, coord_keyname_len) == 0) @@ -580,6 +584,8 @@ Geometry *Geometry::create_from_json(Geometry_buffer *buffer, coord_start= je->value_begin; if (ci && ci != &geometrycollection_class) goto create_geom; + if (json_skip_level(je)) + goto err_return; } } else if (key_len == geometries_keyname_len && |