diff options
author | unknown <sergefp@mysql.com> | 2006-04-06 21:23:33 +0400 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2006-04-06 21:23:33 +0400 |
commit | 4d1666f6b8f84053e5d1882e3d8893171ffe3956 (patch) | |
tree | bc2b49b52da1f1748cc430504820ba5c2dde4843 /sql/opt_range.cc | |
parent | 3d34946e762c01157ebe7bae2482ed4bfd3b5e84 (diff) | |
download | mariadb-git-4d1666f6b8f84053e5d1882e3d8893171ffe3956.tar.gz |
BUG#18558 "Partition pruning results are incorrect for certain class of WHERE clauses" :
* Produce right results for conditions that were transformed to "(partitioning_range) AND
(list_of_subpartitioning_ranges)": make each partition id set iterator auto-reset itself
after it has returned all partition ids in the sequence
* Fix "Range mapping" and "Range mapping" partitioning interval analysis functions to
correctly deal with NULL values.
mysql-test/r/partition_pruning.result:
Testcase for BUG#18558
mysql-test/t/partition_pruning.test:
Testcase for BUG#18558
sql/opt_range.cc:
BUG#18558: Move partition set iterator initialization to sql_partition.cc, comment fixes
sql/partition_info.h:
BUG#18558: Make each partition set iterator auto-reset itself after it has returned all
partition ids in the set it enumerates.
sql/sql_partition.cc:
BUG#18558:
- Make each partition set iterator auto-reset itself after it has returned all
partition ids in the set it enumerates.
- Fix partition interval analysis to correctly handle intervals with one or both
NULL bounds.
sql/sql_partition.h:
BUG#18558:
- Make each partition set iterator auto-reset itself after it has returned all
partition ids in the set it enumerates.
- Rename PARTITION_ITERATOR::has_null_value to ret_null_part
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 4ffce67638d..ec10dd099b8 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -2296,8 +2296,6 @@ bool prune_partitions(THD *thd, TABLE *table, Item *pprune_cond) RANGE_OPT_PARAM *range_par= &prune_param.range_param; prune_param.part_info= part_info; - prune_param.part_iter.has_null_value= FALSE; - init_sql_alloc(&alloc, thd->variables.range_alloc_block_size, 0); range_par->mem_root= &alloc; range_par->old_root= thd->mem_root; @@ -2730,7 +2728,7 @@ int find_used_partitions(PART_PRUNE_PARAM *ppar, SEL_ARG *key_tree) key_tree->min_flag | key_tree->max_flag, &ppar->part_iter); if (!res) - goto go_right; /* res=0 --> no satisfying partitions */ + goto go_right; /* res==0 --> no satisfying partitions */ if (res == -1) { //get a full range iterator |