summaryrefslogtreecommitdiff
path: root/sql/item_geofunc.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_geofunc.h')
-rw-r--r--sql/item_geofunc.h13
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,