unt' OR VARIABLE_NAME LIKE 'innodb_sync_spin_loops'; +---------------------------+---------------+--------------+ | VARIABLE_NAME | SESSION_VALUE | GLOBAL_VALUE | +---------------------------+---------------+--------------+ | MAX_ERROR_COUNT | 64 | 128 | | INNODB_SYNC_SPIN_LOOPS | NULL | 30 | +---------------------------+---------------+--------------+ SET GLOBAL max_error_count=128; SHOW VARIABLES LIKE 'max_error_count'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_error_count | 64 | +-----------------+-------+ SHOW GLOBAL VARIABLES LIKE 'max_error_count'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_error_count | 128 | +-----------------+-------+ Because the following variable only has a global scope, the global value is returned even when specifying SESSION (in this case by default): SHOW VARIABLES LIKE 'innodb_sync_spin_loops'; +------------------------+-------+ | Variable_name | Value | +------------------------+-------+ | innodb_sync_spin_loops | 30 | +------------------------+-------+ URL: https://mariadb.com/kb/en/show-variables/https://mariadb.com/kb/en/show-variables/