Skip to content
  • Maria Couceiro's avatar
    71e7d828
    Bug#21354712 SHOW VARIABLES RETURN WARNING ABOUT @@SESSION.GTID_EXECUTED BEING DEPRECATED · 71e7d828
    Maria Couceiro authored
    Problem:
    The warning 1681 "'@@SESSION.GTID_EXECUTED' is deprecated
    and will be removed in a future release." was printed even
    when the session variable gtid_executed was not included in
    the result of the query.
    In addition, the query "SELECT @@SESSION.GTID_EXECUTED"
    result included a duplicate warning.
    Both issues occurred because the warning was printed when
    the value of the variable was accessed, which will happen
    whether the variable is included in the result of the query
    or not.
    
    Fix:
    To be consistent with the current behaviour of the deprecated
    variable @@GLOBAL.SQL_LOG_BIN, the following changes were
    implemented concerning @@SESSION.GTID_EXECUTED:
    - the variable is no longer included in the P_S table, therefore
    it is not included in the result of:
      a) SELECT * FROM performance_schema.session_variables
      b) SHOW VARIABLES (when SHOW_COMPATIBILITY_56= OFF)
      c) SHOW SESSION VARIABLES (when SHOW_COMPATIBILITY_56= OFF)
    - The variable is still a part of the I_S table, but the warning
    is not issued in the following statements:
      a) SELECT * FROM information_schema.session_variables
    (when SHOW_COMPATIBILITY_56= ON)
      b) SHOW VARIABLES (when SHOW_COMPATIBILITY_56= ON)
      c) SHOW SESSION VARIABLES (when SHOW_COMPATIBILITY_56= ON)
    - the above is true even in statements like
    SHOW VARIABLES LIKE 'REGEX', even when 'REGEX' matches
    'gtid_executed'.
    The warning is still issued when the value of the variable is
    directly accessed.
    71e7d828
    Bug#21354712 SHOW VARIABLES RETURN WARNING ABOUT @@SESSION.GTID_EXECUTED BEING DEPRECATED
    Maria Couceiro authored
    Problem:
    The warning 1681 "'@@SESSION.GTID_EXECUTED' is deprecated
    and will be removed in a future release." was printed even
    when the session variable gtid_executed was not included in
    the result of the query.
    In addition, the query "SELECT @@SESSION.GTID_EXECUTED"
    result included a duplicate warning.
    Both issues occurred because the warning was printed when
    the value of the variable was accessed, which will happen
    whether the variable is included in the result of the query
    or not.
    
    Fix:
    To be consistent with the current behaviour of the deprecated
    variable @@GLOBAL.SQL_LOG_BIN, the following changes were
    implemented concerning @@SESSION.GTID_EXECUTED:
    - the variable is no longer included in the P_S table, therefore
    it is not included in the result of:
      a) SELECT * FROM performance_schema.session_variables
      b) SHOW VARIABLES (when SHOW_COMPATIBILITY_56= OFF)
      c) SHOW SESSION VARIABLES (when SHOW_COMPATIBILITY_56= OFF)
    - The variable is still a part of the I_S table, but the warning
    is not issued in the following statements:
      a) SELECT * FROM information_schema.session_variables
    (when SHOW_COMPATIBILITY_56= ON)
      b) SHOW VARIABLES (when SHOW_COMPATIBILITY_56= ON)
      c) SHOW SESSION VARIABLES (when SHOW_COMPATIBILITY_56= ON)
    - the above is true even in statements like
    SHOW VARIABLES LIKE 'REGEX', even when 'REGEX' matches
    'gtid_executed'.
    The warning is still issued when the value of the variable is
    directly accessed.
Loading