MySQL Variables debug_sync 数据库 参数变量解释及正确配置使用

本站中文解释

debug_sync参数变量用于调试事务中特定步骤的原子性操作。它确保在特定步骤期间,MySQL能够暂停并将管理员对MySQL的调试的输出发送到error log中。可以通过以下方式设置:

SET GLOBAL debug_sync = ‘ON’;

您可以使用以下命令检查该参数变量设置状态:

SHOW GLOBAL VARIABLES LIKE ‘debug_sync’;

官方英文解释

debug_sync

System Variable debug_sync
Scope Session
Dynamic Yes
Type String

This variable is the user interface to the Debug Sync
facility. Use of Debug Sync requires that MySQL be configured
with the -DENABLE_DEBUG_SYNC=1
CMake option (see
Section 2.8.7, “MySQL Source-Configuration Options”). If Debug Sync
is not compiled in, this system variable is not available.

The global variable value is read only and indicates whether
the facility is enabled. By default, Debug Sync is disabled
and the value of debug_sync
is OFF. If the server is started with
--debug-sync-timeout=N,
where N is a timeout value greater
than 0, Debug Sync is enabled and the value of
debug_sync is ON -
current signal
followed by the signal name. Also,
N becomes the default timeout for
individual synchronization points.

The session value can be read by any user and has the same
value as the global variable. The session value can be set to
control synchronization points.

Setting the session value of this system variable is a
restricted operation. The session user must have privileges
sufficient to set restricted session variables. See
Section 5.1.8.1, “System Variable Privileges”.

For a description of the Debug Sync facility and how to use
synchronization points, see
MySQL
Internals: Test Synchronization.


数据运维技术 » MySQL Variables debug_sync 数据库 参数变量解释及正确配置使用