Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
3fa8c279
Commit
3fa8c279
authored
Sep 01, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
INFORMATION_SCHEMA.SYSTEM_VARIABLES.GLOBAL_VALUE_ORIGIN
parent
513f5840
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1047 additions
and
126 deletions
+1047
-126
mysql-test/suite/funcs_1/r/is_columns_is.result
mysql-test/suite/funcs_1/r/is_columns_is.result
+12
-10
mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
+12
-10
mysql-test/suite/sys_vars/r/sysvars_aria.result
mysql-test/suite/sys_vars/r/sysvars_aria.result
+19
-0
mysql-test/suite/sys_vars/r/sysvars_debug.result
mysql-test/suite/sys_vars/r/sysvars_debug.result
+7
-0
mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff
mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff
+61
-23
mysql-test/suite/sys_vars/r/sysvars_innodb.result
mysql-test/suite/sys_vars/r/sysvars_innodb.result
+147
-0
mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+287
-0
mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
...l-test/suite/sys_vars/r/sysvars_server_notembedded.result
+337
-0
mysql-test/suite/sys_vars/r/sysvars_wsrep.result
mysql-test/suite/sys_vars/r/sysvars_wsrep.result
+39
-0
sql/mysqld.cc
sql/mysqld.cc
+7
-3
sql/set_var.cc
sql/set_var.cc
+39
-18
sql/set_var.h
sql/set_var.h
+2
-0
sql/sql_plugin.cc
sql/sql_plugin.cc
+77
-62
sql/sql_show.cc
sql/sql_show.cc
+1
-0
No files found.
mysql-test/suite/funcs_1/r/is_columns_is.result
View file @
3fa8c279
...
...
@@ -324,19 +324,20 @@ def information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NUL
def information_schema STATISTICS TABLE_CATALOG 1 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select
def information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
def information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
def information_schema SYSTEM_VARIABLES COMMAND_LINE_ARGUMENT 1
3
NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
def information_schema SYSTEM_VARIABLES DEFAULT_VALUE
4
NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select
def information_schema SYSTEM_VARIABLES ENUM_VALUE_LIST 1
1
NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select
def information_schema SYSTEM_VARIABLES COMMAND_LINE_ARGUMENT 1
4
NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
def information_schema SYSTEM_VARIABLES DEFAULT_VALUE
5
NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select
def information_schema SYSTEM_VARIABLES ENUM_VALUE_LIST 1
2
NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select
def information_schema SYSTEM_VARIABLES GLOBAL_VALUE 3 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select
def information_schema SYSTEM_VARIABLES NUMERIC_BLOCK_SIZE 10 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21) select
def information_schema SYSTEM_VARIABLES NUMERIC_MAX_VALUE 9 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21) select
def information_schema SYSTEM_VARIABLES NUMERIC_MIN_VALUE 8 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21) select
def information_schema SYSTEM_VARIABLES READ_ONLY 12 NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select
def information_schema SYSTEM_VARIABLES GLOBAL_VALUE_ORIGIN 4 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
def information_schema SYSTEM_VARIABLES NUMERIC_BLOCK_SIZE 11 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21) select
def information_schema SYSTEM_VARIABLES NUMERIC_MAX_VALUE 10 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21) select
def information_schema SYSTEM_VARIABLES NUMERIC_MIN_VALUE 9 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21) select
def information_schema SYSTEM_VARIABLES READ_ONLY 13 NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select
def information_schema SYSTEM_VARIABLES SESSION_VALUE 2 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select
def information_schema SYSTEM_VARIABLES VARIABLE_COMMENT
7
NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select
def information_schema SYSTEM_VARIABLES VARIABLE_COMMENT
8
NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select
def information_schema SYSTEM_VARIABLES VARIABLE_NAME 1 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
def information_schema SYSTEM_VARIABLES VARIABLE_SCOPE
5
NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
def information_schema SYSTEM_VARIABLES VARIABLE_TYPE
6
NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
def information_schema SYSTEM_VARIABLES VARIABLE_SCOPE
6
NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
def information_schema SYSTEM_VARIABLES VARIABLE_TYPE
7
NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
def information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select
def information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select
def information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select
...
...
@@ -829,6 +830,7 @@ NULL information_schema STATISTICS SUB_PART bigint NULL NULL NULL NULL bigint(3)
3.0000 information_schema SYSTEM_VARIABLES VARIABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema SYSTEM_VARIABLES SESSION_VALUE varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
3.0000 information_schema SYSTEM_VARIABLES GLOBAL_VALUE varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
3.0000 information_schema SYSTEM_VARIABLES GLOBAL_VALUE_ORIGIN varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema SYSTEM_VARIABLES DEFAULT_VALUE varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
3.0000 information_schema SYSTEM_VARIABLES VARIABLE_SCOPE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema SYSTEM_VARIABLES VARIABLE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64)
...
...
mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
View file @
3fa8c279
...
...
@@ -324,19 +324,20 @@ def information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NUL
def information_schema STATISTICS TABLE_CATALOG 1 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512)
def information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema SYSTEM_VARIABLES COMMAND_LINE_ARGUMENT 1
3
NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema SYSTEM_VARIABLES DEFAULT_VALUE
4
NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024)
def information_schema SYSTEM_VARIABLES ENUM_VALUE_LIST 1
1
NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext
def information_schema SYSTEM_VARIABLES COMMAND_LINE_ARGUMENT 1
4
NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema SYSTEM_VARIABLES DEFAULT_VALUE
5
NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024)
def information_schema SYSTEM_VARIABLES ENUM_VALUE_LIST 1
2
NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext
def information_schema SYSTEM_VARIABLES GLOBAL_VALUE 3 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024)
def information_schema SYSTEM_VARIABLES NUMERIC_BLOCK_SIZE 10 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21)
def information_schema SYSTEM_VARIABLES NUMERIC_MAX_VALUE 9 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21)
def information_schema SYSTEM_VARIABLES NUMERIC_MIN_VALUE 8 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21)
def information_schema SYSTEM_VARIABLES READ_ONLY 12 NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3)
def information_schema SYSTEM_VARIABLES GLOBAL_VALUE_ORIGIN 4 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema SYSTEM_VARIABLES NUMERIC_BLOCK_SIZE 11 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21)
def information_schema SYSTEM_VARIABLES NUMERIC_MAX_VALUE 10 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21)
def information_schema SYSTEM_VARIABLES NUMERIC_MIN_VALUE 9 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21)
def information_schema SYSTEM_VARIABLES READ_ONLY 13 NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3)
def information_schema SYSTEM_VARIABLES SESSION_VALUE 2 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024)
def information_schema SYSTEM_VARIABLES VARIABLE_COMMENT
7
NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048)
def information_schema SYSTEM_VARIABLES VARIABLE_COMMENT
8
NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048)
def information_schema SYSTEM_VARIABLES VARIABLE_NAME 1 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema SYSTEM_VARIABLES VARIABLE_SCOPE
5
NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema SYSTEM_VARIABLES VARIABLE_TYPE
6
NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema SYSTEM_VARIABLES VARIABLE_SCOPE
6
NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema SYSTEM_VARIABLES VARIABLE_TYPE
7
NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
def information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
def information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
...
...
@@ -829,6 +830,7 @@ NULL information_schema STATISTICS SUB_PART bigint NULL NULL NULL NULL bigint(3)
3.0000 information_schema SYSTEM_VARIABLES VARIABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema SYSTEM_VARIABLES SESSION_VALUE varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
3.0000 information_schema SYSTEM_VARIABLES GLOBAL_VALUE varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
3.0000 information_schema SYSTEM_VARIABLES GLOBAL_VALUE_ORIGIN varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema SYSTEM_VARIABLES DEFAULT_VALUE varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
3.0000 information_schema SYSTEM_VARIABLES VARIABLE_SCOPE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema SYSTEM_VARIABLES VARIABLE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64)
...
...
mysql-test/suite/sys_vars/r/sysvars_aria.result
View file @
3fa8c279
...
...
@@ -4,6 +4,7 @@ where variable_name like 'aria%'
VARIABLE_NAME ARIA_BLOCK_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 8192
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8192
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
...
...
@@ -17,6 +18,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_CHECKPOINT_INTERVAL
SESSION_VALUE NULL
GLOBAL_VALUE 30
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 30
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
...
...
@@ -30,6 +32,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_CHECKPOINT_LOG_ACTIVITY
SESSION_VALUE NULL
GLOBAL_VALUE 1048576
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1048576
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
...
...
@@ -43,6 +46,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_FORCE_START_AFTER_RECOVERY_FAILURES
SESSION_VALUE NULL
GLOBAL_VALUE 0
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
...
...
@@ -56,6 +60,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_GROUP_COMMIT
SESSION_VALUE NULL
GLOBAL_VALUE none
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE none
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
...
...
@@ -69,6 +74,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_GROUP_COMMIT_INTERVAL
SESSION_VALUE NULL
GLOBAL_VALUE 0
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
...
...
@@ -82,6 +88,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_LOG_FILE_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 104857600
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 1073741824
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
...
...
@@ -95,6 +102,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_LOG_PURGE_TYPE
SESSION_VALUE NULL
GLOBAL_VALUE immediate
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE immediate
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
...
...
@@ -108,6 +116,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_MAX_SORT_FILE_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 9223372036853727232
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 9223372036853727232
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
...
...
@@ -121,6 +130,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGECACHE_AGE_THRESHOLD
SESSION_VALUE NULL
GLOBAL_VALUE 300
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 300
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
...
...
@@ -134,6 +144,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGECACHE_BUFFER_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 8388608
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 134217728
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
...
...
@@ -147,6 +158,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGECACHE_DIVISION_LIMIT
SESSION_VALUE NULL
GLOBAL_VALUE 100
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
...
...
@@ -160,6 +172,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGE_CHECKSUM
SESSION_VALUE NULL
GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
...
...
@@ -173,6 +186,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_RECOVER
SESSION_VALUE NULL
GLOBAL_VALUE NORMAL
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NORMAL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE SET
...
...
@@ -186,6 +200,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ARIA_REPAIR_THREADS
SESSION_VALUE 1
GLOBAL_VALUE 1
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
...
...
@@ -199,6 +214,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_SORT_BUFFER_SIZE
SESSION_VALUE 268434432
GLOBAL_VALUE 268434432
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 268434432
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
...
...
@@ -212,6 +228,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_STATS_METHOD
SESSION_VALUE nulls_unequal
GLOBAL_VALUE nulls_unequal
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE nulls_unequal
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
...
...
@@ -225,6 +242,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_SYNC_LOG_DIR
SESSION_VALUE NULL
GLOBAL_VALUE NEWFILE
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NEWFILE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
...
...
@@ -238,6 +256,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_USED_FOR_TEMP_TABLES
SESSION_VALUE NULL
GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
...
...
mysql-test/suite/sys_vars/r/sysvars_debug.result
View file @
3fa8c279
...
...
@@ -4,6 +4,7 @@ where variable_name like 'debug%'
VARIABLE_NAME DEBUG
SESSION_VALUE
GLOBAL_VALUE
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
...
...
@@ -17,6 +18,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME DEBUG_BINLOG_FSYNC_SLEEP
SESSION_VALUE NULL
GLOBAL_VALUE 314
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
...
...
@@ -30,6 +32,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEBUG_CRC_BREAK
SESSION_VALUE NULL
GLOBAL_VALUE 0
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
...
...
@@ -43,6 +46,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEBUG_DBUG
SESSION_VALUE
GLOBAL_VALUE
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
...
...
@@ -56,6 +60,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME DEBUG_MUTEX_DEADLOCK_DETECTOR
SESSION_VALUE NULL
GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
...
...
@@ -69,6 +74,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME DEBUG_NO_THREAD_ALARM
SESSION_VALUE NULL
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
...
...
@@ -82,6 +88,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME DEBUG_SYNC
SESSION_VALUE ON - current signal: ''
GLOBAL_VALUE NULL
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE VARCHAR
...
...
mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff
View file @
3fa8c279
This diff is collapsed.
Click to expand it.
mysql-test/suite/sys_vars/r/sysvars_innodb.result
View file @
3fa8c279
This diff is collapsed.
Click to expand it.
mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
View file @
3fa8c279
This diff is collapsed.
Click to expand it.
mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
View file @
3fa8c279
This diff is collapsed.
Click to expand it.
mysql-test/suite/sys_vars/r/sysvars_wsrep.result
View file @
3fa8c279
...
...
@@ -4,6 +4,7 @@ where variable_name like 'wsrep%'
VARIABLE_NAME WSREP_AUTO_INCREMENT_CONTROL
SESSION_VALUE NULL
GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
...
...
@@ -17,6 +18,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_CAUSAL_READS
SESSION_VALUE OFF
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
...
...
@@ -30,6 +32,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_CERTIFY_NONPK
SESSION_VALUE NULL
GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
...
...
@@ -43,6 +46,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_CLUSTER_ADDRESS
SESSION_VALUE NULL
GLOBAL_VALUE
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
...
...
@@ -56,6 +60,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_CLUSTER_NAME
SESSION_VALUE NULL
GLOBAL_VALUE my_wsrep_cluster
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE my_wsrep_cluster
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
...
...
@@ -69,6 +74,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_CONVERT_LOCK_TO_TRX
SESSION_VALUE NULL
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
...
...
@@ -82,6 +88,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_DATA_HOME_DIR
SESSION_VALUE NULL
GLOBAL_VALUE
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
...
...
@@ -95,6 +102,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_DBUG_OPTION
SESSION_VALUE NULL
GLOBAL_VALUE
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
...
...
@@ -108,6 +116,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_DEBUG
SESSION_VALUE NULL
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
...
...
@@ -121,6 +130,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_DESYNC
SESSION_VALUE NULL
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
...
...
@@ -134,6 +144,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_DRUPAL_282555_WORKAROUND
SESSION_VALUE NULL
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
...
...
@@ -147,6 +158,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_FORCED_BINLOG_FORMAT
SESSION_VALUE NULL
GLOBAL_VALUE NONE
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NONE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
...
...
@@ -160,6 +172,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_LOAD_DATA_SPLITTING
SESSION_VALUE NULL
GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
...
...
@@ -173,6 +186,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_LOG_CONFLICTS
SESSION_VALUE NULL
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
...
...
@@ -186,6 +200,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_MAX_WS_ROWS
SESSION_VALUE NULL
GLOBAL_VALUE 131072
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 131072
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
...
...
@@ -199,6 +214,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_MAX_WS_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 1073741824
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1073741824
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
...
...
@@ -212,6 +228,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_MYSQL_REPLICATION_BUNDLE
SESSION_VALUE NULL
GLOBAL_VALUE 0
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
...
...
@@ -225,6 +242,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_NODE_ADDRESS
SESSION_VALUE NULL
GLOBAL_VALUE
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
...
...
@@ -238,6 +256,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_NODE_INCOMING_ADDRESS
SESSION_VALUE NULL
GLOBAL_VALUE AUTO
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE AUTO
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
...
...
@@ -251,6 +270,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_NODE_NAME
SESSION_VALUE NULL
GLOBAL_VALUE
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
...
...
@@ -264,6 +284,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_NOTIFY_CMD
SESSION_VALUE NULL
GLOBAL_VALUE
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
...
...
@@ -277,6 +298,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_ON
SESSION_VALUE OFF
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
...
...
@@ -290,6 +312,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_OSU_METHOD
SESSION_VALUE NULL
GLOBAL_VALUE TOI
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE TOI
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
...
...
@@ -303,6 +326,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_PROVIDER
SESSION_VALUE NULL
GLOBAL_VALUE none
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE none
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
...
...
@@ -316,6 +340,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_PROVIDER_OPTIONS
SESSION_VALUE NULL
GLOBAL_VALUE
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
...
...
@@ -329,6 +354,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_RECOVER
SESSION_VALUE NULL
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
...
...
@@ -342,6 +368,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_REPLICATE_MYISAM
SESSION_VALUE NULL
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
...
...
@@ -355,6 +382,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_RESTART_SLAVE
SESSION_VALUE NULL
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
...
...
@@ -368,6 +396,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_RETRY_AUTOCOMMIT
SESSION_VALUE 1
GLOBAL_VALUE 1
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
...
...
@@ -381,6 +410,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_SLAVE_FK_CHECKS
SESSION_VALUE NULL
GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
...
...
@@ -394,6 +424,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_SLAVE_THREADS
SESSION_VALUE NULL
GLOBAL_VALUE 1
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
...
...
@@ -407,6 +438,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_SLAVE_UK_CHECKS
SESSION_VALUE NULL
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
...
...
@@ -420,6 +452,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_SST_AUTH
SESSION_VALUE NULL
GLOBAL_VALUE
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
...
...
@@ -433,6 +466,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_SST_DONOR
SESSION_VALUE NULL
GLOBAL_VALUE
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
...
...
@@ -446,6 +480,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_SST_DONOR_REJECTS_QUERIES
SESSION_VALUE NULL
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
...
...
@@ -459,6 +494,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_SST_METHOD
SESSION_VALUE NULL
GLOBAL_VALUE rsync
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE rsync
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
...
...
@@ -472,6 +508,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_SST_RECEIVE_ADDRESS
SESSION_VALUE NULL
GLOBAL_VALUE AUTO
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE AUTO
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
...
...
@@ -485,6 +522,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_START_POSITION
SESSION_VALUE NULL
GLOBAL_VALUE 00000000-0000-0000-0000-000000000000:-1
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 00000000-0000-0000-0000-000000000000:-1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
...
...
@@ -498,6 +536,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_SYNC_WAIT
SESSION_VALUE 0
GLOBAL_VALUE 0
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED
...
...
sql/mysqld.cc
View file @
3fa8c279
...
...
@@ -8548,10 +8548,14 @@ static int mysql_init_variables(void)
}
my_bool
mysqld_get_one_option
(
int
optid
,
const
struct
my_option
*
opt
__attribute__
((
unused
)),
char
*
argument
)
mysqld_get_one_option
(
int
optid
,
const
struct
my_option
*
opt
,
char
*
argument
)
{
if
(
opt
->
app_type
)
{
sys_var
*
var
=
(
sys_var
*
)
opt
->
app_type
;
var
->
value_origin
=
sys_var
::
CONFIG
;
}
switch
(
optid
)
{
case
'#'
:
#ifndef DBUG_OFF
...
...
sql/set_var.cc
View file @
3fa8c279
...
...
@@ -143,8 +143,7 @@ sys_var::sys_var(sys_var_chain *chain, const char *name_arg,
on_check_function
on_check_func
,
on_update_function
on_update_func
,
const
char
*
substitute
)
:
next
(
0
),
binlog_status
(
binlog_status_arg
),
next
(
0
),
binlog_status
(
binlog_status_arg
),
value_origin
(
COMPILE_TIME
),
flags
(
flags_arg
),
show_val_type
(
show_val_type_arg
),
guard
(
lock
),
offset
(
off
),
on_check
(
on_check_func
),
on_update
(
on_update_func
),
deprecation_substitute
(
substitute
),
...
...
@@ -172,6 +171,7 @@ sys_var::sys_var(sys_var_chain *chain, const char *name_arg,
option
.
arg_type
=
getopt_arg_type
;
option
.
value
=
(
uchar
**
)
global_var_ptr
();
option
.
def_value
=
def_val
;
option
.
app_type
=
this
;
if
(
chain
->
last
)
chain
->
last
->
next
=
this
;
...
...
@@ -193,6 +193,7 @@ bool sys_var::update(THD *thd, set_var *var)
*/
AutoWLock
lock1
(
&
PLock_global_system_variables
);
AutoWLock
lock2
(
guard
);
value_origin
=
SQL
;
return
global_update
(
thd
,
var
)
||
(
on_update
&&
on_update
(
this
,
thd
,
OPT_GLOBAL
));
}
...
...
@@ -1003,14 +1004,26 @@ int fill_sysvars(THD *thd, TABLE_LIST *tables, COND *cond)
// GLOBAL_VALUE
store_var
(
fields
[
2
],
var
,
OPT_GLOBAL
,
&
strbuf
);
// GLOBAL_VALUE_ORIGIN
static
const
LEX_CSTRING
origins
[]
=
{
{
STRING_WITH_LEN
(
"CONFIG"
)
},
{
STRING_WITH_LEN
(
"AUTO"
)
},
{
STRING_WITH_LEN
(
"SQL"
)
},
{
STRING_WITH_LEN
(
"COMPILE-TIME"
)
}
};
const
LEX_CSTRING
*
origin
=
origins
+
var
->
value_origin
;
fields
[
3
]
->
store
(
origin
->
str
,
origin
->
length
,
scs
);
// DEFAULT_VALUE
uchar
*
def
=
var
->
is_readonly
()
&&
var
->
option
.
id
<
0
?
0
:
var
->
default_value_ptr
(
thd
);
if
(
def
)
store_value_ptr
(
fields
[
3
],
var
,
&
strbuf
,
def
);
store_value_ptr
(
fields
[
4
],
var
,
&
strbuf
,
def
);
mysql_mutex_unlock
(
&
LOCK_global_system_variables
);
// VARIABLE_SCOPE
static
const
LEX_CSTRING
scopes
[]
=
{
{
STRING_WITH_LEN
(
"GLOBAL"
)
},
...
...
@@ -1018,8 +1031,9 @@ int fill_sysvars(THD *thd, TABLE_LIST *tables, COND *cond)
{
STRING_WITH_LEN
(
"SESSION ONLY"
)
}
};
const
LEX_CSTRING
*
scope
=
scopes
+
var
->
scope
();
fields
[
4
]
->
store
(
scope
->
str
,
scope
->
length
,
scs
);
fields
[
5
]
->
store
(
scope
->
str
,
scope
->
length
,
scs
);
// VARIABLE_TYPE
#if SIZEOF_LONG == SIZEOF_INT
#define LONG_TYPE "INT"
#else
...
...
@@ -1046,11 +1060,15 @@ int fill_sysvars(THD *thd, TABLE_LIST *tables, COND *cond)
{
STRING_WITH_LEN
(
"FLAGSET"
)
},
// GET_FLAGSET 15
};
const
LEX_CSTRING
*
type
=
types
+
(
var
->
option
.
var_type
&
GET_TYPE_MASK
);
fields
[
5
]
->
store
(
type
->
str
,
type
->
length
,
scs
);
fields
[
6
]
->
store
(
type
->
str
,
type
->
length
,
scs
);
fields
[
6
]
->
store
(
var
->
option
.
comment
,
strlen
(
var
->
option
.
comment
),
// VARIABLE_COMMENT
fields
[
7
]
->
store
(
var
->
option
.
comment
,
strlen
(
var
->
option
.
comment
),
scs
);
// NUMERIC_MIN_VALUE
// NUMERIC_MAX_VALUE
// NUMERIC_BLOCK_SIZE
bool
is_unsigned
=
true
;
switch
(
var
->
option
.
var_type
)
{
...
...
@@ -1062,20 +1080,21 @@ int fill_sysvars(THD *thd, TABLE_LIST *tables, COND *cond)
case
GET_UINT
:
case
GET_ULONG
:
case
GET_ULL
:
fields
[
7
]
->
set_notnull
();
fields
[
8
]
->
set_notnull
();
fields
[
9
]
->
set_notnull
();
fields
[
7
]
->
store
(
var
->
option
.
min_value
,
is_unsigned
);
fields
[
8
]
->
store
(
var
->
option
.
max_value
,
is_unsigned
);
fields
[
9
]
->
store
(
var
->
option
.
block_size
,
is_unsigned
);
fields
[
10
]
->
set_notnull
();
fields
[
8
]
->
store
(
var
->
option
.
min_value
,
is_unsigned
);
fields
[
9
]
->
store
(
var
->
option
.
max_value
,
is_unsigned
);
fields
[
10
]
->
store
(
var
->
option
.
block_size
,
is_unsigned
);
break
;
case
GET_DOUBLE
:
fields
[
7
]
->
set_notnull
();
fields
[
8
]
->
set_notnull
();
fields
[
7
]
->
store
(
getopt_ulonglong2double
(
var
->
option
.
min_value
));
fields
[
8
]
->
store
(
getopt_ulonglong2double
(
var
->
option
.
max_value
));
fields
[
9
]
->
set_notnull
();
fields
[
8
]
->
store
(
getopt_ulonglong2double
(
var
->
option
.
min_value
));
fields
[
9
]
->
store
(
getopt_ulonglong2double
(
var
->
option
.
max_value
));
}
// ENUM_VALUE_LIST
TYPELIB
*
tl
=
var
->
option
.
typelib
;
if
(
tl
)
{
...
...
@@ -1087,18 +1106,20 @@ int fill_sysvars(THD *thd, TABLE_LIST *tables, COND *cond)
strbuf
.
append
(
','
);
}
strbuf
.
append
(
tl
->
type_names
[
i
]);
fields
[
1
0
]
->
set_notnull
();
fields
[
1
0
]
->
store
(
strbuf
.
ptr
(),
strbuf
.
length
(),
scs
);
fields
[
1
1
]
->
set_notnull
();
fields
[
1
1
]
->
store
(
strbuf
.
ptr
(),
strbuf
.
length
(),
scs
);
}
// READ_ONLY
static
const
LEX_CSTRING
yesno
[]
=
{
{
STRING_WITH_LEN
(
"NO"
)
},
{
STRING_WITH_LEN
(
"YES"
)
}
};
const
LEX_CSTRING
*
yn
=
yesno
+
var
->
is_readonly
();
fields
[
1
1
]
->
store
(
yn
->
str
,
yn
->
length
,
scs
);
fields
[
1
2
]
->
store
(
yn
->
str
,
yn
->
length
,
scs
);
// COMMAND_LINE_ARGUMENT
if
(
var
->
option
.
id
>=
0
)
{
static
const
LEX_CSTRING
args
[]
=
...
...
@@ -1108,8 +1129,8 @@ int fill_sysvars(THD *thd, TABLE_LIST *tables, COND *cond)
{
STRING_WITH_LEN
(
"REQUIRED"
)
}
// REQUIRED_ARG
};
const
LEX_CSTRING
*
arg
=
args
+
var
->
option
.
arg_type
;
fields
[
1
2
]
->
set_notnull
();
fields
[
1
2
]
->
store
(
arg
->
str
,
arg
->
length
,
scs
);
fields
[
1
3
]
->
set_notnull
();
fields
[
1
3
]
->
store
(
arg
->
str
,
arg
->
length
,
scs
);
}
if
(
schema_table_store_record
(
thd
,
tables
->
table
))
...
...
sql/set_var.h
View file @
3fa8c279
...
...
@@ -63,6 +63,7 @@ class sys_var
enum
flag_enum
{
GLOBAL
,
SESSION
,
ONLY_SESSION
,
SCOPE_MASK
=
1023
,
READONLY
=
1024
,
ALLOCATED
=
2048
,
PARSE_EARLY
=
4096
};
enum
{
NO_GETOPT
=-
1
,
GETOPT_ONLY_HELP
=-
2
};
enum
where
{
CONFIG
,
AUTO
,
SQL
,
COMPILE_TIME
};
/**
Enumeration type to indicate for a system variable whether
...
...
@@ -72,6 +73,7 @@ class sys_var
SESSION_VARIABLE_IN_BINLOG
}
binlog_status
;
my_option
option
;
///< min, max, default values are stored here
enum
where
value_origin
;
protected:
typedef
bool
(
*
on_check_function
)(
sys_var
*
self
,
THD
*
thd
,
set_var
*
var
);
...
...
sql/sql_plugin.cc
View file @
3fa8c279
...
...
@@ -3806,6 +3806,17 @@ static my_option *construct_help_options(MEM_ROOT *mem_root,
DBUG_RETURN
(
opts
);
}
extern
"C"
my_bool
mark_changed
(
int
,
const
struct
my_option
*
,
char
*
);
my_bool
mark_changed
(
int
,
const
struct
my_option
*
opt
,
char
*
)
{
if
(
opt
->
app_type
)
{
sys_var
*
var
=
(
sys_var
*
)
opt
->
app_type
;
var
->
value_origin
=
sys_var
::
CONFIG
;
}
return
0
;
}
/**
Create and register system variables supplied from the plugin and
assigns initial values from corresponding command line arguments.
...
...
@@ -3837,19 +3848,22 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
&
tmp
->
mem_root
:
&
plugin_vars_mem_root
;
st_mysql_sys_var
**
opt
;
my_option
*
opts
=
NULL
;
LEX_STRING
plugin_name
;
int
error
;
struct
st_bookmark
*
var
;
uint
len
,
count
=
EXTRA_OPTIONS
;
uint
len
=
0
,
count
=
EXTRA_OPTIONS
;
st_ptr_backup
*
tmp_backup
=
0
;
DBUG_ENTER
(
"test_plugin_options"
);
DBUG_ASSERT
(
tmp
->
plugin
&&
tmp
->
name
.
str
);
for
(
opt
=
tmp
->
plugin
->
system_vars
;
opt
&&
*
opt
;
opt
++
)
count
+=
2
;
/* --{plugin}-{optname} and --plugin-{plugin}-{optname} */
if
(
count
>
EXTRA_OPTIONS
||
(
*
argc
>
1
))
if
(
tmp
->
plugin
->
system_vars
||
(
*
argc
>
1
))
{
for
(
opt
=
tmp
->
plugin
->
system_vars
;
opt
&&
*
opt
;
opt
++
)
{
len
++
;
if
(
!
((
*
opt
)
->
flags
&
PLUGIN_VAR_NOCMDOPT
))
count
+=
2
;
/* --{plugin}-{optname} and --plugin-{plugin}-{optname} */
}
if
(
!
(
opts
=
(
my_option
*
)
alloc_root
(
tmp_root
,
sizeof
(
my_option
)
*
count
)))
{
sql_print_error
(
"Out of memory for plugin '%s'."
,
tmp
->
name
.
str
);
...
...
@@ -3863,6 +3877,56 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
DBUG_RETURN
(
-
1
);
}
if
(
tmp
->
plugin
->
system_vars
)
{
tmp_backup
=
(
st_ptr_backup
*
)
my_alloca
(
len
*
sizeof
(
tmp_backup
[
0
]));
DBUG_ASSERT
(
tmp
->
nbackups
==
0
);
DBUG_ASSERT
(
tmp
->
ptr_backup
==
0
);
for
(
opt
=
tmp
->
plugin
->
system_vars
;
*
opt
;
opt
++
)
{
st_mysql_sys_var
*
o
=
*
opt
;
char
*
varname
;
sys_var
*
v
;
if
(
o
->
flags
&
PLUGIN_VAR_NOSYSVAR
)
continue
;
tmp_backup
[
tmp
->
nbackups
++
].
save
(
&
o
->
name
);
if
((
var
=
find_bookmark
(
tmp
->
name
.
str
,
o
->
name
,
o
->
flags
)))
varname
=
var
->
key
+
1
;
else
{
len
=
tmp
->
name
.
length
+
strlen
(
o
->
name
)
+
2
;
varname
=
(
char
*
)
alloc_root
(
mem_root
,
len
);
strxmov
(
varname
,
tmp
->
name
.
str
,
"-"
,
o
->
name
,
NullS
);
my_casedn_str
(
&
my_charset_latin1
,
varname
);
convert_dash_to_underscore
(
varname
,
len
-
1
);
}
v
=
new
(
mem_root
)
sys_var_pluginvar
(
&
chain
,
varname
,
tmp
,
o
);
if
(
!
(
o
->
flags
&
PLUGIN_VAR_NOCMDOPT
))
{
for
(
my_option
*
mo
=
opts
;
mo
->
name
;
mo
++
)
if
(
mo
->
app_type
==
o
)
mo
->
app_type
=
v
;
}
}
if
(
tmp
->
nbackups
)
{
size_t
bytes
=
tmp
->
nbackups
*
sizeof
(
tmp
->
ptr_backup
[
0
]);
tmp
->
ptr_backup
=
(
st_ptr_backup
*
)
alloc_root
(
mem_root
,
bytes
);
if
(
!
tmp
->
ptr_backup
)
{
restore_ptr_backup
(
tmp
->
nbackups
,
tmp_backup
);
my_afree
(
tmp_backup
);
goto
err
;
}
memcpy
(
tmp
->
ptr_backup
,
tmp_backup
,
bytes
);
}
my_afree
(
tmp_backup
);
}
/*
We adjust the default value to account for the hardcoded exceptions
we have set for the federated and ndbcluster storage engines.
...
...
@@ -3871,14 +3935,14 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
tmp
->
load_option
!=
PLUGIN_FORCE_PLUS_PERMANENT
)
opts
[
0
].
def_value
=
opts
[
1
].
def_value
=
plugin_load_option
;
error
=
handle_options
(
argc
,
&
argv
,
opts
,
NULL
);
error
=
handle_options
(
argc
,
&
argv
,
opts
,
mark_changed
);
(
*
argc
)
++
;
/* add back one for the program name */
if
(
error
)
{
sql_print_error
(
"Parsing options for plugin '%s' failed."
,
tmp
->
name
.
str
);
goto
err
1
;
goto
err
;
}
/*
Set plugin loading policy from option value. First element in the option
...
...
@@ -3905,74 +3969,29 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
goto
err
;
}
if
(
!
my_strcasecmp
(
&
my_charset_latin1
,
tmp
->
name
.
str
,
"NDBCLUSTER"
))
{
plugin_name
.
str
=
const_cast
<
char
*>
(
"ndb"
);
// Use legacy "ndb" prefix
plugin_name
.
length
=
3
;
}
else
plugin_name
=
tmp
->
name
;
if
(
tmp
->
plugin
->
system_vars
)
{
for
(
len
=
0
,
opt
=
tmp
->
plugin
->
system_vars
;
*
opt
;
len
++
,
opt
++
)
/* no-op */
;
tmp_backup
=
(
st_ptr_backup
*
)
my_alloca
(
len
*
sizeof
(
tmp_backup
[
0
]));
DBUG_ASSERT
(
tmp
->
nbackups
==
0
);
DBUG_ASSERT
(
tmp
->
ptr_backup
==
0
);
for
(
opt
=
tmp
->
plugin
->
system_vars
;
*
opt
;
opt
++
)
{
st_mysql_sys_var
*
o
=
*
opt
;
char
*
varname
;
sys_var
*
v
__attribute__
((
unused
));
/*
PLUGIN_VAR_STR command-line options without PLUGIN_VAR_MEMALLOC, point
directly to values in the argv[] array. For plugins started at the
server startup, argv[] array is allocated with load_defaults(), and
freed when the server is shut down. But for plugins loaded with
INSTALL PLUGIN, the memory allocated with load_defaults() is freed with
free
d
() at the end of mysql_install_plugin(). Which means we cannot
free() at the end of mysql_install_plugin(). Which means we cannot
allow any pointers into that area.
Thus, for all plugins loaded after the server was started,
we copy string values to a plugin's memroot.
*/
if
(
mysqld_server_started
&&
((
o
->
flags
&
(
PLUGIN_VAR_STR
|
PLUGIN_VAR_NOCMDOPT
|
PLUGIN_VAR_MEMALLOC
))
==
PLUGIN_VAR_STR
))
((
(
*
opt
)
->
flags
&
(
PLUGIN_VAR_STR
|
PLUGIN_VAR_NOCMDOPT
|
PLUGIN_VAR_MEMALLOC
))
==
PLUGIN_VAR_STR
))
{
sysvar_str_t
*
str
=
(
sysvar_str_t
*
)
o
;
sysvar_str_t
*
str
=
(
sysvar_str_t
*
)
*
opt
;
if
(
*
str
->
value
)
*
str
->
value
=
strdup_root
(
mem_root
,
*
str
->
value
);
}
if
(
o
->
flags
&
PLUGIN_VAR_NOSYSVAR
)
continue
;
tmp_backup
[
tmp
->
nbackups
++
].
save
(
&
o
->
name
);
if
((
var
=
find_bookmark
(
plugin_name
.
str
,
o
->
name
,
o
->
flags
)))
varname
=
var
->
key
+
1
;
else
{
len
=
plugin_name
.
length
+
strlen
(
o
->
name
)
+
2
;
varname
=
(
char
*
)
alloc_root
(
mem_root
,
len
);
strxmov
(
varname
,
plugin_name
.
str
,
"-"
,
o
->
name
,
NullS
);
my_casedn_str
(
&
my_charset_latin1
,
varname
);
convert_dash_to_underscore
(
varname
,
len
-
1
);
}
v
=
new
(
mem_root
)
sys_var_pluginvar
(
&
chain
,
varname
,
tmp
,
o
);
DBUG_ASSERT
(
v
);
/* check that an object was actually constructed */
}
/* end for */
if
(
tmp
->
nbackups
)
{
size_t
bytes
=
tmp
->
nbackups
*
sizeof
(
tmp
->
ptr_backup
[
0
]);
tmp
->
ptr_backup
=
(
st_ptr_backup
*
)
alloc_root
(
mem_root
,
bytes
);
if
(
!
tmp
->
ptr_backup
)
{
restore_ptr_backup
(
tmp
->
nbackups
,
tmp_backup
);
goto
err1
;
}
memcpy
(
tmp
->
ptr_backup
,
tmp_backup
,
bytes
);
}
if
(
chain
.
first
)
...
...
@@ -3982,18 +4001,14 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
{
sql_print_error
(
"Plugin '%s' has conflicting system variables"
,
tmp
->
name
.
str
);
goto
err
1
;
goto
err
;
}
tmp
->
system_vars
=
chain
.
first
;
}
my_afree
(
tmp_backup
);
}
DBUG_RETURN
(
0
);
err1:
if
(
tmp_backup
)
my_afree
(
tmp_backup
);
err:
if
(
opts
)
my_cleanup_options
(
opts
);
...
...
sql/sql_show.cc
View file @
3fa8c279
...
...
@@ -8857,6 +8857,7 @@ ST_FIELD_INFO sysvars_fields_info[]=
{
"VARIABLE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
},
{
"SESSION_VALUE"
,
1024
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
0
,
0
},
{
"GLOBAL_VALUE"
,
1024
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
0
,
0
},
{
"GLOBAL_VALUE_ORIGIN"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
},
{
"DEFAULT_VALUE"
,
1024
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
0
,
0
},
{
"VARIABLE_SCOPE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
},
{
"VARIABLE_TYPE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment