Commit 9f6dd443 authored by unknown's avatar unknown

moved prune_partition_set decl from handler.h to sql_partition.h during merge

cleaned up some files from the partition code move


sql/Makefile.am:
  break the long line onto the next line
sql/partition_info.cpp:
  remove some old comments left behind
sql/sql_partition.h:
  Moved from handler.h during merge
parent a1b542e2
......@@ -65,7 +65,8 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
sp_head.h sp_pcontext.h sp_rcontext.h sp.h sp_cache.h \
parse_file.h sql_view.h sql_trigger.h \
sql_array.h sql_cursor.h event.h event_priv.h \
sql_plugin.h authors.h sql_partition.h partition_info.h partition_element.h
sql_plugin.h authors.h sql_partition.h partition_info.h \
partition_element.h
mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \
item.cc item_sum.cc item_buff.cc item_func.cc \
item_cmpfunc.cc item_strfunc.cc item_timefunc.cc \
......
......@@ -191,7 +191,7 @@ bool partition_info::set_up_default_partitions(handler *file, ulonglong max_rows
bool partition_info::set_up_default_subpartitions(handler *file,
ulonglong max_rows)
{
uint i, j; //, no_parts, no_subparts;
uint i, j;
char *default_name, *name_ptr;
bool result= TRUE;
partition_element *part_elem;
......@@ -200,16 +200,11 @@ bool partition_info::set_up_default_subpartitions(handler *file,
if (no_subparts == 0)
no_subparts= file->get_default_no_partitions(max_rows);
// no_parts= part_info->no_parts;
//no_subparts= part_info->no_subparts;
if (unlikely((no_parts * no_subparts) > MAX_PARTITIONS))
{
my_error(ER_TOO_MANY_PARTITIONS_ERROR, MYF(0));
goto end;
}
// if (unlikely((!(default_name=
// create_default_partition_names(no_subparts, (uint)0, TRUE)))))
//goto end;
i= 0;
do
{
......@@ -277,6 +272,17 @@ bool partition_info::set_up_defaults_for_partitioning(handler *file,
DBUG_RETURN(FALSE);
}
/*
A support function to check if a partition element's name is unique
SYNOPSIS
has_unique_name()
partition_element element to check
RETURN VALUES
TRUE Has unique name
FALSE Doesn't
*/
bool partition_info::has_unique_name(partition_element *element)
{
DBUG_ENTER("partition_info::has_unique_name");
......
......@@ -92,6 +92,7 @@ int get_parts_for_update(const byte *old_data, byte *new_data,
longlong *func_value);
int get_part_for_delete(const byte *buf, const byte *rec0,
partition_info *part_info, uint32 *part_id);
void prune_partition_set(const TABLE *table, part_id_range *part_spec);
bool check_partition_info(partition_info *part_info,handlerton **eng_type,
handler *file, ulonglong max_rows);
bool fix_partition_func(THD *thd, const char *name, TABLE *table,
......
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