diff options
author | Igor Babaev <igor@askmonty.org> | 2010-10-30 15:14:36 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2010-10-30 15:14:36 -0700 |
commit | df32342102cd21425b2ead121af6336378f83a5f (patch) | |
tree | 52cb9d0042c95a5e00fd0a221a5021f71bd68016 /sql/field.h | |
parent | 0b72fd88a11213f64dc146e7ceab942aeb8c40d0 (diff) | |
download | mariadb-git-df32342102cd21425b2ead121af6336378f83a5f.tar.gz |
Fixed LP bug #668290.
Prohibited to use hash join algorithm BNLH if join attributes
need non-binary collations. It has to be done because BNLH does
not support join for such attributes yet.
Later this limitations will be lifted.
Changed default collations for the schemes of some test cases
to preserve the old execution plans.
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 11 |
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*/ |