Bug #43835 SHOW VARIABLES does not include 0 for slave_skip_errors
Submitted: 24 Mar 2009 15:27 Modified: 15 May 2009 23:49
Reporter: Scott Noyes Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:5.1.30 OS:Any
Assigned to: Tatiana Azundris Nuernberg CPU Architecture:Any
Triage: Triaged: D2 (Serious)

[24 Mar 2009 15:27] Scott Noyes
Description:
Starting the server with --slave-skip-errors=0 does not report 0 in the SHOW VARIABLES output like it should. This setting allows the slave to continue if a statement on the master errors and is written to the binary log, but does not cause an error on the slave (for example, create a MyISAM table with a primary key, drop the primary key on the slave, and then insert two rows with identical values on the master)

Note that the behavior works correctly as far as skipping the error; it is only the SHOW VARIABLES output that is incorrect.

How to repeat:
mysqld --slave-skip-errors=0

mysql> SHOW VARIABLES LIKE 'slave_skip_errors';
+-------------------+-------+
| Variable_name     | Value |
+-------------------+-------+
| slave_skip_errors |       |
+-------------------+-------+
1 row in set (0.00 sec)

Suggested fix:
Add '0' to the variables output if the server has been started with it.
[6 Apr 2009 11:42] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/71440

2853 Tatiana A. Nurnberg	2009-04-06
      Bug#43835: SHOW VARIABLES does not include 0 for slave_skip_errors
      
      We didn't expect "error: no error", although this is
      in fact a legitimate state (if something is erroneous
      on the master, but not on the slave, e.g. INSERT fails
      on master due to UNIQUE constraint which does not exist
      on slave).
      
      We now list the ignore for "0: no error" the same way
      as any other ignore; moreover, if no or an empty
      --slave-skip-errors is passed at start-up, we show
      "OFF" instead of empty list, as intended. (The code
      for that was there, but was only run for the empty-
      argument case, even if it subsequently tested for
      both conditions.) 
     @ mysql-test/r/not_embedded_server.result
        Show that passing no --slave-skip-errors results
        in "OFF" being shown as the variable's value. This
        test's "twin" (also not embedded, but setting
        --slave-skip-errors in its -opt file) lives in
        variables-notembbeded.test.
     @ mysql-test/r/variables-notembedded.result
        Show that error-ignore 0 is handled just like any other
        ignore. This test's "twin" (also not embedded, but not
        setting --slave-skip-errors in its -opt file) lives in
        not_embbeded_server.test.
     @ mysql-test/t/not_embedded_server.test
        Show that passing no --slave-skip-errors results
        in "OFF" being shown as the variable's value.
     @ mysql-test/t/variables-notembedded-master.opt
        Show that error-ignore 0 is handled just like any other
        ignore.
     @ sql/slave.cc
        - set up error-ignore-info even if --slave-skip-errors
          was not passed at start-up.
        
        - handle error 0 just like any other error.
[14 Apr 2009 15:20] Tatiana Azundris Nuernberg
patch queued for 5.1.35, 6.0.11 in -bugteam
[5 May 2009 19:40] Bugs System
Pushed into 5.1.35 (revid:davi.arnaut@sun.com-20090505190206-9xmh7dlc6kom8exp) (version source revid:davi.arnaut@sun.com-20090505190206-9xmh7dlc6kom8exp) (merge vers: 5.1.35) (pib:6)
[6 May 2009 14:12] Bugs System
Pushed into 6.0.12-alpha (revid:svoj@sun.com-20090506125450-yokcmvqf2g7jhujq) (version source revid:azundris@mysql.com-20090414214857-7zbsbyylr8axi7xg) (merge vers: 6.0.11-alpha) (pib:6)
[15 May 2009 23:49] Paul Dubois
Noted in 5.1.35, 6.0.12 changelogs.

SHOW VARIABLES did not properly display the value of
slave_skip_errors.
[15 Jun 2009 8:26] Bugs System
Pushed into 5.1.35-ndb-6.3.26 (revid:jonas@mysql.com-20090615074202-0r5r2jmi83tww6sf) (version source revid:jonas@mysql.com-20090615070837-9pccutgc7repvb4d) (merge vers: 5.1.35-ndb-6.3.26) (pib:6)
[15 Jun 2009 9:06] Bugs System
Pushed into 5.1.35-ndb-7.0.7 (revid:jonas@mysql.com-20090615074335-9hcltksp5cu5fucn) (version source revid:jonas@mysql.com-20090615072714-rmfkvrbbipd9r32c) (merge vers: 5.1.35-ndb-7.0.7) (pib:6)
[15 Jun 2009 9:47] Bugs System
Pushed into 5.1.35-ndb-6.2.19 (revid:jonas@mysql.com-20090615061520-sq7ds4yw299ggugm) (version source revid:jonas@mysql.com-20090615054654-ebgpz7elwu1xj36j) (merge vers: 5.1.35-ndb-6.2.19) (pib:6)