← Back to team overview

maria-developers team mailing list archive

Re: 2849076672d: MDEV-16470: switch off user variables (and fixes of its support)

 

Hi, Oleksandr!

On Jun 12, Oleksandr Byelkin wrote:
> revision-id: 2849076672d (mariadb-10.5.2-322-g2849076672d)
> parent(s): bb47050e1fd
> author: Oleksandr Byelkin <sanja@xxxxxxxxxxx>
> committer: Oleksandr Byelkin <sanja@xxxxxxxxxxx>
> timestamp: 2020-06-12 08:32:56 +0200
> message:
> 
> MDEV-16470: switch off user variables (and fixes of its support)
> 
> diff --git a/client/mysqltest.cc b/client/mysqltest.cc
> index 55c4a66a89d..24e0cd25108 100644
> --- a/client/mysqltest.cc
> +++ b/client/mysqltest.cc
>                                         &data, &data_length))
>      {
>        dynstr_append(ds, "-- ");
> -      switch (type)
> +      if (type <= SESSION_TRACK_END)
>        {
> -        case SESSION_TRACK_SYSTEM_VARIABLES:
> -          dynstr_append(ds, "Tracker : SESSION_TRACK_SYSTEM_VARIABLES\n");
> -          break;
> -        case SESSION_TRACK_SCHEMA:
> -          dynstr_append(ds, "Tracker : SESSION_TRACK_SCHEMA\n");
> -          break;
> -        case SESSION_TRACK_STATE_CHANGE:
> -          dynstr_append(ds, "Tracker : SESSION_TRACK_STATE_CHANGE\n");
> -          break;
> -        case SESSION_TRACK_GTIDS:
> -          dynstr_append(ds, "Tracker : SESSION_TRACK_GTIDS\n");
> -          break;
> -        case SESSION_TRACK_TRANSACTION_CHARACTERISTICS:
> -          dynstr_append(ds, "Tracker : SESSION_TRACK_TRANSACTION_CHARACTERISTICS\n");
> -          break;
> -        case SESSION_TRACK_TRANSACTION_TYPE:
> -          dynstr_append(ds, "Tracker : SESSION_TRACK_TRANSACTION_TYPE\n");
> -          break;
> -        default:
> -          DBUG_ASSERT(0);
> -          dynstr_append(ds, "\n");
> +        dynstr_append(ds, trking_info_desc[type]);
> +      }
> +      else
> +      {
> +        DBUG_ASSERT(0);
> +        dynstr_append(ds, "Trecker???\n");

"Tracker"

>        }
> -
>  
>        dynstr_append(ds, "-- ");
>        dynstr_append_mem(ds, data, data_length);
> diff --git a/libmariadb b/libmariadb
> index ce74fd0c400..db7adf63fbf 160000
> --- a/libmariadb
> +++ b/libmariadb
> @@ -1 +1 @@
> -Subproject commit ce74fd0c4009ed9f4bcbdb4a01e96c823e961dc3
> +Subproject commit db7adf63fbf242a07c355f192a4d8c60323b5d89

No, I don't see any need for that now.
C/C does not know anything about SESSION_TRACK_USER_VARIABLES, let's
just keep it that way.

> diff --git a/sql/item_func.cc b/sql/item_func.cc
> index da185f9878b..448bfd380a2 100644
> --- a/sql/item_func.cc
> +++ b/sql/item_func.cc
> @@ -4702,10 +4702,12 @@ update_hash(user_var_entry *entry, bool set_null, void *ptr, size_t length,
>      entry->unsigned_flag= unsigned_arg;
>    }
>    entry->type=type;
> +#ifdef USER_VAR_TACKING

TRACKING

>  #ifndef EMBEDDED_LIBRARY
>    THD *thd= current_thd;
>    thd->session_tracker.user_variables.mark_as_changed(thd, entry);
>  #endif
> +#endif // USER_VAR_TACKING
>    return 0;
>  }
>  
Regards,
Sergei
VP of MariaDB Server Engineering
and security@xxxxxxxxxxx