Merge
This commit is contained in:
commit
2d1c1f8280
@ -3142,8 +3142,9 @@ int find_used_partitions(PART_PRUNE_PARAM *ppar, SEL_ARG *key_tree)
|
|||||||
bool set_full_part_if_bad_ret= FALSE;
|
bool set_full_part_if_bad_ret= FALSE;
|
||||||
bool ignore_part_fields= ppar->ignore_part_fields;
|
bool ignore_part_fields= ppar->ignore_part_fields;
|
||||||
bool did_set_ignore_part_fields= FALSE;
|
bool did_set_ignore_part_fields= FALSE;
|
||||||
|
RANGE_OPT_PARAM *range_par= &(ppar->range_param);
|
||||||
|
|
||||||
if (check_stack_overrun(ppar->range_param.thd, 3*STACK_MIN_SIZE, NULL))
|
if (check_stack_overrun(range_par->thd, 3*STACK_MIN_SIZE, NULL))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (key_tree->left != &null_element)
|
if (key_tree->left != &null_element)
|
||||||
@ -3239,11 +3240,11 @@ int find_used_partitions(PART_PRUNE_PARAM *ppar, SEL_ARG *key_tree)
|
|||||||
else
|
else
|
||||||
flag= key_tree->min_flag | key_tree->max_flag;
|
flag= key_tree->min_flag | key_tree->max_flag;
|
||||||
|
|
||||||
if (tmp_min_key != ppar->range_param.min_key)
|
if (tmp_min_key != range_par->min_key)
|
||||||
flag&= ~NO_MIN_RANGE;
|
flag&= ~NO_MIN_RANGE;
|
||||||
else
|
else
|
||||||
flag|= NO_MIN_RANGE;
|
flag|= NO_MIN_RANGE;
|
||||||
if (tmp_max_key != ppar->range_param.max_key)
|
if (tmp_max_key != range_par->max_key)
|
||||||
flag&= ~NO_MAX_RANGE;
|
flag&= ~NO_MAX_RANGE;
|
||||||
else
|
else
|
||||||
flag|= NO_MAX_RANGE;
|
flag|= NO_MAX_RANGE;
|
||||||
@ -3270,10 +3271,10 @@ int find_used_partitions(PART_PRUNE_PARAM *ppar, SEL_ARG *key_tree)
|
|||||||
get_part_iter_for_interval(ppar->part_info,
|
get_part_iter_for_interval(ppar->part_info,
|
||||||
FALSE,
|
FALSE,
|
||||||
store_length_array,
|
store_length_array,
|
||||||
ppar->range_param.min_key,
|
range_par->min_key,
|
||||||
ppar->range_param.max_key,
|
range_par->max_key,
|
||||||
tmp_min_key - ppar->range_param.min_key,
|
tmp_min_key - range_par->min_key,
|
||||||
tmp_max_key - ppar->range_param.max_key,
|
tmp_max_key - range_par->max_key,
|
||||||
flag,
|
flag,
|
||||||
&ppar->part_iter);
|
&ppar->part_iter);
|
||||||
if (!res)
|
if (!res)
|
||||||
@ -3309,8 +3310,7 @@ int find_used_partitions(PART_PRUNE_PARAM *ppar, SEL_ARG *key_tree)
|
|||||||
{
|
{
|
||||||
PARTITION_ITERATOR subpart_iter;
|
PARTITION_ITERATOR subpart_iter;
|
||||||
DBUG_EXECUTE("info", dbug_print_segment_range(key_tree,
|
DBUG_EXECUTE("info", dbug_print_segment_range(key_tree,
|
||||||
ppar->range_param.
|
range_par->key_parts););
|
||||||
key_parts););
|
|
||||||
res= ppar->part_info->
|
res= ppar->part_info->
|
||||||
get_subpart_iter_for_interval(ppar->part_info,
|
get_subpart_iter_for_interval(ppar->part_info,
|
||||||
TRUE,
|
TRUE,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef PARTITION_ELEMENT_INCLUDED
|
#ifndef PARTITION_ELEMENT_INCLUDED
|
||||||
#define PARTITION_ELEMENT_INCLUDED
|
#define PARTITION_ELEMENT_INCLUDED
|
||||||
|
|
||||||
/* Copyright (C) 2006-2008 MySQL AB, Sun Microsystems Inc. 2008-2009
|
/* Copyright 2005-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -7012,12 +7012,12 @@ uint32 store_tuple_to_record(Field **pfield,
|
|||||||
/*
|
/*
|
||||||
RANGE(columns) partitioning: compare value bound and probe tuple.
|
RANGE(columns) partitioning: compare value bound and probe tuple.
|
||||||
|
|
||||||
The value bound always is a full tuple (but may include the MAX_VALUE
|
The value bound always is a full tuple (but may include the MAXVALUE
|
||||||
special value).
|
special value).
|
||||||
|
|
||||||
The probe tuple may be a prefix of partitioning tuple. The tail_is_min
|
The probe tuple may be a prefix of partitioning tuple. The tail_is_min
|
||||||
parameter specifies whether the suffix components should be assumed to
|
parameter specifies whether the suffix components should be assumed to
|
||||||
hold MAX_VALUE
|
hold MAXVALUE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int cmp_rec_and_tuple(part_column_list_val *val, uint32 nvals_in_rec)
|
static int cmp_rec_and_tuple(part_column_list_val *val, uint32 nvals_in_rec)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef SQL_PARTITION_INCLUDED
|
#ifndef SQL_PARTITION_INCLUDED
|
||||||
#define SQL_PARTITION_INCLUDED
|
#define SQL_PARTITION_INCLUDED
|
||||||
|
|
||||||
/* Copyright (C) 2006-2008 MySQL AB, Sun Microsystems Inc. 2008-2009
|
/* Copyright 2005-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
Loading…
x
Reference in New Issue
Block a user