mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-22203: WSREP_ON is unnecessarily expensive to evaluate
Replaced WSREP_ON macro by single global variable WSREP_ON that is then updated at server statup and on wsrep_on and wsrep_provider update functions.
This commit is contained in:
@ -1753,7 +1753,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
{
|
||||
mysqld_stmt_bulk_execute(thd, packet, packet_length);
|
||||
#ifdef WITH_WSREP
|
||||
if (WSREP_ON)
|
||||
if (WSREP(thd))
|
||||
{
|
||||
(void)wsrep_after_statement(thd);
|
||||
}
|
||||
@ -1764,7 +1764,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
{
|
||||
mysqld_stmt_execute(thd, packet, packet_length);
|
||||
#ifdef WITH_WSREP
|
||||
if (WSREP_ON)
|
||||
if (WSREP(thd))
|
||||
{
|
||||
(void)wsrep_after_statement(thd);
|
||||
}
|
||||
@ -1822,7 +1822,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
break;
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
if (WSREP_ON)
|
||||
if (WSREP(thd))
|
||||
{
|
||||
if (wsrep_mysql_parse(thd, thd->query(), thd->query_length(),
|
||||
&parser_state,
|
||||
@ -1924,7 +1924,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
parser_state.reset(beginning_of_next_stmt, length);
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
if (WSREP_ON)
|
||||
if (WSREP(thd))
|
||||
{
|
||||
if (wsrep_mysql_parse(thd, beginning_of_next_stmt,
|
||||
length, &parser_state,
|
||||
|
Reference in New Issue
Block a user