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
00afd639
Commit
00afd639
authored
Mar 12, 2015
by
Teemu Ollakka
Committed by
Nirbhay Choubey
May 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refs codership/mysql-wsrep#90 made wsrep_OSU_method session variable
parent
03a8f83e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
11 additions
and
21 deletions
+11
-21
sql/handler.cc
sql/handler.cc
+2
-2
sql/sql_class.cc
sql/sql_class.cc
+0
-2
sql/sql_class.h
sql/sql_class.h
+1
-1
sql/sys_vars.cc
sql/sys_vars.cc
+1
-1
sql/wsrep_mysqld.cc
sql/wsrep_mysqld.cc
+5
-11
sql/wsrep_mysqld.h
sql/wsrep_mysqld.h
+0
-1
sql/wsrep_thd.cc
sql/wsrep_thd.cc
+2
-2
sql/wsrep_var.cc
sql/wsrep_var.cc
+0
-1
No files found.
sql/handler.cc
View file @
00afd639
...
...
@@ -6233,8 +6233,8 @@ int ha_wsrep_abort_transaction(THD *bf_thd, THD *victim_thd, my_bool signal)
{
DBUG_ENTER
(
"ha_wsrep_abort_transaction"
);
if
(
!
WSREP
(
bf_thd
)
&&
!
(
bf_thd
->
wsrep_OSU_method
==
WSREP_OSU_RSU
&&
bf_thd
->
wsrep_exec_mode
==
TOTAL_ORDER
))
{
!
(
bf_thd
->
variables
.
wsrep_OSU_method
==
WSREP_OSU_RSU
&&
bf_thd
->
wsrep_exec_mode
==
TOTAL_ORDER
))
{
DBUG_RETURN
(
0
);
}
...
...
sql/sql_class.cc
View file @
00afd639
...
...
@@ -1203,7 +1203,6 @@ THD::THD()
wsrep_consistency_check
=
NO_CONSISTENCY_CHECK
;
wsrep_status_vars
=
0
;
wsrep_mysql_replicated
=
0
;
wsrep_OSU_method
=
WSREP_OSU_NONE
;
wsrep_TOI_pre_query
=
NULL
;
wsrep_TOI_pre_query_len
=
0
;
#endif
...
...
@@ -1610,7 +1609,6 @@ void THD::init(void)
wsrep_PA_safe
=
true
;
wsrep_consistency_check
=
NO_CONSISTENCY_CHECK
;
wsrep_mysql_replicated
=
0
;
wsrep_OSU_method
=
WSREP_OSU_NONE
;
wsrep_TOI_pre_query
=
NULL
;
wsrep_TOI_pre_query_len
=
0
;
...
...
sql/sql_class.h
View file @
00afd639
...
...
@@ -657,6 +657,7 @@ typedef struct system_variables
my_bool
wsrep_dirty_reads
;
uint
wsrep_sync_wait
;
ulong
wsrep_retry_autocommit
;
ulong
wsrep_OSU_method
;
#endif
double
long_query_time_double
;
...
...
@@ -2792,7 +2793,6 @@ class THD :public Statement,
wsrep_consistency_check
;
wsrep_stats_var
*
wsrep_status_vars
;
int
wsrep_mysql_replicated
;
ulong
wsrep_OSU_method
;
const
char
*
wsrep_TOI_pre_query
;
/* a query to apply before
the actual TOI query */
size_t
wsrep_TOI_pre_query_len
;
...
...
sql/sys_vars.cc
View file @
00afd639
...
...
@@ -4682,7 +4682,7 @@ static Sys_var_uint Sys_wsrep_sync_wait(
static const char *wsrep_OSU_method_names[]= { "
TOI
", "
RSU
", NullS };
static Sys_var_enum Sys_wsrep_OSU_method(
"
wsrep_OSU_method
", "
Method
for
Online
Schema
Upgrade
",
GLOBAL_VAR(wsrep_OSU_method_options
), CMD_LINE(OPT_ARG),
SESSION_VAR(wsrep_OSU_method
), CMD_LINE(OPT_ARG),
wsrep_OSU_method_names, DEFAULT(WSREP_OSU_TOI),
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(0));
...
...
sql/wsrep_mysqld.cc
View file @
00afd639
...
...
@@ -1392,12 +1392,6 @@ int wsrep_to_isolation_begin(THD *thd, char *db_, char *table_,
thd
->
query
(),
thd
->
thread_id
);
}
/*
Save current global value into thd to persist the used method
even if global wsrep_OSU_method_options changes during isolation
*/
thd
->
wsrep_OSU_method
=
wsrep_OSU_method_options
;
/*
It makes sense to set auto_increment_* to defaults in TOI operations.
Must be done before wsrep_TOI_begin() since Query_log_event encapsulating
...
...
@@ -1413,12 +1407,13 @@ int wsrep_to_isolation_begin(THD *thd, char *db_, char *table_,
if
(
thd
->
variables
.
wsrep_on
&&
thd
->
wsrep_exec_mode
==
LOCAL_STATE
)
{
switch
(
thd
->
wsrep_OSU_method
)
{
switch
(
thd
->
variables
.
wsrep_OSU_method
)
{
case
WSREP_OSU_TOI
:
ret
=
wsrep_TOI_begin
(
thd
,
db_
,
table_
,
table_list
);
break
;
case
WSREP_OSU_RSU
:
ret
=
wsrep_RSU_begin
(
thd
,
db_
,
table_
);
break
;
default:
WSREP_ERROR
(
"Unsupported OSU method: %lu"
,
thd
->
wsrep_OSU_method
);
WSREP_ERROR
(
"Unsupported OSU method: %lu"
,
thd
->
variables
.
wsrep_OSU_method
);
ret
=
-
1
;
break
;
}
...
...
@@ -1440,18 +1435,17 @@ void wsrep_to_isolation_end(THD *thd)
{
if
(
thd
->
wsrep_exec_mode
==
TOTAL_ORDER
)
{
switch
(
thd
->
wsrep_OSU_method
)
switch
(
thd
->
variables
.
wsrep_OSU_method
)
{
case
WSREP_OSU_TOI
:
wsrep_TOI_end
(
thd
);
break
;
case
WSREP_OSU_RSU
:
wsrep_RSU_end
(
thd
);
break
;
default:
WSREP_WARN
(
"Unsupported wsrep OSU method at isolation end: %lu"
,
thd
->
wsrep_OSU_method
);
thd
->
variables
.
wsrep_OSU_method
);
break
;
}
wsrep_cleanup_transaction
(
thd
);
}
thd
->
wsrep_OSU_method
=
WSREP_OSU_NONE
;
}
#define WSREP_MDL_LOG(severity, msg, req, gra) \
...
...
sql/wsrep_mysqld.h
View file @
00afd639
...
...
@@ -96,7 +96,6 @@ extern my_bool wsrep_certify_nonPK;
extern
long
wsrep_max_protocol_version
;
extern
long
wsrep_protocol_version
;
extern
ulong
wsrep_forced_binlog_format
;
extern
ulong
wsrep_OSU_method_options
;
extern
my_bool
wsrep_desync
;
extern
my_bool
wsrep_recovery
;
extern
my_bool
wsrep_replicate_myisam
;
...
...
sql/wsrep_thd.cc
View file @
00afd639
...
...
@@ -575,8 +575,8 @@ int wsrep_abort_thd(void *bf_thd_ptr, void *victim_thd_ptr, my_bool signal)
DBUG_ENTER
(
"wsrep_abort_thd"
);
if
(
(
WSREP
(
bf_thd
)
||
(
(
WSREP_ON
||
bf_thd
->
wsrep_OSU_method
==
WSREP_OSU_RSU
)
&&
bf_thd
->
wsrep_exec_mode
==
TOTAL_ORDER
)
)
&&
(
(
WSREP_ON
||
bf_thd
->
variables
.
wsrep_OSU_method
==
WSREP_OSU_RSU
)
&&
bf_thd
->
wsrep_exec_mode
==
TOTAL_ORDER
)
)
&&
victim_thd
)
{
WSREP_DEBUG
(
"wsrep_abort_thd, by: %llu, victim: %llu"
,
(
bf_thd
)
?
...
...
sql/wsrep_var.cc
View file @
00afd639
...
...
@@ -35,7 +35,6 @@ const char* wsrep_node_name = 0;
const
char
*
wsrep_node_address
=
0
;
const
char
*
wsrep_node_incoming_address
=
0
;
const
char
*
wsrep_start_position
=
0
;
ulong
wsrep_OSU_method_options
;
int
wsrep_init_vars
()
{
...
...
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