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/sql_show.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sql/sql_show.cc') diff --git a/sql/sql_show.cc b/sql/sql_show.cc index d01f84fe7d1..a4e7c69d089 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -2918,8 +2918,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) Item_empty_string(thd, "Info", arg.max_query_length), mem_root); field->set_maybe_null();; - if (!thd->variables.old_mode && - !(thd->variables.old_behavior & OLD_MODE_NO_PROGRESS_INFO)) + if (!(thd->variables.old_behavior & OLD_MODE_NO_PROGRESS_INFO)) { field_list.push_back(field= new (mem_root) Item_float(thd, "Progress", 0.0, 3, 7), @@ -2961,8 +2960,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) thd_info->query_string.charset()); else protocol->store_null(); - if (!thd->variables.old_mode && - !(thd->variables.old_behavior & OLD_MODE_NO_PROGRESS_INFO)) + if (!(thd->variables.old_behavior & OLD_MODE_NO_PROGRESS_INFO)) protocol->store_double(thd_info->progress, 3); if (protocol->write()) break; /* purecov: inspected */ -- cgit v1.2.1