summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2013-03-31 09:10:01 -0700
committerIgor Babaev <igor@askmonty.org>2013-03-31 09:10:01 -0700
commit2713bab291095ae8558fa6c0a649c1991c5aa250 (patch)
tree3111fbce4038ea7318a7e9f2385a16d1d025bc11 /sql/sql_select.h
parent78bab7839502e02d6d62b50d99ac9b0637acb4a1 (diff)
parent993ea79f2df42292eceeee394e8ece9f4a3f6cf2 (diff)
downloadmariadb-git-2713bab291095ae8558fa6c0a649c1991c5aa250.tar.gz
Merge 10.0-base -> mwl253.
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 87c09611009..d52d312f14b 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -1,8 +1,8 @@
#ifndef SQL_SELECT_INCLUDED
#define SQL_SELECT_INCLUDED
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
- Copyright (c) 2008-2011 Monty Program Ab
+/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
+ Copyright (c) 2008, 2013, Monty Program Ab.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -525,6 +525,16 @@ typedef struct st_join_table {
bool preread_init();
bool is_sjm_nest() { return test(bush_children); }
+
+ bool access_from_tables_is_allowed(table_map used_tables,
+ table_map sjm_lookup_tables)
+ {
+ table_map used_sjm_lookup_tables= used_tables & sjm_lookup_tables;
+ return !used_sjm_lookup_tables ||
+ (emb_sj_nest &&
+ !(used_sjm_lookup_tables & ~emb_sj_nest->sj_inner_tables));
+ }
+
} JOIN_TAB;
@@ -977,6 +987,11 @@ public:
bool hash_join;
bool do_send_rows;
table_map const_table_map;
+ /**
+ Bitmap of semijoin tables that the current partial plan decided
+ to materialize and access by lookups
+ */
+ table_map sjm_lookup_tables;
/*
Constant tables for which we have found a row (as opposed to those for
which we didn't).
@@ -1308,8 +1323,9 @@ public:
outer_ref_cond= pseudo_bits_cond= NULL;
in_to_exists_where= NULL;
in_to_exists_having= NULL;
-
pre_sort_join_tab= NULL;
+ emb_sjm_nest= NULL;
+ sjm_lookup_tables= 0;
}
int prepare(Item ***rref_pointer_array, TABLE_LIST *tables, uint wind_num,