summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index a9ad8b7720d..331dea5acd5 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -11487,8 +11487,10 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
{
/* Call ->checksum() if the table checksum matches 'old_mode' settings */
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)))
+ (((t->file->ha_table_flags() & HA_HAS_OLD_CHECKSUM) &&
+ (thd->variables.old_behavior & OLD_MODE_CHECKSUM_SLOW_NULLS)) ||
+ ((t->file->ha_table_flags() & HA_HAS_NEW_CHECKSUM) &&
+ !(thd->variables.old_behavior & OLD_MODE_CHECKSUM_SLOW_NULLS))))
{
if (t->file->info(HA_STATUS_VARIABLE) || t->file->stats.checksum_null)
protocol->store_null();