diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-09-13 12:12:05 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-09-13 12:12:05 +0400 |
commit | 178540b904f3eca70488a3d1a0a55f5676087c04 (patch) | |
tree | c6b011a292ea8a3510dae01aa3ea43e87cf3662f /sql/item_geofunc.h | |
parent | 3a9ee22ba924160cbc5a4dd3fd047d62f11dabd2 (diff) | |
parent | a237a920991f417e9a4567957f4fc7aa5b538270 (diff) | |
download | mariadb-git-178540b904f3eca70488a3d1a0a55f5676087c04.tar.gz |
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Diffstat (limited to 'sql/item_geofunc.h')
-rw-r--r-- | sql/item_geofunc.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h index db720da18fd..d332d067c37 100644 --- a/sql/item_geofunc.h +++ b/sql/item_geofunc.h @@ -550,7 +550,18 @@ public: maybe_null= true; } enum Functype functype() const { return spatial_rel; } - enum Functype rev_functype() const { return spatial_rel; } + enum Functype rev_functype() const + { + switch (spatial_rel) + { + case SP_CONTAINS_FUNC: + return SP_WITHIN_FUNC; + case SP_WITHIN_FUNC: + return SP_CONTAINS_FUNC; + default: + return spatial_rel; + } + } bool is_null() { (void) val_int(); return null_value; } void add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level, table_map usable_tables, |