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
677a1e7c
Commit
677a1e7c
authored
Feb 14, 2019
by
Jan Lindström
Committed by
GitHub
Feb 14, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1183 from codership/10.4-wsrep_debug
WSREP debug log levels support
parents
7d9f45e0
3e64e7f2
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
52 additions
and
34 deletions
+52
-34
include/mysql/service_wsrep.h
include/mysql/service_wsrep.h
+1
-1
mysql-test/suite/galera/r/galera_defaults.result
mysql-test/suite/galera/r/galera_defaults.result
+1
-1
mysql-test/suite/galera/t/galera_sst_mariabackup.cnf
mysql-test/suite/galera/t/galera_sst_mariabackup.cnf
+1
-1
mysql-test/suite/galera/t/galera_sst_mariabackup_data_dir.cnf
...l-test/suite/galera/t/galera_sst_mariabackup_data_dir.cnf
+1
-1
mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.cnf
...uite/galera/t/galera_sst_mariabackup_encrypt_with_key.cnf
+1
-1
mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf
...t/suite/galera/t/galera_sst_mariabackup_table_options.cnf
+1
-1
mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.cnf
mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.cnf
+1
-1
mysql-test/suite/sys_vars/r/sysvars_wsrep.result
mysql-test/suite/sys_vars/r/sysvars_wsrep.result
+6
-6
mysql-test/suite/sys_vars/r/wsrep_debug_basic.result
mysql-test/suite/sys_vars/r/wsrep_debug_basic.result
+12
-10
mysql-test/suite/sys_vars/t/wsrep_debug_basic.test
mysql-test/suite/sys_vars/t/wsrep_debug_basic.test
+6
-4
sql/sys_vars.cc
sql/sys_vars.cc
+8
-3
sql/wsrep_mysqld.cc
sql/wsrep_mysqld.cc
+2
-1
sql/wsrep_mysqld.h
sql/wsrep_mysqld.h
+2
-2
sql/wsrep_var.cc
sql/wsrep_var.cc
+6
-0
sql/wsrep_var.h
sql/wsrep_var.h
+2
-0
wsrep-lib
wsrep-lib
+1
-1
No files found.
include/mysql/service_wsrep.h
View file @
677a1e7c
...
@@ -122,7 +122,7 @@ extern struct wsrep_service_st {
...
@@ -122,7 +122,7 @@ extern struct wsrep_service_st {
#else
#else
#define MYSQL_SERVICE_WSREP_STATIC_INCLUDED
#define MYSQL_SERVICE_WSREP_STATIC_INCLUDED
extern
my_bool
wsrep_debug
;
extern
ulong
wsrep_debug
;
extern
my_bool
wsrep_log_conflicts
;
extern
my_bool
wsrep_log_conflicts
;
extern
my_bool
wsrep_certify_nonPK
;
extern
my_bool
wsrep_certify_nonPK
;
extern
my_bool
wsrep_load_data_splitting
;
extern
my_bool
wsrep_load_data_splitting
;
...
...
mysql-test/suite/galera/r/galera_defaults.result
View file @
677a1e7c
...
@@ -26,7 +26,7 @@ WSREP_CLUSTER_ADDRESS gcomm://
...
@@ -26,7 +26,7 @@ WSREP_CLUSTER_ADDRESS gcomm://
WSREP_CLUSTER_NAME my_wsrep_cluster
WSREP_CLUSTER_NAME my_wsrep_cluster
WSREP_CONVERT_LOCK_TO_TRX OFF
WSREP_CONVERT_LOCK_TO_TRX OFF
WSREP_DBUG_OPTION
WSREP_DBUG_OPTION
WSREP_DEBUG
OFF
WSREP_DEBUG
NONE
WSREP_DESYNC OFF
WSREP_DESYNC OFF
WSREP_DIRTY_READS OFF
WSREP_DIRTY_READS OFF
WSREP_DRUPAL_282555_WORKAROUND OFF
WSREP_DRUPAL_282555_WORKAROUND OFF
...
...
mysql-test/suite/galera/t/galera_sst_mariabackup.cnf
View file @
677a1e7c
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
[mysqld]
[mysqld]
wsrep_sst_method=mariabackup
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
wsrep_sst_auth="root:"
wsrep_debug=
ON
wsrep_debug=
1
[mysqld.1]
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
...
...
mysql-test/suite/galera/t/galera_sst_mariabackup_data_dir.cnf
View file @
677a1e7c
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
[mysqld]
[mysqld]
wsrep_sst_method=mariabackup
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
wsrep_sst_auth="root:"
wsrep_debug=
ON
wsrep_debug=
1
[mysqld.1]
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
...
...
mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.cnf
View file @
677a1e7c
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
[mysqld]
[mysqld]
wsrep_sst_method=mariabackup
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
wsrep_sst_auth="root:"
wsrep_debug=
ON
wsrep_debug=
1
[SST]
[SST]
tkey=@ENV.MYSQL_TEST_DIR/std_data/cakey.pem
tkey=@ENV.MYSQL_TEST_DIR/std_data/cakey.pem
...
...
mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf
View file @
677a1e7c
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
[mysqld]
[mysqld]
wsrep_sst_method=mariabackup
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
wsrep_sst_auth="root:"
wsrep_debug=
ON
wsrep_debug=
1
[mysqld.1]
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
...
...
mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.cnf
View file @
677a1e7c
...
@@ -14,7 +14,7 @@ wsrep_causal_reads=0
...
@@ -14,7 +14,7 @@ wsrep_causal_reads=0
wsrep_sync_wait=0
wsrep_sync_wait=0
[mysqld]
[mysqld]
wsrep_debug=
ON
wsrep_debug=
1
[client]
[client]
ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem
ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem
...
...
mysql-test/suite/sys_vars/r/sysvars_wsrep.result
View file @
677a1e7c
...
@@ -115,18 +115,18 @@ READ_ONLY NO
...
@@ -115,18 +115,18 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_DEBUG
VARIABLE_NAME WSREP_DEBUG
SESSION_VALUE NULL
SESSION_VALUE NULL
GLOBAL_VALUE
OFF
GLOBAL_VALUE
NONE
GLOBAL_VALUE_ORIGIN COMPILE-TIME
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
OFF
DEFAULT_VALUE
NONE
VARIABLE_SCOPE GLOBAL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE
BOOLEAN
VARIABLE_TYPE
ENUM
VARIABLE_COMMENT
To enable
debug level logging
VARIABLE_COMMENT
WSREP
debug level logging
NUMERIC_MIN_VALUE NULL
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST
OFF,ON
ENUM_VALUE_LIST
NONE,SERVER,TRANSACTION,STREAMING,CLIENT
READ_ONLY NO
READ_ONLY NO
COMMAND_LINE_ARGUMENT
OPTIONAL
COMMAND_LINE_ARGUMENT
REQUIRED
VARIABLE_NAME WSREP_DESYNC
VARIABLE_NAME WSREP_DESYNC
SESSION_VALUE NULL
SESSION_VALUE NULL
GLOBAL_VALUE OFF
GLOBAL_VALUE OFF
...
...
mysql-test/suite/sys_vars/r/wsrep_debug_basic.result
View file @
677a1e7c
...
@@ -6,39 +6,41 @@ SET @wsrep_debug_global_saved = @@global.wsrep_debug;
...
@@ -6,39 +6,41 @@ SET @wsrep_debug_global_saved = @@global.wsrep_debug;
# default
# default
SELECT @@global.wsrep_debug;
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
@@global.wsrep_debug
0
NONE
# scope
# scope
SELECT @@session.wsrep_debug;
SELECT @@session.wsrep_debug;
ERROR HY000: Variable 'wsrep_debug' is a GLOBAL variable
ERROR HY000: Variable 'wsrep_debug' is a GLOBAL variable
SET @@global.wsrep_debug=
OFF
;
SET @@global.wsrep_debug=
0
;
SELECT @@global.wsrep_debug;
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
@@global.wsrep_debug
0
NONE
SET @@global.wsrep_debug=
ON
;
SET @@global.wsrep_debug=
1
;
SELECT @@global.wsrep_debug;
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
@@global.wsrep_debug
1
SERVER
# valid values
# valid values
SET @@global.wsrep_debug=
'OFF'
;
SET @@global.wsrep_debug=
NONE
;
SELECT @@global.wsrep_debug;
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
@@global.wsrep_debug
0
NONE
SET @@global.wsrep_debug=
ON
;
SET @@global.wsrep_debug=
SERVER
;
SELECT @@global.wsrep_debug;
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
@@global.wsrep_debug
1
SERVER
SET @@global.wsrep_debug=default;
SET @@global.wsrep_debug=default;
SELECT @@global.wsrep_debug;
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
@@global.wsrep_debug
0
NONE
# invalid values
# invalid values
SET @@global.wsrep_debug=NULL;
SET @@global.wsrep_debug=NULL;
ERROR 42000: Variable 'wsrep_debug' can't be set to the value of 'NULL'
ERROR 42000: Variable 'wsrep_debug' can't be set to the value of 'NULL'
SET @@global.wsrep_debug='junk';
SET @@global.wsrep_debug='junk';
ERROR 42000: Variable 'wsrep_debug' can't be set to the value of 'junk'
ERROR 42000: Variable 'wsrep_debug' can't be set to the value of 'junk'
SET @@global.wsrep_debug=ON;
ERROR 42000: Variable 'wsrep_debug' can't be set to the value of 'ON'
# restore the initial value
# restore the initial value
SET @@global.wsrep_debug = @wsrep_debug_global_saved;
SET @@global.wsrep_debug = @wsrep_debug_global_saved;
...
...
mysql-test/suite/sys_vars/t/wsrep_debug_basic.test
View file @
677a1e7c
...
@@ -14,16 +14,16 @@ SELECT @@global.wsrep_debug;
...
@@ -14,16 +14,16 @@ SELECT @@global.wsrep_debug;
--
echo
# scope
--
echo
# scope
--
error
ER_INCORRECT_GLOBAL_LOCAL_VAR
--
error
ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT
@@
session
.
wsrep_debug
;
SELECT
@@
session
.
wsrep_debug
;
SET
@@
global
.
wsrep_debug
=
OFF
;
SET
@@
global
.
wsrep_debug
=
0
;
SELECT
@@
global
.
wsrep_debug
;
SELECT
@@
global
.
wsrep_debug
;
SET
@@
global
.
wsrep_debug
=
ON
;
SET
@@
global
.
wsrep_debug
=
1
;
SELECT
@@
global
.
wsrep_debug
;
SELECT
@@
global
.
wsrep_debug
;
--
echo
--
echo
--
echo
# valid values
--
echo
# valid values
SET
@@
global
.
wsrep_debug
=
'OFF'
;
SET
@@
global
.
wsrep_debug
=
NONE
;
SELECT
@@
global
.
wsrep_debug
;
SELECT
@@
global
.
wsrep_debug
;
SET
@@
global
.
wsrep_debug
=
ON
;
SET
@@
global
.
wsrep_debug
=
SERVER
;
SELECT
@@
global
.
wsrep_debug
;
SELECT
@@
global
.
wsrep_debug
;
SET
@@
global
.
wsrep_debug
=
default
;
SET
@@
global
.
wsrep_debug
=
default
;
SELECT
@@
global
.
wsrep_debug
;
SELECT
@@
global
.
wsrep_debug
;
...
@@ -34,6 +34,8 @@ SELECT @@global.wsrep_debug;
...
@@ -34,6 +34,8 @@ SELECT @@global.wsrep_debug;
SET
@@
global
.
wsrep_debug
=
NULL
;
SET
@@
global
.
wsrep_debug
=
NULL
;
--
error
ER_WRONG_VALUE_FOR_VAR
--
error
ER_WRONG_VALUE_FOR_VAR
SET
@@
global
.
wsrep_debug
=
'junk'
;
SET
@@
global
.
wsrep_debug
=
'junk'
;
--
error
ER_WRONG_VALUE_FOR_VAR
SET
@@
global
.
wsrep_debug
=
ON
;
--
echo
--
echo
--
echo
# restore the initial value
--
echo
# restore the initial value
...
...
sql/sys_vars.cc
View file @
677a1e7c
...
@@ -5364,9 +5364,14 @@ static Sys_var_charptr Sys_wsrep_dbug_option(
...
@@ -5364,9 +5364,14 @@ static Sys_var_charptr Sys_wsrep_dbug_option(
GLOBAL_VAR
(
wsrep_dbug_option
),
CMD_LINE
(
REQUIRED_ARG
),
GLOBAL_VAR
(
wsrep_dbug_option
),
CMD_LINE
(
REQUIRED_ARG
),
IN_SYSTEM_CHARSET
,
DEFAULT
(
""
));
IN_SYSTEM_CHARSET
,
DEFAULT
(
""
));
static
Sys_var_mybool
Sys_wsrep_debug
(
static
const
char
*
wsrep_debug_names
[]
=
"wsrep_debug"
,
"To enable debug level logging"
,
{
"NONE"
,
"SERVER"
,
"TRANSACTION"
,
"STREAMING"
,
"CLIENT"
,
NullS
};
GLOBAL_VAR
(
wsrep_debug
),
CMD_LINE
(
OPT_ARG
),
DEFAULT
(
FALSE
));
static
Sys_var_enum
Sys_wsrep_debug
(
"wsrep_debug"
,
"WSREP debug level logging"
,
GLOBAL_VAR
(
wsrep_debug
),
CMD_LINE
(
REQUIRED_ARG
),
wsrep_debug_names
,
DEFAULT
(
0
),
NO_MUTEX_GUARD
,
NOT_IN_BINLOG
,
ON_CHECK
(
0
),
ON_UPDATE
(
wsrep_debug_update
));
static
Sys_var_mybool
Sys_wsrep_convert_LOCK_to_trx
(
static
Sys_var_mybool
Sys_wsrep_convert_LOCK_to_trx
(
"wsrep_convert_LOCK_to_trx"
,
"To convert locking sessions "
"wsrep_convert_LOCK_to_trx"
,
"To convert locking sessions "
...
...
sql/wsrep_mysqld.cc
View file @
677a1e7c
...
@@ -85,7 +85,7 @@ const char *wsrep_data_home_dir;
...
@@ -85,7 +85,7 @@ const char *wsrep_data_home_dir;
const
char
*
wsrep_dbug_option
;
const
char
*
wsrep_dbug_option
;
const
char
*
wsrep_notify_cmd
;
const
char
*
wsrep_notify_cmd
;
my_bool
wsrep_debug
;
// Enable d
ebug level logging
ulong
wsrep_debug
;
// D
ebug level logging
my_bool
wsrep_convert_LOCK_to_trx
;
// Convert locking sessions to trx
my_bool
wsrep_convert_LOCK_to_trx
;
// Convert locking sessions to trx
my_bool
wsrep_auto_increment_control
;
// Control auto increment variables
my_bool
wsrep_auto_increment_control
;
// Control auto increment variables
my_bool
wsrep_drupal_282555_workaround
;
// Retry autoinc insert after dupkey
my_bool
wsrep_drupal_282555_workaround
;
// Retry autoinc insert after dupkey
...
@@ -638,6 +638,7 @@ int wsrep_init_server()
...
@@ -638,6 +638,7 @@ int wsrep_init_server()
working_dir
,
working_dir
,
initial_position
,
initial_position
,
wsrep_max_protocol_version
);
wsrep_max_protocol_version
);
Wsrep_server_state
::
instance
().
debug_log_level
(
wsrep_debug
);
}
}
catch
(
const
wsrep
::
runtime_error
&
e
)
catch
(
const
wsrep
::
runtime_error
&
e
)
{
{
...
...
sql/wsrep_mysqld.h
View file @
677a1e7c
...
@@ -64,7 +64,7 @@ extern const char* wsrep_data_home_dir;
...
@@ -64,7 +64,7 @@ extern const char* wsrep_data_home_dir;
extern
const
char
*
wsrep_dbug_option
;
extern
const
char
*
wsrep_dbug_option
;
extern
long
wsrep_slave_threads
;
extern
long
wsrep_slave_threads
;
extern
int
wsrep_slave_count_change
;
extern
int
wsrep_slave_count_change
;
extern
MYSQL_PLUGIN_IMPORT
my_bool
wsrep_debug
;
extern
ulong
wsrep_debug
;
extern
my_bool
wsrep_convert_LOCK_to_trx
;
extern
my_bool
wsrep_convert_LOCK_to_trx
;
extern
ulong
wsrep_retry_autocommit
;
extern
ulong
wsrep_retry_autocommit
;
extern
my_bool
wsrep_auto_increment_control
;
extern
my_bool
wsrep_auto_increment_control
;
...
...
sql/wsrep_var.cc
View file @
677a1e7c
...
@@ -430,6 +430,12 @@ bool wsrep_reject_queries_update(sys_var *self, THD* thd, enum_var_type type)
...
@@ -430,6 +430,12 @@ bool wsrep_reject_queries_update(sys_var *self, THD* thd, enum_var_type type)
return
false
;
return
false
;
}
}
bool
wsrep_debug_update
(
sys_var
*
self
,
THD
*
thd
,
enum_var_type
type
)
{
Wsrep_server_state
::
instance
().
debug_log_level
(
wsrep_debug
);
return
false
;
}
static
int
wsrep_cluster_address_verify
(
const
char
*
cluster_address_str
)
static
int
wsrep_cluster_address_verify
(
const
char
*
cluster_address_str
)
{
{
/* There is no predefined address format, it depends on provider. */
/* There is no predefined address format, it depends on provider. */
...
...
sql/wsrep_var.h
View file @
677a1e7c
...
@@ -100,6 +100,8 @@ extern bool wsrep_max_ws_size_update UPDATE_ARGS;
...
@@ -100,6 +100,8 @@ extern bool wsrep_max_ws_size_update UPDATE_ARGS;
extern
bool
wsrep_reject_queries_update
UPDATE_ARGS
;
extern
bool
wsrep_reject_queries_update
UPDATE_ARGS
;
extern
bool
wsrep_debug_update
UPDATE_ARGS
;
#else
/* WITH_WSREP */
#else
/* WITH_WSREP */
#define wsrep_provider_init(X)
#define wsrep_provider_init(X)
...
...
wsrep-lib
@
af8383da
Subproject commit
20b52ff1ddc3b2f547b7081471f46dcfa5efabc7
Subproject commit
af8383daf03bee80b8e54ce207fa9ef1f9d83f94
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