From 3fa6432b09be41ddcc8dae2a8e12eacab5bb95a2 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 10 May 2006 17:40:20 +0400 Subject: BUG#17379 Wrong reuse of E(#rows(range)) as E(#rows(ref(const))): Re-work best_access_path() and find_best() to reuse E(#rows(range access)) as E(#rows(ref[_or_null](const) access) only when it is appropriate. [This is the final cumulative patch] mysql-test/r/select.result: BUG#17379: Testcase mysql-test/r/subselect.result: BUG#17379: Updated test results mysql-test/t/select.test: BUG#17379: Testcase sql/opt_range.cc: BUG#17379: Wrong reuse of E(#rows(range)) as E(#rows(ref(const))): Make range optimizer together with TABLE::quick_* also return TABLE::quick_n_ranges sql/sql_select.cc: BUG#17379: Wrong reuse of E(#rows(range)) as E(#rows(ref(const))): Re-work best_access_path() to reuse E(#rows(range access)) as E(#rows(ref[_or_null](const) access) only when it is appropriate. sql/table.h: BUG#17379: Wrong reuse of E(#rows(range)) as E(#rows(ref(const))): Make range optimizer together with TABLE::quick_* also return TABLE::quick_n_ranges --- sql/table.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/table.h') diff --git a/sql/table.h b/sql/table.h index ce44f797280..106421d7a17 100644 --- a/sql/table.h +++ b/sql/table.h @@ -221,6 +221,7 @@ struct st_table { ha_rows quick_rows[MAX_KEY]; key_part_map const_key_parts[MAX_KEY]; uint quick_key_parts[MAX_KEY]; + uint quick_n_ranges[MAX_KEY]; /* If this table has TIMESTAMP field with auto-set property (pointed by -- cgit v1.2.1