From cea4f7439532e1892561a07f7f4e6228eebc0672 Mon Sep 17 00:00:00 2001 From: Rucha Deodhar Date: Fri, 13 Aug 2021 15:49:16 +0530 Subject: MDEV-24920: Merge "old" SQL variable to "old_mode" sql variable Analysis: There are 2 server variables- "old_mode" and "old". "old" is no longer needed as "old_mode" has replaced it (however still used in some places in the code). "old_mode" and "old" has same purpose- emulate behavior from previous MariaDB versions. So they can be merged to avoid confusion. Fix: Deprecate "old" variable and create another mode for @@old_mode to mimic behavior of previous "old" variable. Create specific modes for specifix task that --old sql variable was doing earlier and use the new modes instead. --- sql/handler.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/handler.cc') diff --git a/sql/handler.cc b/sql/handler.cc index 9c4c6287950..aea8f38d71a 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -5783,7 +5783,8 @@ int handler::calculate_checksum() { Field *f= table->field[i]; - if (! thd->variables.old_mode && f->is_real_null(0)) + if (! (thd->variables.old_behavior & OLD_MODE_CHECKSUM_SLOW_NULLS) && + f->is_real_null(0)) { flush_checksum(&row_crc, &checksum_start, &checksum_length); continue; -- cgit v1.2.1