mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-16249 CHECKSUM TABLE for a spider table is not parallel and saves all data in memory in the spider head by default (#1328)
followup for be5c432a42
ha_partition::calculate_checksum() has to invoke calculate_checksum()
for partitions unconditionally, not under (HA_HAS_OLD_CHECKSUM | HA_HAS_NEW_CHECKSUM).
Because the server uses ::info() to ask for a live checksum, while
calculate_checksum() must, precisely, calculate it the slow way,
also for tables that don't have the live checksum at all.
Also, fix the compilation on Windows (ha_checksum/ulonglong type mix).
This commit is contained in:
@ -5054,7 +5054,7 @@ int handler::calculate_checksum()
|
||||
return HA_ERR_ABORTED_BY_USER;
|
||||
|
||||
ha_checksum row_crc= 0;
|
||||
error= table->file->ha_rnd_next(table->record[0]);
|
||||
error= ha_rnd_next(table->record[0]);
|
||||
if (error)
|
||||
break;
|
||||
|
||||
@ -5108,7 +5108,7 @@ int handler::calculate_checksum()
|
||||
|
||||
stats.checksum+= row_crc;
|
||||
}
|
||||
table->file->ha_rnd_end();
|
||||
ha_rnd_end();
|
||||
return error == HA_ERR_END_OF_FILE ? 0 : error;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user