bool compare_partition_options(HA_CREATE_INFO *table_create_info,
                               partition_element *part_elem)
{
#define MAX_COMPARE_PARTITION_OPTION_ERRORS 5
  const char *option_diffs[MAX_COMPARE_PARTITION_OPTION_ERRORS + 1];
  int i, errors= 0;
  DBUG_ENTER("compare_partition_options");

  /*
    Note that there are not yet any engine supporting tablespace together
    with partitioning. TODO: when there are, add compare.
  */
  if (part_elem->tablespace_name || table_create_info->tablespace)
    option_diffs[errors++]= "TABLESPACE";
  if (part_elem->part_max_rows != table_create_info->max_rows)
    option_diffs[errors++]= "MAX_ROWS";
  if (part_elem->part_min_rows != table_create_info->min_rows)
    option_diffs[errors++]= "MIN_ROWS";

  for (i= 0; i < errors; i++)
    my_error(ER_PARTITION_EXCHANGE_DIFFERENT_OPTION, MYF(0),
             option_diffs[i]);
  DBUG_RETURN(errors != 0);
}
bool compare_partition_options(HA_CREATE_INFO *table_create_info,
                               partition_element *part_elem)
{
#define MAX_COMPARE_PARTITION_OPTION_ERRORS 5
  const char *option_diffs[MAX_COMPARE_PARTITION_OPTION_ERRORS + 1];
  int i, errors= 0;
  DBUG_ENTER("compare_partition_options");

   
  if (part_elem->tablespace_name || table_create_info->tablespace)
    option_diffs[errors++]= "TABLESPACE";
  if (part_elem->part_max_rows != table_create_info->max_rows)
    option_diffs[errors++]= "MAX_ROWS";
  if (part_elem->part_min_rows != table_create_info->min_rows)
    option_diffs[errors++]= "MIN_ROWS";

  for (i= 0; i < errors; i++)
    my_error(ER_PARTITION_EXCHANGE_DIFFERENT_OPTION, MYF(0),
             option_diffs[i]);
  DBUG_RETURN(errors != 0);
}