summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-12-05 09:50:24 -0800
committerIgor Babaev <igor@askmonty.org>2011-12-05 09:50:24 -0800
commit7d1f41265c7d9e36b8d85af33225b68a4eec1a2f (patch)
tree48a42080ed1907d8dd07b373ddb92e7684e0c657 /sql/sql_select.h
parentb5a05df61ea263aa3c3b9df78c56148adf029f04 (diff)
downloadmariadb-git-7d1f41265c7d9e36b8d85af33225b68a4eec1a2f.tar.gz
Fixed LP bug #899777.
KEYUSE elements for a possible hash join key are not sorted by field numbers of the second table T of the hash join operation. Besides some of these KEYUSE elements cannot be used to build any key as their key expressions depend on the tables that are planned to be accessed after the table T. The code before the patch did not take this into account and, as a result, execition of a query the employing block-based hash join algorithm could cause a crash or return a wrong result set.
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 4333b825c28..ffe3985c3c3 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -77,6 +77,8 @@ typedef struct keyuse_t {
bool is_for_hash_join() { return is_hash_join_key_no(key); }
} KEYUSE;
+#define NO_KEYPART ((uint)(-1))
+
class store_key;
const int NO_REF_PART= uint(-1);