Bug #64450 ndb_log_apply_status can be changed online, even though it is not dynamic
Submitted: 24 Feb 2012 19:59 Modified: 27 Feb 2012 9:52
Reporter: Kolbe Kegel Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:7.2.4 OS:Any
Assigned to: CPU Architecture:Any
Tags: cluster, ndb

[24 Feb 2012 19:59] Kolbe Kegel
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 */
);
[27 Feb 2012 9:52] Valeriy Kravchuk
Thank you for the problem report. Verified by code review.