I have checked the code of 5.1 (current head version of 5.1 branch in
launchpad), and it don't seem to fill missing attributes automatically
when RBR is used.
The patch (http://lists.mysql.com/commits/40151) of bug 33055
(http://bugs.mysql.com/bug.php?id=33055) does the following change to
- if (file->ha_table_flags() & HA_PRIMARY_KEY_REQUIRED_FOR_DELETE)
+ if (file->ha_table_flags() & HA_PRIMARY_KEY_REQUIRED_FOR_DELETE ||
+ mysql_bin_log.is_open() && in_use &&
This patch has been pushed into 6.0. However,
st_table::mar_columns_needed_for_update don't have this change.
It seems that if my storage engine mark the
HA_PRIMARY_KEY_REQUIRED_FOR_DELETE flag in table_flags, then the
server will add primary key to binlog automatically, which is just
what we need.
On Fri, Nov 20, 2009 at 4:04 PM, Mats Kindahl <mats@stripped> wrote:
> Hi Yuan,
> In 5.1, the full row is sent over to the slave, so I am a little surprised that
> there is anything missing at all.
> Do you have an example I can look at?
> Best wishes,
> Mats Kindahl
> Yuan Wang wrote:
>> We are developed a storage engine using row based replication. During
>> the test we found that primary key values will not be included in the
>> binlog event. So the slave is impossible to identify which row to
>> Is this a bug or is there a flag to tell MySQL to include primary key?
>> We are based on 5.1.33 currently.
> Mats Kindahl
> Senior Software Engineer
> Database Technology Group
> Sun Microsystems