Description:
It is possible to change the ndb_log_apply_status variable online, even though the variable is not "dynamic". The reference manual (semi-correctly, apparently?) claims that this variable is not dynamic. Despite the fact that it is possible to change the value of this variable on a running MySQL server using SET GLOBAL, the behavior of the server with respect to this variable is not altered. The behavior specified at startup, if any, else the default, persists even though the variable has been changed.
This same thing applies to numerous other Cluster settings/variables, including ndb-log-transaction-id (also changeable online but marked as not dynamic in the reference manual).
How to repeat:
select @@ndb_log_apply_status;
set global ndb_log_apply_status = @@ndb_log_apply_status ^ 1;
select @@ndb_log_apply_status;
Suggested fix:
If this variable is not meant to be dynamic, it should be configured as such when set up in sql/ha_ndbcluster.cc:
static MYSQL_SYSVAR_BOOL(
log_apply_status, /* name */
opt_ndb_log_apply_status, /* var */
PLUGIN_VAR_OPCMDARG,
"Log ndb_apply_status updates from Master in the Binlog",
NULL, /* check func. */
NULL, /* update func. */
0 /* default */
);
should instead probably be:
static MYSQL_SYSVAR_BOOL(
log_apply_status, /* name */
opt_ndb_log_apply_status, /* var */
PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
"Log ndb_apply_status updates from Master in the Binlog",
NULL, /* check func. */
NULL, /* update func. */
0 /* default */
);