1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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)

add checksum_null for setting null value of checksum
This commit is contained in:
Kentoku SHIBA
2019-06-11 00:25:08 +09:00
committed by GitHub
parent 5e9090ef16
commit be5c432a42
50 changed files with 1303 additions and 472 deletions

View File

@ -10936,7 +10936,7 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
(((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)))
{
if (t->file->info(HA_STATUS_VARIABLE))
if (t->file->info(HA_STATUS_VARIABLE) || t->file->stats.checksum_null)
protocol->store_null();
else
protocol->store((longlong)t->file->stats.checksum);
@ -10956,7 +10956,7 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
thd->protocol->remove_last_row();
goto err;
}
if (error)
if (error || t->file->stats.checksum_null)
protocol->store_null();
else
protocol->store((longlong)t->file->stats.checksum);