Commit 9ccce9f1 authored by Sergey Petrunya's avatar Sergey Petrunya

Fix valgrind warnings

parent e7aa18fb
......@@ -341,8 +341,9 @@ class SEL_ARG :public Sql_alloc
SEL_ARG(Field *field, uint8 part, uchar *min_value, uchar *max_value,
uint8 min_flag, uint8 max_flag, uint8 maybe_flag);
SEL_ARG(enum Type type_arg)
:min_flag(0),elements(1),use_count(1),left(0),right(0),next_key_part(0),
color(BLACK), type(type_arg)
:min_flag(0), max_part_no(0) /* first key part means 1. 0 mean 'no parts'*/,
elements(1),use_count(1),left(0),right(0),
next_key_part(0), color(BLACK), type(type_arg)
{}
inline bool is_same(SEL_ARG *arg)
{
......
......@@ -8521,7 +8521,7 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after)
//for (i=join->const_tables ; i < join->tables ; i++)
for (tab= first_linear_tab(join, TRUE), i= join->const_tables;
tab;
tab= next_linear_tab(join, tab, TRUE), i++)
tab= next_linear_tab(join, tab, TRUE))
{
/*
The approximation below for partial join cardinality is not good because
......@@ -8533,8 +8533,11 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after)
if ((tab->bush_root_tab && tab->bush_root_tab->bush_children->start == tab) ||
(tab == join->join_tab + join->const_tables))
prev_tab= NULL;
DBUG_ASSERT(tab->bush_children || tab->table == join->best_positions[i].table->table);
tab->partial_join_cardinality= join->best_positions[i].records_read *
(prev_tab? prev_tab->partial_join_cardinality : 1);
if (!tab->bush_children)
i++;
}
check_join_cache_usage_for_tables(join, options, no_jbuf_after);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment