Merge branch 'mysql-5.1' into mysql-5.5

This commit is contained in:
Sreeharsha Ramanavarapu 2015-08-03 08:17:27 +05:30
commit b2df544886

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights /* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights
* reserved. * reserved.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
@ -3296,10 +3296,19 @@ int find_used_partitions(PART_PRUNE_PARAM *ppar, SEL_ARG *key_tree)
key_tree->min_flag | key_tree->min_flag |
key_tree->max_flag, key_tree->max_flag,
&subpart_iter); &subpart_iter);
DBUG_ASSERT(res); /* We can't get "no satisfying subpartitions" */ if (res == 0)
{
/*
The only case where we can get "no satisfying subpartitions"
returned from the above call is when an error has occurred.
*/
DBUG_ASSERT(range_par->thd->is_error());
return 0;
}
if (res == -1) if (res == -1)
goto pop_and_go_right; /* all subpartitions satisfy */ goto pop_and_go_right; /* all subpartitions satisfy */
uint32 subpart_id; uint32 subpart_id;
bitmap_clear_all(&ppar->subparts_bitmap); bitmap_clear_all(&ppar->subparts_bitmap);
while ((subpart_id= subpart_iter.get_next(&subpart_iter)) != while ((subpart_id= subpart_iter.get_next(&subpart_iter)) !=