Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

System Variables

Kevin Crane edited this page · 20 revisions

The Twitter MySQL server maintains system variables that indicate how it is configured. System variables can be set at server startup using options on the command line or in an option file.

Name Cmd-Line Option file System Var Var Scope Dynamic
max_statement_time No No Yes Session Yes
minidump_dir Yes Yes Yes Global No
protocol_mode Yes Yes Yes Both Yes
super_only Yes Yes Yes Global Yes
superuser_connections Yes Yes Yes Global Yes
twitter_audit_logging Yes Yes Yes Global Yes
twitter_query_stats Yes Yes Yes Global Yes
innodb_deadlock_check Yes Yes Yes Global Yes
twitter_query_throttling_limit Yes Yes Yes Global Yes
twitter_write_throttling_limit Yes Yes Yes Global Yes

--max_statement_time=value

The number of milliseconds to wait for a statement to execute, after which it is interrupted. This timeout applies only to top-level statements.

Variable Name max_statement_time
Variable Scope Session
Dynamic Variable Yes
Type Numeric
Default 0
Valid Values [0, (2^64)-1]

--minidump_dir=value

The name of the directory where minidumps are created. The default value is initialized tmpdir.

Variable Name minidump_dir
Variable Scope Global
Dynamic Variable No
Type String
Default @@tmpdir

--protocol-mode=value[,value[,value...]]

The current server protocol mode, which can be set dynamically.

Command-Line Format --protocol-mode=name
Option-File Format protocol-mode
Option Sets Variable Yes, protocol_mode
Variable Name protocol_mode
Variable Scope Global, Session
Dynamic Variable Yes
Type Set
Default ""
Valid Values
  • MINIMAL_OBJECT_NAMES_IN_RESULT_SET_METADATA

    Minimal metadata includes only the column name in the Result Set Metadata.

--super-only

Whether the server permits non-superusers to execute statements.

Command-Line Format --super-only
Option-File Format super_only
Option Sets Variable Yes, super_only
Variable Name super_only
Variable Scope Global
Dynamic Variable Yes
Type Numeric
Default 0
Valid Values
  • 0 Any user can execute statements.
  • 1 Only superusers can execute statements.

--superuser_connections

Configurable number of reserved connections for superusers.

Command-Line Format --superuser_connections
Option-File Format superuser_connections
Option Sets Variable Yes, superuser_connections
Variable Name superuser_connections
Variable Scope Global
Dynamic Variable Yes
Type Numeric
Default 1
Valid Values
  • 1 The minimal number of reserved connections.
  • 10 The maximum number of reserved connections.

--twitter_audit_logging

Twitter DBA audit logging.

Command-Line Format --twitter_audit_logging
Option-File Format twitter_audit_logging
Option Sets Variable Yes, twitter_audit_logging
Variable Name twitter_audit_logging
Variable Scope Global
Dynamic Variable Yes
Type Numeric
Default 0
Valid Values
  • 0 Do not log users operations in Twitter DBA audit log.
  • 1 Log non-exempt users operations in error log.
  • 2 Log non-exempt users operations incl. SELECT and SHOW commands in error log.

--twitter_query_stats

Twitter Query Type Statistics.

Command-Line Format --twitter_query_stats
Option-File Format twitter_query_stats
Option Sets Variable Yes, twitter_query_stats
Variable Name twitter_query_stats
Variable Scope Global
Dynamic Variable Yes
Type Numeric
Default 0
Valid Values
  • 0 Do not track any query type stats.
  • 1 Track execution stats per query type.
  • 2 Track execution stats per query type and client ID.

--innodb_deadlock_check=value

When set to OFF, disables deadlock detection to improve performance in heavily concurrent workloads.

Variable Name innodb_deadlock_check
Variable Scope Global
Dynamic Variable Yes
Type Boolean
Default 1
Valid Values
  • 0 Don't check for deadlocks
  • 1 Check for deadlocks
  • --twitter_query_throttling_limit=value

    The maximum of query threads to allow simultaneously. Any attempt to create more will return the error ER_QUERY_THROTTLED.

    Variable Name twitter_query_throttling_limit
    Variable Scope Global
    Dynamic Variable Yes
    Type Numeric
    Default 0
    Valid Values [0, 10000]

    --twitter_write_throttling_limit=value

    The maximum of write threads to allow simultaneously. Any attempt to create more will return the error ER_QUERY_THROTTLED.

    Variable Name twitter_write_throttling_limit
    Variable Scope Global
    Dynamic Variable Yes
    Type Numeric
    Default 0
    Valid Values [0, 5000]
    Something went wrong with that request. Please try again.