set --read_only on when --super_read_only is used as command line option

Bug #1389935 reported by Roel Van de Paar
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Medium
Laurynas Biveinis
5.1
Invalid
Undecided
Unassigned
5.5
Invalid
Undecided
Unassigned
5.6
Fix Released
Medium
Laurynas Biveinis

Bug Description

* Start PS mysqld with --super_read_only
* In CLI;

============================================================================
mysql> show global variables like 'super_read_only';show global variables like 'read_only';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| super_read_only | ON |
+-----------------+-------+
1 row in set (0.00 sec)

+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| read_only | OFF | <------------------------- (!)
+---------------+-------+
1 row in set (0.00 sec)

mysql> SET GLOBAL super_read_only=OFF;
Query OK, 0 rows affected (0.00 sec)

mysql> show global variables like 'super_read_only';show global variables like 'read_only';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| super_read_only | OFF |
+-----------------+-------+
1 row in set (0.00 sec)

+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| read_only | OFF |
+---------------+-------+
1 row in set (0.00 sec)

mysql> SET GLOBAL super_read_only=ON;
Query OK, 0 rows affected (0.00 sec)

mysql> show global variables like 'super_read_only';show global variables like 'read_only';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| super_read_only | ON |
+-----------------+-------+
1 row in set (0.00 sec)

+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| read_only | ON |
+---------------+-------+
1 row in set (0.00 sec)
============================================================================

Note (!) marker. Either (imho best) the read_only should be ON when --super_read_only was used as a startup paramenter, or the manual should be improved to make it clear that if --super_read_only is used as a command line option, that it does not automatically enable --read_only.

Manual is here;
http://www.percona.com/doc/percona-server/5.6/management/super_read_only.html

description: updated
description: updated
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Must be an upstream bug, please test WebScaleSQL and report it there (https://github.com/webscalesql/webscalesql-5.6/issues).

This needs fixing as suggested, not documenting the current behavior.

tags: added: upstream
summary: - --super_read_only: to improve manual, or better, set --read_only on when
- --super_read_only is used as command line option
+ set --read_only on when --super_read_only is used as command line option
Revision history for this message
Roel Van de Paar (roel11) wrote :

Compiling webscalesql is failing. Even after installing readline-devel (it's needed), I get this;

[ 96%] Building CXX object client/CMakeFiles/mysql.dir/mysql.cc.o
/bzr/webscalesql-5.6-webscalesql-5.6.21/client/mysql.cc:1102:16: error: redefinition of 'struct _hist_entry'
 typedef struct _hist_entry {
                ^
In file included from /bzr/webscalesql-5.6-webscalesql-5.6.21/client/mysql.cc:101:0:
/usr/include/readline/history.h:46:16: error: previous definition of 'struct _hist_entry'
 typedef struct _hist_entry {
                ^
/bzr/webscalesql-5.6-webscalesql-5.6.21/client/mysql.cc:1105:13: error: invalid type in declaration before ';' token
 } HIST_ENTRY;
             ^
/bzr/webscalesql-5.6-webscalesql-5.6.21/client/mysql.cc:1105:13: error: conflicting declaration 'typedef int HIST_ENTRY'
In file included from /bzr/webscalesql-5.6-webscalesql-5.6.21/client/mysql.cc:101:0:
/usr/include/readline/history.h:50:3: error: 'HIST_ENTRY' has a previous declaration as 'typedef struct _hist_entry HIST_ENTRY'
 } HIST_ENTRY;
   ^
make[2]: *** [client/CMakeFiles/mysql.dir/mysql.cc.o] Error 1
make[1]: *** [client/CMakeFiles/mysql.dir/all] Error 2
make: *** [all] Error 2

Any ideas?

Revision history for this message
Roel Van de Paar (roel11) wrote :

If no ideas, I'll log upstream bug, which effectively halts progress on QA as there is another bug for which I need a compiled version also. Thanks

tags: added: qablock
Revision history for this message
Gary (pento) wrote :

I was able to reproduce the behaviour in comment 5, compiling WebScaleSQL 5.6.23 on Ubuntu 14.04.1 LTS.

I fixed it by installing the libedit-dev package.

tags: added: super-read-only
Revision history for this message
Roel Van de Paar (roel11) wrote :
tags: removed: qablock
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :
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/PS-1579

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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