summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorRucha Deodhar <rucha.deodhar@mariadb.com>2021-08-13 15:49:16 +0530
committerRucha Deodhar <rucha.deodhar@mariadb.com>2022-04-20 00:30:22 +0530
commit5945e420f14729325058d08fc02306c07fcb2af4 (patch)
treeb73d71e8cc5205de5979ce620076f3cfa980b311 /sql/handler.cc
parentc132bce1a18480b3d545a056b8573b2f9b194af0 (diff)
downloadmariadb-git-5945e420f14729325058d08fc02306c07fcb2af4.tar.gz
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.
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index c5bd441eaf0..991c0d5aae5 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -5810,7 +5810,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_COMPAT_5_1_CHECKSUM) &&
+ f->is_real_null(0))
{
flush_checksum(&row_crc, &checksum_start, &checksum_length);
continue;