From 6ed9c1364302ea998aa265e67aa7714dc3f365c2 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Fri, 18 Nov 2011 09:35:51 -0800 Subject: Fixed LP bug #891953. Due to this bug the function SEL_IMERGE::or_sel_tree_with_checks() could build an inconsistent merge tree if one of the SEL_TREEs in the resulting index merge happened to contain a full key range. This could trigger an assertion failure. --- sql/opt_range.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql') diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 229c1e2861b..71bb2157a39 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -1208,13 +1208,13 @@ int SEL_IMERGE::or_sel_tree_with_checks(RANGE_OPT_PARAM *param, if (result) { + result->keys_map= result_keys; if (result_keys.is_clear_all()) result->type= SEL_TREE::ALWAYS; if ((result->type == SEL_TREE::MAYBE) || (result->type == SEL_TREE::ALWAYS)) return 1; /* SEL_TREE::IMPOSSIBLE is impossible here */ - result->keys_map= result_keys; *or_tree= result; was_ored= TRUE; } -- cgit v1.2.1