summaryrefslogtreecommitdiff
path: root/sql/item_geofunc.h
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2017-09-12 11:58:49 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2017-09-12 11:58:49 +0400
commitea876b39f33af6b7d54f2a0a5def0fbf40b30e27 (patch)
treeba85cd56e27e7e7a2d866445d62978d75344020b /sql/item_geofunc.h
parent6352ec2184dc8e5744aed3f718fc635edb4b511f (diff)
downloadmariadb-git-ea876b39f33af6b7d54f2a0a5def0fbf40b30e27.tar.gz
MDEV-13716 point_big test fails in 10.2.
Implementation for the reverse spatial predicates was lost somehow.
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 abe189395ec..199bc1f47de 100644
--- a/sql/item_geofunc.h
+++ b/sql/item_geofunc.h
@@ -349,7 +349,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,