Commit 19b8f1ee authored by Igor Babaev's avatar Igor Babaev

Merge.

parents 8067ced9 50741037
This diff is collapsed.
This diff is collapsed.
......@@ -3969,7 +3969,6 @@ bool prune_partitions(THD *thd, TABLE *table, Item *pprune_cond)
thd->no_errors=0;
thd->mem_root= range_par->old_root;
free_root(&alloc,MYF(0)); // Return memory & allocator
DBUG_RETURN(retval);
/*
Must be a subset of the locked partitions.
lock_partitions contains the partitions marked by explicit partition
......@@ -3993,7 +3992,11 @@ bool prune_partitions(THD *thd, TABLE *table, Item *pprune_cond)
&prune_param.part_info->read_partitions);
}
if (bitmap_is_clear_all(&(prune_param.part_info->read_partitions)))
{
table->all_partitions_pruned_away= true;
retval= TRUE;
}
DBUG_RETURN(retval);
}
......
......@@ -23161,6 +23161,22 @@ void TABLE_LIST::print(THD *thd, table_map eliminated_tables, String *str,
append_identifier(thd, str, table_name, table_name_length);
cmp_name= table_name;
}
#ifdef WITH_PARTITION_STORAGE_ENGINE
if (partition_names && partition_names->elements)
{
int i, num_parts= partition_names->elements;
List_iterator<String> name_it(*(partition_names));
str->append(STRING_WITH_LEN(" PARTITION ("));
for (i= 1; i <= num_parts; i++)
{
String *name= name_it++;
append_identifier(thd, str, name->c_ptr(), name->length());
if (i != num_parts)
str->append(',');
}
str->append(')');
}
#endif /* WITH_PARTITION_STORAGE_ENGINE */
}
if (my_strcasecmp(table_alias_charset, cmp_name, alias))
{
......
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