Bug #48402 --ndb-wait-* options do not set mysqld variables
Submitted: 29 Oct 2009 11:00 Modified: 19 Aug 2010 9:41
Reporter: Jon Stephens Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-7.0 OS:Linux
Assigned to: Magnus Blåudd CPU Architecture:Any
Tags: 7.0.9-bk

[29 Oct 2009 11:00] Jon Stephens
Description:
--ndb-wait-connected and --ndb-wait-setup options do not appear to set any MySQL system variables.

Note that --ndb-wait-connected has been documented as setting a corresponding system variable since it was introduced.

How to repeat:
jon@grindval:~/bin/mysql-5.1-telco-7.0/bin> ./mysqld_safe --ndbcluster --ndb-connectstring=127.0.0.1 --ndb-wait-setup=100 --ndb-wait-connected=100 &
[1] 11079
jon@grindval:~/bin/mysql-5.1-telco-7.0/bin> 091029 11:49:58 mysqld_safe Logging to '/home/jon/bin/mysql-5.1-telco-7.0/var/grindval.err'.
091029 11:49:58 mysqld_safe Starting mysqld daemon with databases from /home/jon/bin/mysql-5.1-telco-7.0/var

jon@grindval:~/bin/mysql-5.1-telco-7.0/bin> ./mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.39-ndb-7.0.9 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show variables like 'ndb%';
+-------------------------------------+-----------+
| Variable_name                       | Value     |
+-------------------------------------+-----------+
| ndb_autoincrement_prefetch_sz       | 1         |
| ndb_batch_size                      | 32768     |
| ndb_cache_check_time                | 0         |
| ndb_connectstring                   | 127.0.0.1 |
| ndb_extra_logging                   | 1         |
| ndb_force_send                      | ON        |
| ndb_index_stat_cache_entries        | 32        |
| ndb_index_stat_enable               | OFF       |
| ndb_index_stat_update_freq          | 20        |
| ndb_log_binlog_index                | ON        |
| ndb_log_update_as_write             | ON        |
| ndb_log_updated_only                | ON        |
| ndb_optimization_delay              | 10        |
| ndb_optimized_node_selection        | 3         |
| ndb_report_thresh_binlog_epoch_slip | 3         |
| ndb_report_thresh_binlog_mem_usage  | 10        |
| ndb_table_no_logging                | OFF       |
| ndb_table_temporary                 | OFF       |
| ndb_use_copying_alter_table         | OFF       |
| ndb_use_exact_count                 | OFF       |
| ndb_use_transactions                | ON        |
+-------------------------------------+-----------+
21 rows in set (0.00 sec)

mysql> show status like 'ndb%';
+--------------------------------+-----------+
| Variable_name                  | Value     |
+--------------------------------+-----------+
| Ndb_cluster_node_id            | 20        |
| Ndb_config_from_host           | 127.0.0.1 |
| Ndb_config_from_port           | 1186      |
| Ndb_number_of_data_nodes       | 2         |
| Ndb_number_of_ready_data_nodes | 2         |
| Ndb_connect_count              | 0         |
| Ndb_execute_count              | 0         |
| Ndb_scan_count                 | 0         |
| Ndb_pruned_scan_count          | 0         |
| Ndb_cluster_connection_pool    | 1         |
| Ndb_conflict_fn_max            | 0         |
| Ndb_conflict_fn_old            | 0         |
+--------------------------------+-----------+
12 rows in set (0.00 sec)
mcm> exit
Bye
jon@grindval:~/bin/mysql-5.1-telco-7.0/bin> ./ndb_mgm -e show
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=1    @127.0.0.1  (mysql-5.1.39 ndb-7.0.9, Nodegroup: 0, Master)
id=2    @127.0.0.1  (mysql-5.1.39 ndb-7.0.9, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=10   @127.0.0.1  (mysql-5.1.39 ndb-7.0.9)

[mysqld(API)]   2 node(s)
id=20   @127.0.0.1  (mysql-5.1.39 ndb-7.0.9)
id=21 (not connected, accepting connect from any host)

Suggested fix:
These options should set variables that are visible in the output of SHOW VARIABLES in the mysql client.

Due to the nature of these options, the MySQL system variables should IMO probably not be dynamic.
[29 Oct 2009 11:38] Frazer Clement
When you say that they are not to be dynamic, do you mean that they cannot be changed?
Are they then only used to see what the current setting is?
[29 Oct 2009 12:54] Jon Stephens
This would be my thinking, yes... Unless someone can see a need for them (one, the other, or both of them) to be settable while mysqld is running...?
[10 Nov 2009 9:59] Hartmut Holzgraefe
Other start time only options like --init-file are visible as read only variables in SHOW VARIABLES, too ...
[14 Apr 2010 9:05] Magnus Blåudd
Will be fixed as part of WL#4775 where the system variables/arguments for ndb is move from mysqld.cc to ha_ndbcluster.cc
[18 Aug 2010 17:55] Jon Stephens
Need versions pushed to.
[19 Aug 2010 8:06] Magnus Blåudd
Pushed to 7.0.16 and 7.1.5
[19 Aug 2010 9:41] Jon Stephens
Documented in the NDB-7.0.16 and 7.1.5 changelogs as follows:

        The two MySQL Server options --ndb-wait-connected and
        --ndb-wait-setup did not set the corresponding system variables.

Closed.