diff options
author | unknown <sergefp@mysql.com> | 2005-10-25 19:28:27 +0400 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2005-10-25 19:28:27 +0400 |
commit | 2b7f5a45e96413f88ba93ebd85971a3b82cbeb7c (patch) | |
tree | 5de18844ff69573fffda746669424dbe86b91bf3 /sql/sql_select.h | |
parent | 11541107b83d8e361722dff601192bd7d7f70ca9 (diff) | |
download | mariadb-git-2b7f5a45e96413f88ba93ebd85971a3b82cbeb7c.tar.gz |
BUG#13126: When choosing join order for join with nested joins, don't produce join
orders that cannot be handled by the executioner.
mysql-test/r/bigint.result:
Added mssing "drop table if exists"
mysql-test/r/join_nested.result:
Testcase for BUG#13126
mysql-test/t/bigint.test:
Added mssing "drop table if exists"
mysql-test/t/join_nested.test:
Testcase for BUG#13126
sql/mysql_priv.h:
BUG#13126: Added nested_join_map type.
sql/sql_prepare.cc:
BUG#13126: Don't set NESTED_JOIN::counter to 0 here as it is reset in other place now.
sql/sql_select.cc:
BUG#13126: When choosing join order for join with nested joins, don't produce join orders
that the executioner cannot handle. The work is done by check_interleaving_with_nj() and
restore_prev_nj_state() functions that are used from the join optimizer to avoid building
invalid join orders.
sql/sql_select.h:
BUG#13126: Added JOIN_TAB::embedding_map and JOIN::cur_embedding_map.
sql/table.h:
BUG#13126: In NESTED_JOIN: added nj_map, added comment about where counter is used.
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r-- | sql/sql_select.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index d6161eb6372..15872731f0c 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -136,7 +136,9 @@ typedef struct st_join_table { TABLE_REF ref; JOIN_CACHE cache; JOIN *join; - + /* Bitmap of nested joins this table is part of */ + nested_join_map embedding_map; + void cleanup(); } JOIN_TAB; @@ -193,6 +195,13 @@ class JOIN :public Sql_alloc */ ha_rows fetch_limit; POSITION positions[MAX_TABLES+1],best_positions[MAX_TABLES+1]; + + /* + Bitmap of nested joins embedding the position at the end of the current + partial join (valid only during join optimizer run). + */ + nested_join_map cur_embedding_map; + double best_read; List<Item> *fields; List<Cached_item> group_fields, group_fields_cache; |