summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h
index ca400caac59..a5f3ae6ba13 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -585,6 +585,10 @@ public:
}
/* Hash value */
virtual void hash(ulong *nr, ulong *nr2);
+
+ /* Check whether the field can be used as a join attribute in hash join */
+ virtual bool hash_join_is_possible() { return TRUE; }
+
friend bool reopen_table(THD *,struct st_table *,bool);
friend int cre_myisam(char * name, register TABLE *form, uint options,
ulonglong auto_increment_value);
@@ -760,6 +764,12 @@ public:
my_decimal *val_decimal(my_decimal *);
virtual bool str_needs_quotes() { return TRUE; }
uint is_equal(Create_field *new_field);
+
+ bool hash_join_is_possible()
+ {
+ /* TODO: support hash joins for non-binary collations */
+ return (flags & BINARY_FLAG);
+ }
};
@@ -1904,6 +1914,7 @@ public:
uint size_of() const { return sizeof(*this); }
int reset(void) { return !maybe_null() || Field_blob::reset(); }
geometry_type get_geometry_type() { return geom_type; };
+ bool hash_join_is_possible() { return FALSE; }
};
#endif /*HAVE_SPATIAL*/