Bug #22101 | Extra Slave Col: Slave only checks first extra col for default value | ||
---|---|---|---|
Submitted: | 7 Sep 2006 23:26 | Modified: | 19 Feb 2007 11:53 |
Reporter: | Jonathan Miller | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Row Based Replication ( RBR ) | Severity: | S2 (Serious) |
Version: | 5.1.12-new-rpl | OS: | Linux (Linux 32 Bit OS) |
Assigned to: | Mats Kindahl | CPU Architecture: | Any |
[7 Sep 2006 23:26]
Jonathan Miller
[11 Sep 2006 12:36]
Jonathan Miller
This test case has been added to ./extra/rpl_tests/rpl_extraSlave_Col.test and has the failure part commented out. If the test case is checked in before a patch is created the devloper will need to uncomment the test case and test the patch.
[19 Feb 2007 11:51]
Mats Kindahl
NULL is a default value for a column, if it can be NULL. If the column is of type INT NOT NULL and the sql mode STRICT_ALL_TABLES (otherwise, almost every type has a default value even when it cannot be NULL) is in effect, the result is the following. master> show create table t2\G *************************** 1. row *************************** Table: t2 Create Table: CREATE TABLE `t2` ( `a` int(11) NOT NULL, `b` blob, `c` char(5) DEFAULT NULL, PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 1 row in set (0.00 sec) slave> show create table t2\G *************************** 1. row *************************** Table: t2 Create Table: CREATE TABLE `t2` ( `a` int(11) NOT NULL, `b` blob, `c` char(5) DEFAULT NULL, `e` int(11) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 1 row in set (0.01 sec) master> insert into t2 values (12, 'foo', 'bar'); Query OK, 1 row affected (0.01 sec) master> select * from t2; +----+------+------+ | a | b | c | +----+------+------+ | 12 | foo | bar | +----+------+------+ 1 row in set (0.00 sec) slave> show slave status\G *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event ... Slave_IO_Running: Yes Slave_SQL_Running: No ... Last_Errno: 1364 Last_Error: Error in Write_rows event: error during transaction execution on table test.t2 ... 1 row in set (0.01 sec) slave> select * from t2; Empty set (0.00 sec)
[19 Feb 2007 11:53]
Mats Kindahl
I'm closing this bug report since the demonstrated behavior is not a bug. If it turns out that there are some bug of this kind, please feel free to reopen the bug report.