Commit 5b409843 authored by Monty's avatar Monty

Fixed indentation in ha_partition.cc when assigning variables

parent da26d16d
...@@ -1892,7 +1892,7 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info, ...@@ -1892,7 +1892,7 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
in the partitions. in the partitions.
*/ */
uint disable_non_uniq_indexes = indexes_are_disabled(); uint disable_non_uniq_indexes= indexes_are_disabled();
i= 0; i= 0;
part_count= 0; part_count= 0;
...@@ -2131,8 +2131,8 @@ void ha_partition::update_create_info(HA_CREATE_INFO *create_info) ...@@ -2131,8 +2131,8 @@ void ha_partition::update_create_info(HA_CREATE_INFO *create_info)
DATA DIRECTORY and INDEX DIRECTORY are never applied to the whole DATA DIRECTORY and INDEX DIRECTORY are never applied to the whole
partitioned table, only its parts. partitioned table, only its parts.
*/ */
my_bool from_alter = (create_info->data_file_name == (const char*) -1); my_bool from_alter= (create_info->data_file_name == (const char*) -1);
create_info->data_file_name= create_info->index_file_name = NULL; create_info->data_file_name= create_info->index_file_name= NULL;
if (!(m_file[0]->ht->flags & HTON_CAN_READ_CONNECT_STRING_IN_PARTITION)) if (!(m_file[0]->ht->flags & HTON_CAN_READ_CONNECT_STRING_IN_PARTITION))
create_info->connect_string= null_clex_str; create_info->connect_string= null_clex_str;
...@@ -2153,8 +2153,8 @@ void ha_partition::update_create_info(HA_CREATE_INFO *create_info) ...@@ -2153,8 +2153,8 @@ void ha_partition::update_create_info(HA_CREATE_INFO *create_info)
List_iterator<partition_element> part_it(m_part_info->partitions); List_iterator<partition_element> part_it(m_part_info->partitions);
partition_element *part_elem, *sub_elem; partition_element *part_elem, *sub_elem;
uint num_subparts= m_part_info->num_subparts; uint num_subparts= m_part_info->num_subparts;
uint num_parts = num_subparts ? m_file_tot_parts / num_subparts uint num_parts= (num_subparts ? m_file_tot_parts / num_subparts :
: m_file_tot_parts; m_file_tot_parts);
HA_CREATE_INFO dummy_info; HA_CREATE_INFO dummy_info;
memset(&dummy_info, 0, sizeof(dummy_info)); memset(&dummy_info, 0, sizeof(dummy_info));
...@@ -2205,16 +2205,16 @@ void ha_partition::update_create_info(HA_CREATE_INFO *create_info) ...@@ -2205,16 +2205,16 @@ void ha_partition::update_create_info(HA_CREATE_INFO *create_info)
DBUG_ASSERT(part < m_file_tot_parts && m_file[part]); DBUG_ASSERT(part < m_file_tot_parts && m_file[part]);
if (ha_legacy_type(m_file[part]->ht) == DB_TYPE_INNODB) if (ha_legacy_type(m_file[part]->ht) == DB_TYPE_INNODB)
{ {
dummy_info.data_file_name= dummy_info.index_file_name = NULL; dummy_info.data_file_name= dummy_info.index_file_name= NULL;
m_file[part]->update_create_info(&dummy_info); m_file[part]->update_create_info(&dummy_info);
if (dummy_info.data_file_name || sub_elem->data_file_name) if (dummy_info.data_file_name || sub_elem->data_file_name)
{ {
sub_elem->data_file_name = (char*) dummy_info.data_file_name; sub_elem->data_file_name= (char*) dummy_info.data_file_name;
} }
if (dummy_info.index_file_name || sub_elem->index_file_name) if (dummy_info.index_file_name || sub_elem->index_file_name)
{ {
sub_elem->index_file_name = (char*) dummy_info.index_file_name; sub_elem->index_file_name= (char*) dummy_info.index_file_name;
} }
} }
} }
...@@ -2228,11 +2228,11 @@ void ha_partition::update_create_info(HA_CREATE_INFO *create_info) ...@@ -2228,11 +2228,11 @@ void ha_partition::update_create_info(HA_CREATE_INFO *create_info)
m_file[i]->update_create_info(&dummy_info); m_file[i]->update_create_info(&dummy_info);
if (dummy_info.data_file_name || part_elem->data_file_name) if (dummy_info.data_file_name || part_elem->data_file_name)
{ {
part_elem->data_file_name = (char*) dummy_info.data_file_name; part_elem->data_file_name= (char*) dummy_info.data_file_name;
} }
if (dummy_info.index_file_name || part_elem->index_file_name) if (dummy_info.index_file_name || part_elem->index_file_name)
{ {
part_elem->index_file_name = (char*) dummy_info.index_file_name; part_elem->index_file_name= (char*) dummy_info.index_file_name;
} }
} }
} }
...@@ -2795,7 +2795,7 @@ bool ha_partition::create_handler_file(const char *name) ...@@ -2795,7 +2795,7 @@ bool ha_partition::create_handler_file(const char *name)
{ {
uchar buffer[4]; uchar buffer[4];
part_elem= part_it++; part_elem= part_it++;
uint length = part_elem->connect_string.length; uint length= part_elem->connect_string.length;
int4store(buffer, length); int4store(buffer, length);
if (my_write(file, buffer, 4, MYF(MY_WME | MY_NABP)) || if (my_write(file, buffer, 4, MYF(MY_WME | MY_NABP)) ||
my_write(file, (uchar *) part_elem->connect_string.str, length, my_write(file, (uchar *) part_elem->connect_string.str, length,
...@@ -3597,7 +3597,7 @@ int ha_partition::open(const char *name, int mode, uint test_if_locked) ...@@ -3597,7 +3597,7 @@ int ha_partition::open(const char *name, int mode, uint test_if_locked)
{ {
error= HA_ERR_INITIALIZATION; error= HA_ERR_INITIALIZATION;
/* set file to last handler, so all of them are closed */ /* set file to last handler, so all of them are closed */
file = &m_file[m_tot_parts - 1]; file= &m_file[m_tot_parts - 1];
goto err_handler; goto err_handler;
} }
} }
...@@ -5975,7 +5975,7 @@ int ha_partition::multi_range_key_create_key(RANGE_SEQ_IF *seq, ...@@ -5975,7 +5975,7 @@ int ha_partition::multi_range_key_create_key(RANGE_SEQ_IF *seq,
else else
m_mrr_range_current= m_mrr_range_first; m_mrr_range_current= m_mrr_range_first;
for (i = 0; i < m_tot_parts; i++) for (i= 0; i < m_tot_parts; i++)
{ {
if (!m_part_mrr_range_first[i]) if (!m_part_mrr_range_first[i])
{ {
...@@ -6491,7 +6491,7 @@ int ha_partition::partition_scan_set_up(uchar * buf, bool idx_read_flag) ...@@ -6491,7 +6491,7 @@ int ha_partition::partition_scan_set_up(uchar * buf, bool idx_read_flag)
DBUG_ENTER("ha_partition::partition_scan_set_up"); DBUG_ENTER("ha_partition::partition_scan_set_up");
if (idx_read_flag) if (idx_read_flag)
get_partition_set(table,buf,active_index,&m_start_key,&m_part_spec); get_partition_set(table, buf, active_index, &m_start_key, &m_part_spec);
else else
{ {
m_part_spec.start_part= 0; m_part_spec.start_part= 0;
...@@ -8306,12 +8306,12 @@ int ha_partition::extra(enum ha_extra_function operation) ...@@ -8306,12 +8306,12 @@ int ha_partition::extra(enum ha_extra_function operation)
int result; int result;
uint num_locks= 0; uint num_locks= 0;
handler **file; handler **file;
if ((result = loop_extra(operation))) if ((result= loop_extra(operation)))
DBUG_RETURN(result); DBUG_RETURN(result);
/* Recalculate lock count as each child may have different set of locks */ /* Recalculate lock count as each child may have different set of locks */
num_locks = 0; num_locks= 0;
file = m_file; file= m_file;
do do
{ {
num_locks+= (*file)->lock_count(); num_locks+= (*file)->lock_count();
...@@ -9590,7 +9590,7 @@ int ha_partition::cmp_ref(const uchar *ref1, const uchar *ref2) ...@@ -9590,7 +9590,7 @@ int ha_partition::cmp_ref(const uchar *ref1, const uchar *ref2)
my_ptrdiff_t diff1, diff2; my_ptrdiff_t diff1, diff2;
DBUG_ENTER("ha_partition::cmp_ref"); DBUG_ENTER("ha_partition::cmp_ref");
cmp = m_file[0]->cmp_ref((ref1 + PARTITION_BYTES_IN_POS), cmp= m_file[0]->cmp_ref((ref1 + PARTITION_BYTES_IN_POS),
(ref2 + PARTITION_BYTES_IN_POS)); (ref2 + PARTITION_BYTES_IN_POS));
if (cmp) if (cmp)
DBUG_RETURN(cmp); DBUG_RETURN(cmp);
...@@ -10204,7 +10204,7 @@ TABLE_LIST *ha_partition::get_next_global_for_child() ...@@ -10204,7 +10204,7 @@ TABLE_LIST *ha_partition::get_next_global_for_child()
const COND *ha_partition::cond_push(const COND *cond) const COND *ha_partition::cond_push(const COND *cond)
{ {
handler **file= m_file; handler **file= m_file;
COND *res_cond = NULL; COND *res_cond= NULL;
DBUG_ENTER("ha_partition::cond_push"); DBUG_ENTER("ha_partition::cond_push");
if (set_top_table_fields) if (set_top_table_fields)
...@@ -10228,9 +10228,9 @@ const COND *ha_partition::cond_push(const COND *cond) ...@@ -10228,9 +10228,9 @@ const COND *ha_partition::cond_push(const COND *cond)
if ((*file)->pushed_cond != cond) if ((*file)->pushed_cond != cond)
{ {
if ((*file)->cond_push(cond)) if ((*file)->cond_push(cond))
res_cond = (COND *) cond; res_cond= (COND *) cond;
else else
(*file)->pushed_cond = cond; (*file)->pushed_cond= cond;
} }
} while (*(++file)); } while (*(++file));
DBUG_RETURN(res_cond); DBUG_RETURN(res_cond);
......
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