mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Whitespace fix for mysql_checksum_table function
This commit is contained in:
committed by
Sergei Golubchik
parent
1ba90cea25
commit
84b0ac6721
@ -9744,23 +9744,23 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
|
||||
if (!(check_opt->flags & T_EXTEND) &&
|
||||
(((t->file->ha_table_flags() & HA_HAS_OLD_CHECKSUM) && thd->variables.old_mode) ||
|
||||
((t->file->ha_table_flags() & HA_HAS_NEW_CHECKSUM) && !thd->variables.old_mode)))
|
||||
protocol->store((ulonglong)t->file->checksum());
|
||||
protocol->store((ulonglong)t->file->checksum());
|
||||
else if (check_opt->flags & T_QUICK)
|
||||
protocol->store_null();
|
||||
protocol->store_null();
|
||||
else
|
||||
{
|
||||
/* calculating table's checksum */
|
||||
ha_checksum crc= 0;
|
||||
/* calculating table's checksum */
|
||||
ha_checksum crc= 0;
|
||||
uchar null_mask=256 - (1 << t->s->last_null_bit_pos);
|
||||
|
||||
t->use_all_columns();
|
||||
|
||||
if (t->file->ha_rnd_init(1))
|
||||
protocol->store_null();
|
||||
else
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
if (t->file->ha_rnd_init(1))
|
||||
protocol->store_null();
|
||||
else
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
if (thd->killed)
|
||||
{
|
||||
/*
|
||||
@ -9771,7 +9771,7 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
|
||||
thd->protocol->remove_last_row();
|
||||
goto err;
|
||||
}
|
||||
ha_checksum row_crc= 0;
|
||||
ha_checksum row_crc= 0;
|
||||
int error= t->file->ha_rnd_next(t->record[0]);
|
||||
if (unlikely(error))
|
||||
{
|
||||
@ -9779,21 +9779,21 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
if (t->s->null_bytes)
|
||||
if (t->s->null_bytes)
|
||||
{
|
||||
/* fix undefined null bits */
|
||||
t->record[0][t->s->null_bytes-1] |= null_mask;
|
||||
if (!(t->s->db_create_options & HA_OPTION_PACK_RECORD))
|
||||
t->record[0][0] |= 1;
|
||||
|
||||
row_crc= my_checksum(row_crc, t->record[0], t->s->null_bytes);
|
||||
row_crc= my_checksum(row_crc, t->record[0], t->s->null_bytes);
|
||||
}
|
||||
|
||||
uchar *checksum_start= NULL;
|
||||
size_t checksum_length= 0;
|
||||
for (uint i= 0; i < t->s->fields; i++ )
|
||||
{
|
||||
Field *f= t->field[i];
|
||||
uchar *checksum_start= NULL;
|
||||
size_t checksum_length= 0;
|
||||
for (uint i= 0; i < t->s->fields; i++ )
|
||||
{
|
||||
Field *f= t->field[i];
|
||||
|
||||
if (! thd->variables.old_mode && f->is_real_null(0))
|
||||
continue;
|
||||
@ -9840,16 +9840,16 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
|
||||
checksum_length= f->pack_length();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (checksum_start)
|
||||
row_crc= my_checksum(row_crc, checksum_start, checksum_length);
|
||||
}
|
||||
}
|
||||
if (checksum_start)
|
||||
row_crc= my_checksum(row_crc, checksum_start, checksum_length);
|
||||
|
||||
crc+= row_crc;
|
||||
}
|
||||
protocol->store((ulonglong)crc);
|
||||
crc+= row_crc;
|
||||
}
|
||||
protocol->store((ulonglong)crc);
|
||||
t->file->ha_rnd_end();
|
||||
}
|
||||
}
|
||||
}
|
||||
trans_rollback_stmt(thd);
|
||||
close_thread_tables(thd);
|
||||
|
Reference in New Issue
Block a user