diff options
author | Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com> | 2015-08-03 08:17:27 +0530 |
---|---|---|
committer | Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com> | 2015-08-03 08:17:27 +0530 |
commit | b2df544886c9e94a444acaf10a6ac1b22314fcc1 (patch) | |
tree | 00006c18c425d419f503590fbbc285ac60c779be /sql/opt_range.cc | |
parent | 18b2c777803d97f9a798de7e0ff151b4afacbeb1 (diff) | |
parent | 8006ad8053672cbaa07f7f0a3561e2c5044ff6b7 (diff) | |
download | mariadb-git-b2df544886c9e94a444acaf10a6ac1b22314fcc1.tar.gz |
Merge branch 'mysql-5.1' into mysql-5.5
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 0f2a66a9efe..3e0362995d7 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -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. 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->max_flag, &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) goto pop_and_go_right; /* all subpartitions satisfy */ - + uint32 subpart_id; bitmap_clear_all(&ppar->subparts_bitmap); while ((subpart_id= subpart_iter.get_next(&subpart_iter)) != |