Commit 35756182 authored by Nirbhay Choubey's avatar Nirbhay Choubey

Post merge fixes.

parent 90266e8a
......@@ -28,4 +28,5 @@ galera_flush : mysql-wsrep/issues/229
galera_transaction_read_only : mysql-wsrep/issues/229
galera_gcs_fragment : Incorrect arguments to SET
galera_flush_local : Fails sporadically
galera_binlog_stmt_autoinc : TODO: investigate
\ No newline at end of file
galera_binlog_stmt_autoinc : TODO: investigate
galera_concurrent_ctas : Test times out, investigate
......@@ -170,10 +170,10 @@ localhost foo role3 Y
localhost root role1 Y
localhost root role2 Y
SELECT * FROM INFORMATION_SCHEMA.APPLICABLE_ROLES;
GRANTEE ROLE_NAME IS_GRANTABLE
role1 role4 YES
root@localhost role1 YES
root@localhost role2 YES
GRANTEE ROLE_NAME IS_GRANTABLE IS_DEFAULT
role1 role4 YES NULL
root@localhost role1 YES NO
root@localhost role2 YES NO
# On node_2
SELECT * FROM mysql.roles_mapping;
......@@ -183,10 +183,10 @@ localhost foo role3 Y
localhost root role1 Y
localhost root role2 Y
SELECT * FROM INFORMATION_SCHEMA.APPLICABLE_ROLES;
GRANTEE ROLE_NAME IS_GRANTABLE
role1 role4 YES
root@localhost role1 YES
root@localhost role2 YES
GRANTEE ROLE_NAME IS_GRANTABLE IS_DEFAULT
role1 role4 YES NULL
root@localhost role1 YES NO
root@localhost role2 YES NO
DROP ROLE role1;
DROP ROLE role2;
DROP ROLE role3;
......
......@@ -24,7 +24,7 @@ SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue';
--connection node_1b
--sleep 2
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'exit open_tables()' and INFO = 'SET GLOBAL wsrep_desync=1'
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = 'SET GLOBAL wsrep_desync=1'
--source include/wait_condition.inc
SET DEBUG_SYNC= 'now SIGNAL continue';
......
......@@ -60,7 +60,7 @@ SET DEBUG_SYNC = 'alter_table_before_create_table_no_lock WAIT_FOR continue';
--connection node_1b
--sleep 2
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'exit open_tables()' and INFO = 'SET GLOBAL wsrep_desync=1'
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = 'SET GLOBAL wsrep_desync=1'
--source include/wait_condition.inc
SET DEBUG_SYNC= 'now SIGNAL continue';
......
......@@ -241,13 +241,13 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_MAX_WS_ROWS
SESSION_VALUE NULL
GLOBAL_VALUE 131072
GLOBAL_VALUE 0
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 131072
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Max number of rows in write set
NUMERIC_MIN_VALUE 1
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
......@@ -255,14 +255,14 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_MAX_WS_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 1073741824
GLOBAL_VALUE 2147483647
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1073741824
DEFAULT_VALUE 2147483647
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Max write set size (bytes)
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 4294901759
NUMERIC_MAX_VALUE 2147483647
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
......@@ -367,7 +367,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_PATCH_VERSION
SESSION_VALUE NULL
GLOBAL_VALUE wsrep_25.13
GLOBAL_VALUE wsrep_25.16
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
......
......@@ -24,8 +24,6 @@ SELECT @@global.wsrep_desync;
# valid values
SET @@global.wsrep_desync='OFF';
Warnings:
Warning 1231 'wsrep_desync' is already OFF.
SELECT @@global.wsrep_desync;
@@global.wsrep_desync
0
......@@ -35,8 +33,6 @@ SELECT @@global.wsrep_desync;
@@global.wsrep_desync
0
SET @@global.wsrep_desync=default;
Warnings:
Warning 1231 'wsrep_desync' is already OFF.
SELECT @@global.wsrep_desync;
@@global.wsrep_desync
0
......
#
# wsrep_max_ws_size
#
# save the initial value
SET @wsrep_max_ws_size_global_saved = @@global.wsrep_max_ws_size;
SET @wsrep_provider_options_saved = @@global.wsrep_provider_options;
# default
SELECT @@global.wsrep_max_ws_size;
@@global.wsrep_max_ws_size
......@@ -13,28 +10,29 @@ SELECT @@global.wsrep_max_ws_size;
SELECT @@session.wsrep_max_ws_size;
ERROR HY000: Variable 'wsrep_max_ws_size' is a GLOBAL variable
SET @@global.wsrep_max_ws_size=1;
Warnings:
Warning 1292 Truncated incorrect wsrep_max_ws_size value: '1'
ERROR HY000: WSREP (galera) not started
SELECT @@global.wsrep_max_ws_size;
@@global.wsrep_max_ws_size
1024
2147483647
# valid values
SET @@global.wsrep_max_ws_size=1073741824;
ERROR HY000: WSREP (galera) not started
SELECT @@global.wsrep_max_ws_size;
@@global.wsrep_max_ws_size
1073741824
2147483647
SET @@global.wsrep_max_ws_size=1073741825;
ERROR HY000: WSREP (galera) not started
SELECT @@global.wsrep_max_ws_size;
@@global.wsrep_max_ws_size
1073741825
2147483647
SET @@global.wsrep_max_ws_size=0;
Warnings:
Warning 1292 Truncated incorrect wsrep_max_ws_size value: '0'
ERROR HY000: WSREP (galera) not started
SELECT @@global.wsrep_max_ws_size;
@@global.wsrep_max_ws_size
1024
2147483647
SET @@global.wsrep_max_ws_size=default;
ERROR HY000: WSREP (galera) not started
SELECT @global.wsrep_max_ws_size;
@global.wsrep_max_ws_size
NULL
......@@ -48,13 +46,8 @@ SELECT @global.wsrep_max_ws_size;
@global.wsrep_max_ws_size
NULL
SET @@global.wsrep_max_ws_size=-1;
Warnings:
Warning 1292 Truncated incorrect wsrep_max_ws_size value: '-1'
ERROR HY000: WSREP (galera) not started
SELECT @global.wsrep_max_ws_size;
@global.wsrep_max_ws_size
NULL
# restore the initial value
SET @@global.wsrep_max_ws_size = @wsrep_max_ws_size_global_saved;
SET @@global.wsrep_provider_options = @wsrep_provider_options_saved;
# End of test
......@@ -4,10 +4,6 @@
--echo # wsrep_max_ws_size
--echo #
--echo # save the initial value
SET @wsrep_max_ws_size_global_saved = @@global.wsrep_max_ws_size;
SET @wsrep_provider_options_saved = @@global.wsrep_provider_options;
--echo # default
SELECT @@global.wsrep_max_ws_size;
......@@ -15,17 +11,22 @@ SELECT @@global.wsrep_max_ws_size;
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_max_ws_size;
--error ER_WRONG_ARGUMENTS
SET @@global.wsrep_max_ws_size=1;
SELECT @@global.wsrep_max_ws_size;
--echo
--echo # valid values
--error ER_WRONG_ARGUMENTS
SET @@global.wsrep_max_ws_size=1073741824;
SELECT @@global.wsrep_max_ws_size;
--error ER_WRONG_ARGUMENTS
SET @@global.wsrep_max_ws_size=1073741825;
SELECT @@global.wsrep_max_ws_size;
--error ER_WRONG_ARGUMENTS
SET @@global.wsrep_max_ws_size=0;
SELECT @@global.wsrep_max_ws_size;
--error ER_WRONG_ARGUMENTS
SET @@global.wsrep_max_ws_size=default;
SELECT @global.wsrep_max_ws_size;
......@@ -36,12 +37,8 @@ SET @@global.wsrep_max_ws_size=NULL;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_max_ws_size='junk';
SELECT @global.wsrep_max_ws_size;
--error ER_WRONG_ARGUMENTS
SET @@global.wsrep_max_ws_size=-1;
SELECT @global.wsrep_max_ws_size;
--echo
--echo # restore the initial value
SET @@global.wsrep_max_ws_size = @wsrep_max_ws_size_global_saved;
SET @@global.wsrep_provider_options = @wsrep_provider_options_saved;
--echo # End of test
......@@ -36,7 +36,6 @@ wsrep_commit_oooe #
wsrep_commit_oool #
wsrep_commit_window #
wsrep_connected #
wsrep_debug_sync_waiters #
wsrep_flow_control_paused #
wsrep_flow_control_paused_ns #
wsrep_flow_control_recv #
......@@ -92,7 +91,6 @@ wsrep_commit_oooe #
wsrep_commit_oool #
wsrep_commit_window #
wsrep_connected #
wsrep_debug_sync_waiters #
wsrep_flow_control_paused #
wsrep_flow_control_paused_ns #
wsrep_flow_control_recv #
......
......@@ -4865,8 +4865,8 @@ static Sys_var_ulong Sys_wsrep_max_ws_size (
"wsrep_max_ws_size", "Max write set size (bytes)",
GLOBAL_VAR(wsrep_max_ws_size), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(1024, WSREP_MAX_WS_SIZE), DEFAULT(WSREP_MAX_WS_SIZE),
BLOCK_SIZE(1), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(wsrep_max_ws_size_update));
BLOCK_SIZE(1), NO_MUTEX_GUARD, NOT_IN_BINLOG,
ON_CHECK(wsrep_max_ws_size_check), ON_UPDATE(wsrep_max_ws_size_update));
static Sys_var_ulong Sys_wsrep_max_ws_rows (
"wsrep_max_ws_rows", "Max number of rows in write set",
......
......@@ -170,6 +170,9 @@ extern void wsrep_prepend_PATH (const char* path);
extern wsrep_seqno_t wsrep_locked_seqno;
#define WSREP_ON \
(global_system_variables.wsrep_on)
#define WSREP_ON_NEW \
((global_system_variables.wsrep_on) && \
wsrep_provider && \
strcmp(wsrep_provider, WSREP_NONE))
......
......@@ -195,6 +195,8 @@ end:
static bool refresh_provider_options()
{
DBUG_ASSERT(wsrep);
WSREP_DEBUG("refresh_provider_options: %s",
(wsrep_provider_options) ? wsrep_provider_options : "null");
char* opts= wsrep->options_get(wsrep);
......@@ -318,18 +320,18 @@ void wsrep_provider_init (const char* value)
}
bool wsrep_provider_options_check(sys_var *self, THD* thd, set_var* var)
{
return 0;
}
bool wsrep_provider_options_update(sys_var *self, THD* thd, enum_var_type type)
{
if (wsrep == NULL)
{
my_message(ER_WRONG_ARGUMENTS, "WSREP (galera) not started", MYF(0));
return true;
}
return false;
}
bool wsrep_provider_options_update(sys_var *self, THD* thd, enum_var_type type)
{
DBUG_ASSERT(wsrep);
wsrep_status_t ret= wsrep->options_set(wsrep, wsrep_provider_options);
if (ret != WSREP_OK)
{
......@@ -522,6 +524,12 @@ bool wsrep_slave_threads_update (sys_var *self, THD* thd, enum_var_type type)
bool wsrep_desync_check (sys_var *self, THD* thd, set_var* var)
{
if (wsrep == NULL)
{
my_message(ER_WRONG_ARGUMENTS, "WSREP (galera) not started", MYF(0));
return true;
}
bool new_wsrep_desync= (bool) var->save_result.ulonglong_value;
if (wsrep_desync == new_wsrep_desync) {
if (new_wsrep_desync) {
......@@ -559,6 +567,12 @@ bool wsrep_desync_check (sys_var *self, THD* thd, set_var* var)
}
bool wsrep_desync_update (sys_var *self, THD* thd, enum_var_type type)
{
DBUG_ASSERT(wsrep);
return false;
}
bool wsrep_max_ws_size_check(sys_var *self, THD* thd, set_var* var)
{
if (wsrep == NULL)
{
......@@ -570,6 +584,8 @@ bool wsrep_desync_update (sys_var *self, THD* thd, enum_var_type type)
bool wsrep_max_ws_size_update (sys_var *self, THD *thd, enum_var_type)
{
DBUG_ASSERT(wsrep);
char max_ws_size_opt[128];
my_snprintf(max_ws_size_opt, sizeof(max_ws_size_opt),
"repl.max_ws_size=%d", wsrep_max_ws_size);
......
......@@ -92,7 +92,9 @@ extern bool wsrep_slave_threads_update UPDATE_ARGS;
extern bool wsrep_desync_check CHECK_ARGS;
extern bool wsrep_desync_update UPDATE_ARGS;
extern bool wsrep_max_ws_size_check CHECK_ARGS;
extern bool wsrep_max_ws_size_update UPDATE_ARGS;
#else /* WITH_WSREP */
#define WSREP_NONE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment