diff options
author | Rucha Deodhar <rucha.deodhar@mariadb.com> | 2021-08-13 15:49:16 +0530 |
---|---|---|
committer | Rucha Deodhar <rucha.deodhar@mariadb.com> | 2022-01-11 15:02:55 +0530 |
commit | 370102be5ea89c06a64d96b9cfd5d0cac277e710 (patch) | |
tree | 23189ecffd00bb58df2237d18f8cc2b01b951fe8 /sql/sql_table.cc | |
parent | ce663ad4e4bf71d85cb4cd5b04b0b915881c80f2 (diff) | |
download | mariadb-git-bb-10.7-MDEV-24920.tar.gz |
MDEV-24920: Merge "old" SQL variable to "old_mode" sql variablebb-10.7-MDEV-24920
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/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 6 |
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(); |