导图 1
variable
  Sys_var_flagset
    Sys_var_typelib
      sys_var
        sys_var *next;
        LEX_CSTRING name;
        int flags;
          ///< or'ed flag_enum values
        int m_parse_flag;
          ///< either PARSE_EARLY or PARSE_NORMAL.
        my_option option;
          ///< min, max, default values are stored here
        PolyLock *guard;
          ///< *second* lock that protects the variable
        ptrdiff_t offset;
          ///< offset to the value from global_system_variables
        on_check_function on_check;
        on_update_function on_update;
        const char *const deprecation_substitute;
        bool is_os_charset;
          ///< true if the value is in character_set_filesystem
        struct get_opt_arg_source source;
        char user[USERNAME_CHAR_LENGTH + 1];
          /* which user has set this variable */
        char host[HOSTNAME_LENGTH + 1];
          /* host on which this variable is set */
        ulonglong timestamp;
          /* represents when this variable was set */
        enum binlog_status_enum binlog_status
        const SHOW_TYPE show_val_type;
          ///< what value_ptr() returns for sql_show.cc
      TYPELIB typelib;
        size_t count{0};
        const char *name{nullptr};
        const char **type_names{nullptr};
        unsigned int *type_lengths{nullptr};
  basement
    sys_var_chain
      sys_var *first;
      sys_var *last;
    my_option
      const char *name;
      int id;
      const char *comment;
      void *value;
      void *u_max_value;
      TYPELIB *typelib;
      ulong var_type;
      enum get_opt_arg_type arg_type;
      longlong def_value;
      longlong min_value;
      ulonglong max_value;
      struct get_opt_arg_source *arg_source;
      long block_size;
      void *app_type;
    get_opt_arg_source
      char m_path_name[FN_REFLEN];
      enum enum_variable_source m_source;
  set_var
    set_var_base
      定义接口