Keine Cache-Version

Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code DEF204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.

Rechercher dans le manuel MySQL

26.12.13.2 Performance Schema variables_info Table

The variables_info table shows, for each system variable, the source from which it was most recently set, and its range of values.

variables_info has these columns:

  • VARIABLE_NAME

    The variable name.

  • VARIABLE_SOURCE

    The source from which the variable was most recently set:

    • COMMAND_LINE

      The variable was set on the command line.

    • COMPILED

      The variable has its compiled-in default value. COMPILED is the value used for variables not set any other way.

    • DYNAMIC

      The variable was set at runtime. This includes variables set within files specified using the init_file system variable.

    • EXPLICIT

      The variable was set from an option file named with the --defaults-file option.

    • EXTRA

      The variable was set from an option file named with the --defaults-extra-file option.

    • GLOBAL

      The variable was set from a global option file. This includes option files not covered by EXPLICIT, EXTRA, LOGIN, PERSISTED, SERVER, or USER.

    • LOGIN

      The variable was set from a user-specific login path file (~/.mylogin.cnf).

    • PERSISTED

      The variable was set from a server-specific mysqld-auto.cnf option file. No row has this value if the server was started with persisted_globals_load disabled.

    • SERVER

      The variable was set from a server-specific $MYSQL_HOME/my.cnf option file. For details about how MYSQL_HOME is set, see Section 4.2.2.2, “Using Option Files”.

    • USER

      The variable was set from a user-specific ~/.my.cnf option file.

  • VARIABLE_PATH

    If the variable was set from an option file, VARIABLE_PATH is the path name of that file. Otherwise, the value is the empty string.

  • MIN_VALUE, MAX_VALUE

    The minimum and maximum permitted values for the variable. Both are 0 for variables that have no such values (that is, variables that are not numeric).

  • SET_TIME

    The time at which the variable was most recently set. The default is the time at which the server initialized global system variables during startup.

  • SET_USER, SET_HOST

    The user name and host name of the client user that most recently set the variable. If a client connects as user17 from host host34.example.com using the account 'user17'@'%.example.com, SET_USER and SET_HOST will be user17 and host34.example.com, respectively. For proxy user connections, these values correspond to the external (proxy) user, not the proxied user against which privilege checking is performed. The default for each column is the empty string, indicating that the variable has not been set since server startup.

The variables_info table has these indexes:

  • None

TRUNCATE TABLE is not permitted for the variables_info table.

If a variable with a VARIABLE_SOURCE value other than DYNAMIC is set at runtime, VARIABLE_SOURCE becomes DYNAMIC and VARIABLE_PATH becomes the empty string.

A system variable that has only a session value (such as debug_sync) cannot be set at startup or persisted. For session-only system variables, VARIABLE_SOURCE can be only COMPILED or DYNAMIC.

If a system variable has an unexpected VARIABLE_SOURCE value, consider your server startup method. For example, mysqld_safe reads option files and passes certain options it finds there as part of the command line that it uses to start mysqld. Consequently, some system variables that you set in option files might display in variables_info as COMMAND_LINE, rather than as GLOBAL or SERVER as you might otherwise expect.

Some sample queries that use the variables_info table, with representive output:

  • Display variables set on the command line:

    1. mysql> SELECT VARIABLE_NAME
    2.        FROM performance_schema.variables_info
    3.        WHERE VARIABLE_SOURCE = 'COMMAND_LINE'
    4.        ORDER BY VARIABLE_NAME;
    5. +---------------+
    6. | VARIABLE_NAME |
    7. +---------------+
    8. | basedir       |
    9. | datadir       |
    10. | log_error     |
    11. | pid_file      |
    12. | plugin_dir    |
    13. | port          |
    14. +---------------+
  • Display variables set from persistent storage:

    1. mysql> SELECT VARIABLE_NAME
    2.        FROM performance_schema.variables_info
    3.        WHERE VARIABLE_SOURCE = 'PERSISTED'
    4.        ORDER BY VARIABLE_NAME;
    5. +--------------------------+
    6. | VARIABLE_NAME            |
    7. +--------------------------+
    8. | event_scheduler          |
    9. | max_connections          |
    10. | validate_password.policy |
    11. +--------------------------+
  • Join variables_info with the global_variables table to display the current values of persisted variables, together with their range of values:

    1. mysql> SELECT
    2.          VI.VARIABLE_NAME, GV.VARIABLE_VALUE,
    3.          VI.MIN_VALUE,VI.MAX_VALUE
    4.        FROM performance_schema.variables_info AS VI
    5.          INNER JOIN performance_schema.global_variables AS GV
    6.          USING(VARIABLE_NAME)
    7.        WHERE VI.VARIABLE_SOURCE = 'PERSISTED'
    8.        ORDER BY VARIABLE_NAME;
    9. +--------------------------+----------------+-----------+-----------+
    10. | VARIABLE_NAME            | VARIABLE_VALUE | MIN_VALUE | MAX_VALUE |
    11. +--------------------------+----------------+-----------+-----------+
    12. | event_scheduler          | ON             | 0         | 0         |
    13. | max_connections          | 200            | 1         | 100000    |
    14. | validate_password.policy | STRONG         | 0         | 0         |
    15. +--------------------------+----------------+-----------+-----------+

Suchen Sie im MySQL-Handbuch

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 26/06/2006, zuletzt geändert 26/10/2018
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/mysql-rf-variables-info-table.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:en Manuel MySQL : https://dev.mysql.com/

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut