mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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.
This commit is contained in:
@ -11901,8 +11901,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_COMPAT_5_1_CHECKSUM)) ||
|
||||
((t->file->ha_table_flags() & HA_HAS_NEW_CHECKSUM) &&
|
||||
!(thd->variables.old_behavior & OLD_MODE_COMPAT_5_1_CHECKSUM))))
|
||||
{
|
||||
if (t->file->info(HA_STATUS_VARIABLE) || t->file->stats.checksum_null)
|
||||
protocol->store_null();
|
||||
|
Reference in New Issue
Block a user