Commit cf5cb1e9 authored by unknown's avatar unknown
Browse files

Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-5.1-new

into  linux.site:/home/reggie/work/mysql-5.1-bug15408


sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
parents 010f9be5 fc5f022e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
        event_executor.cc event.cc event_timed.cc \
        rpl_filter.cc sql_partition.cc handlerton.cc sql_plugin.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)
EXTRA_libmysqld_a_SOURCES =	ha_innodb.cc ha_berkeley.cc ha_archive.cc \
+5 −0
Original line number Diff line number Diff line
@@ -142,3 +142,8 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
CREATE TABLE t1 (a INT) PARTITION BY HASH(a);
ALTER TABLE t1 ADD PARTITION PARTITIONS 4;
CREATE TABLE t1 (s1 int, s2 int) PARTITION BY LIST (s1)  (
PARTITION p1 VALUES IN (0) (SUBPARTITION p1b), 
PARTITION p2 VALUES IN (2) (SUBPARTITION p1b)
);
ERROR HY000: Duplicate partition name p1b
+9 −0
Original line number Diff line number Diff line
@@ -216,3 +216,12 @@ DROP TABLE t1;
#
CREATE TABLE t1 (a INT) PARTITION BY HASH(a);
ALTER TABLE t1 ADD PARTITION PARTITIONS 4;

#
#BUG 15408: Partitions: subpartition names are not unique
#
--error ER_SAME_NAME_PARTITION
CREATE TABLE t1 (s1 int, s2 int) PARTITION BY LIST (s1)  (
PARTITION p1 VALUES IN (0) (SUBPARTITION p1b), 
PARTITION p2 VALUES IN (2) (SUBPARTITION p1b)
);
+3 −2
Original line number Diff line number Diff line
@@ -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_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 \
@@ -101,7 +102,7 @@ mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \
			sp_cache.cc parse_file.cc sql_trigger.cc \
                        event_executor.cc event.cc event_timed.cc \
			sql_plugin.cc sql_binlog.cc \
			handlerton.cc sql_tablespace.cc
			handlerton.cc sql_tablespace.cc partition_info.cpp
EXTRA_mysqld_SOURCES =	ha_innodb.cc ha_berkeley.cc ha_archive.cc \
			ha_innodb.h  ha_berkeley.h  ha_archive.h \
			ha_blackhole.cc ha_federated.cc ha_ndbcluster.cc \
+3 −3
Original line number Diff line number Diff line
@@ -2214,7 +2214,7 @@ int ha_ndbcluster::full_table_scan(byte *buf)
  if (m_use_partition_function)
  {
    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);
    DBUG_PRINT("info", ("part_spec.start_part = %u, part_spec.end_part = %u",
                        part_spec.start_part, part_spec.end_part));
@@ -5191,7 +5191,7 @@ void ha_ndbcluster::set_part_info(partition_info *part_info)
  m_part_info= part_info;
  if (!(m_part_info->part_type == HASH_PARTITION &&
        m_part_info->list_of_part_fields &&
        !is_sub_partitioned(m_part_info)))
        !m_part_info->is_sub_partitioned()))
    m_use_partition_function= TRUE;
}

@@ -9304,7 +9304,7 @@ uint ha_ndbcluster::set_up_partition_info(partition_info *part_info,
  {
    uint ng;
    part_elem= part_it++;
    if (!is_sub_partitioned(part_info))
    if (!part_info->is_sub_partitioned())
    {
      ng= part_elem->nodegroup_id;
      if (first && ng == UNDEF_NODEGROUP)
Loading