wsrep_check_opts doesn't check for default values

Bug #1243228 reported by Raghavendra D Prabhu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Confirmed
Low
Unassigned
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Fix Released
Undecided
Unassigned
5.6
Fix Released
Undecided
Unassigned

Bug Description

As discussed in https://bugs.launchpad.net/percona-xtradb-cluster/+bug/1242867/comments/3 (and comment before that), wsrep_check_opts only checks if the opt/value has been specified in cnf or command line explicitly.

For example, binlog_format is STATEMENT by default. So, if it is not set in my.cnf, it doesn't fail, only when it is explicitly set it fails.

============
sudo /pxc/bin/mysqld --defaults-file=/pxc/etc/my.cnf.local --basedir=/pxc --user=mysql --wsrep-cluster-address="gcomm://?pc.ignore_sb=true" --wsrep-start-position='5805bbc4-3038-11e3-937d-aa946afe7370:100' --binlog_format=MIXED
131022 19:29:24 [Warning] WSREP: wsrep_sst_receive_address is set to '127.0.0.1:4001' which makes it impossible for another host to reach this one. Please set it to the address which this node can be connected at by other cluster members.
131022 19:29:24 [ERROR] WSREP: Only binlog_format = 'ROW' is currently supported. Configured value: 'MIXED'. Please adjust your configuration.
131022 19:29:24 [ERROR] Aborting
======================

So, it needs to be either fixed to check for default values or the default have to be adjusted appropriately. Latter is simpler but may break compatibility with mysql.

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Also, even though it may be fine to set defaults, it may be problematic when that pxc node is used as an async slave or for any other purpose.

Specifically, following options:

"wsrep_slave_threads", "1"
"bind_address", "0.0.0.0"
"wsrep_sst_method", "rsync"
"wsrep_sst_receive_address","AUTO"
"binlog_format", "ROW"
"wsrep_provider", "none"
"query_cache_type", "0"
"query_cache_size", "0"
"locked_in_memory", "0"
"wsrep_cluster_address", "0"
"locks_unsafe_for_binlog", "0"
"autoinc_lock_mode", "1"

Out of the above, the options with bad defaults are:

"binlog_format", (STATEMENT)
"query_cache_type", (1)
"autoinc_lock_mode" (1)

==============================

This should also avoid people crashing their nodes with bad
defaults and reporting bugs on that :) (seen many bugs with STMT
binlog_format).

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Since the defaults are for the above three variables are values which are not just bad but also incorrect (for galera), adjusting defaults makes sense here.

Changed in codership-mysql:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Since, following are required for proper functioning, changed as following:

"binlog_format", (STATEMENT) => ROW
"autoinc_lock_mode" (1) => 2

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

The " "autoinc_lock_mode" (1) => 2" has been added but wsrep logic prevents it when parallel threads are there. Hence, this change has not been noted in documentation (so you still need to provide in my.cnf). This will be dealt with in a separate issue.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1486

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.