Server System Variables

MatrixOne server system variables are variables used to control or configure the behavior of the database engine or other components in the MatrixOne server. The values of these variables can be set and changed using the SET statement.

System variables can be divided into two categories: Global variables and Session variables.

  • Global variables: Global variables apply to all connected sessions of the MatrixOne server. Their values are set when the MatrixOne server starts and remain unchanged until the server is shut down. Global variables are typically used to control the behavior of the MatrixOne server, such as specifying default backup and restore locations, the default language environment, and so on.

  • Session variables: Session variables apply only to the currently connected user’s session of the MatrixOne server. Their values can be changed anytime during the user’s connection and are automatically cleared when the user disconnects. Session variables are typically used to control session behavior, such as how to print the information displayed and specify transaction isolation levels.

How to query system variables?

You can use the following SQL to query:

  1. SHOW VARIABLES;

This will list all system variables and their current values. If you only want to see system variables related to a specific topic, you can use the following syntax:

  1. SHOW VARIABLES LIKE '%theme%';

This will list all system variables with names containing the word theme and their current values.

Note: The LIKE operator is used for fuzzy matching query strings, with % representing zero or more arbitrary characters. Therefore, the above command will match any system variables with names containing the word theme.

How to query global variables?

You can use the following SQL to query:

  1. SHOW GLOBAL VARIABLES;

This will list all global variables and their current values. If you only want to see global variables related to a specific topic, you can use the following syntax:

  1. SHOW GLOBAL VARIABLES LIKE '%theme%';

This will list all global variables with names containing the word theme and their current values.

Note: The LIKE operator is used for fuzzy matching query strings, with % representing zero or more arbitrary characters. Therefore, the above command will match any global variables with names containing the word theme.

How to query session variables?

You can use the following SQL to query:

  1. SHOW SESSION VARIABLES;

This will list all session variables and their current values. If you only want to see session variables related to a specific topic, you can use the following syntax:

  1. SHOW SESSION VARIABLES LIKE '%theme%';

This will list all session variables with names containing the word theme and their current values.

Note: The LIKE operator is used for fuzzy matching query strings, with % representing zero or more arbitrary characters. Therefore, the above command will match any session variables with names containing the word theme.

System Veariable Reference

Variable_nameCmd-Line(Y/N)Option File(Y/N)Variable TypeSystem Var(Y/N)Var Scope(Global/Both/Session)Dynamic(Y/N)Default ValueOptional value
auto_increment_incrementYNintYBothY11-65535
auto_increment_offsetYNintYBothY11-65535
autocommitYNboolYBothYTRUEFALSE
character_set_clientYNstringYBothY“utf8mb4”
character_set_connectionYNstringYBothY“utf8mb4”
character_set_databaseYNstringYBothY“utf8mb4”
character_set_resultsYNstringYBothY“utf8mb4”
character_set_serverYNstringYBothY“utf8mb4”
collation_connectionYNstringYBothY“default”
collation_serverYNstringYBothY“utf8mb4_bin”
completion_typeYNenumYBothY“NO_CHAIN”“NO_CHAIN”,”CHAIN”, “RELEASE”
hostYNstringYBothN“0.0.0.0”
init_connectYNstringYBothY“”
interactive_timeoutYNintYBothY288001-31536000
licenseYNstringYBothN“APACHE”
lower_case_table_namesYNintYBothN10-2
max_allowed_packetYNintYBothY167772161024-1073741824
net_write_timeoutYNintYBothY601-31536000
performance_schemaYNintYBothY00-1
portYNintYBothN60010-65535
profilingYNintYBothY00-1
query_result_maxsizeYNuintYBothY1000-18446744073709551615
query_result_timeoutYNuintYBothY240-18446744073709551615
save_query_resultYNboolYBothYFALSETRUE
sql_modeYNsetYBothY“ONLY_FULL_GROUP_BY,
STRICT_TRANS_TABLES,
NO_ZERO_IN_DATE,
NO_ZERO_DATE,
ERROR_FOR_DIVISION_BY_ZERO,
NO_ENGINE_SUBSTITUTION”
“ANSI”, “TRADITIONAL”, “ALLOW_INVALID_DATES”, “ANSI_QUOTES”, “ERROR_FOR_DIVISION_BY_ZERO”, “HIGH_NOT_PRECEDENCE”, “IGNORE_SPACE”, “NO_AUTO_VALUE_ON_ZERO”, “NO_BACKSLASH_ESCAPES”, “NO_DIR_IN_CREATE”, “NO_ENGINE_SUBSTITUTION”, “NO_UNSIGNED_SUBTRACTION”, “NO_ZERO_DATE”, “NO_ZERO_IN_DATE”, “ONLY_FULL_GROUP_BY”, “PAD_CHAR_TO_FULL_LENGTH”, “PIPES_AS_CONCAT”, “REAL_AS_FLOAT”, “STRICT_ALL_TABLES”, “STRICT_TRANS_TABLES”, “TIME_TRUNCATE_FRACTIONAL”
sql_safe_updatesYNintYBothY00-1
sql_select_limitYNuintYBothY184467440737095516150-18446744073709551615
system_time_zoneYNstringYBothN“”
time_zoneYNstringYBothN“SYSTEM”
transaction_isolationYNenumYBothY“REPEATABLE-READ”“READ-UNCOMMITTED”, “READ-COMMITTED”, “REPEATABLE-READ”,”REPEATABLE-READ”, “SERIALIZABLE”
transaction_read_onlyYNintYBothY00-1
version_commentYNstringYBothN“MatrixOne”
wait_timeoutYNintYBothY288001-2147483

Constraints

  1. To be compatible with MySQL, MatrixOne currently only implements syntax support for the system variables.
  2. MatrixOne is compatible with MySQL, except the ONLY_FULL_GROUP_BY mode; other modes of sql_mode only implement syntax support.