Commit fc5f022e authored by unknown's avatar unknown

BUG# 15408 Partitions: subpartition names are not unique

THis patch goes along with 1.2098.23.1 to form the complete patch


libmysqld/Makefile.am:
  added partition_info.cpp   to libmysqld sources
sql/ha_ndbcluster.cc:
  using the new member versions of these
sql/sql_partition.cc:
  using the member version of is_sub_partitioned
parent 80263d11
...@@ -67,7 +67,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \ ...@@ -67,7 +67,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
event_executor.cc event.cc event_timed.cc \ event_executor.cc event.cc event_timed.cc \
rpl_filter.cc sql_partition.cc handlerton.cc sql_plugin.cc \ rpl_filter.cc sql_partition.cc handlerton.cc sql_plugin.cc \
sql_tablespace.cc \ sql_tablespace.cc \
rpl_injector.cc my_user.c rpl_injector.cc my_user.c partition_info.cpp
libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources)
EXTRA_libmysqld_a_SOURCES = ha_innodb.cc ha_berkeley.cc ha_archive.cc \ EXTRA_libmysqld_a_SOURCES = ha_innodb.cc ha_berkeley.cc ha_archive.cc \
......
...@@ -2214,7 +2214,7 @@ int ha_ndbcluster::full_table_scan(byte *buf) ...@@ -2214,7 +2214,7 @@ int ha_ndbcluster::full_table_scan(byte *buf)
if (m_use_partition_function) if (m_use_partition_function)
{ {
part_spec.start_part= 0; part_spec.start_part= 0;
part_spec.end_part= get_tot_partitions(m_part_info) - 1; part_spec.end_part= m_part_info->get_tot_partitions() - 1;
prune_partition_set(table, &part_spec); prune_partition_set(table, &part_spec);
DBUG_PRINT("info", ("part_spec.start_part = %u, part_spec.end_part = %u", DBUG_PRINT("info", ("part_spec.start_part = %u, part_spec.end_part = %u",
part_spec.start_part, part_spec.end_part)); part_spec.start_part, part_spec.end_part));
...@@ -5203,7 +5203,7 @@ void ha_ndbcluster::set_part_info(partition_info *part_info) ...@@ -5203,7 +5203,7 @@ void ha_ndbcluster::set_part_info(partition_info *part_info)
m_part_info= part_info; m_part_info= part_info;
if (!(m_part_info->part_type == HASH_PARTITION && if (!(m_part_info->part_type == HASH_PARTITION &&
m_part_info->list_of_part_fields && m_part_info->list_of_part_fields &&
!is_sub_partitioned(m_part_info))) !m_part_info->is_sub_partitioned()))
m_use_partition_function= TRUE; m_use_partition_function= TRUE;
} }
...@@ -9316,7 +9316,7 @@ uint ha_ndbcluster::set_up_partition_info(partition_info *part_info, ...@@ -9316,7 +9316,7 @@ uint ha_ndbcluster::set_up_partition_info(partition_info *part_info,
{ {
uint ng; uint ng;
part_elem= part_it++; part_elem= part_it++;
if (!is_sub_partitioned(part_info)) if (!part_info->is_sub_partitioned())
{ {
ng= part_elem->nodegroup_id; ng= part_elem->nodegroup_id;
if (first && ng == UNDEF_NODEGROUP) if (first && ng == UNDEF_NODEGROUP)
......
...@@ -5776,7 +5776,7 @@ static uint32 get_next_partition_via_walking(PARTITION_ITERATOR *part_iter) ...@@ -5776,7 +5776,7 @@ static uint32 get_next_partition_via_walking(PARTITION_ITERATOR *part_iter)
field->store(part_iter->field_vals.start, FALSE); field->store(part_iter->field_vals.start, FALSE);
part_iter->field_vals.start++; part_iter->field_vals.start++;
longlong dummy; longlong dummy;
if (is_sub_partitioned(part_iter->part_info) && if (part_iter->part_info->is_sub_partitioned() &&
!part_iter->part_info->get_part_partition_id(part_iter->part_info, !part_iter->part_info->get_part_partition_id(part_iter->part_info,
&part_id, &dummy) || &part_id, &dummy) ||
!part_iter->part_info->get_partition_id(part_iter->part_info, !part_iter->part_info->get_partition_id(part_iter->part_info,
......
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