Hi Matthew,

On 16/07/2013 21:21, Matthew Ward wrote:
I've noticed a weird issue in our chained replication environment where when 
setting user-defined variables, the first time the variable is used in a 
session the value is NULL, but all uses thereafter work correctly.
<snip>
The first time I run this insert, the value is correctly inserted in to master1 
and its slave, master3 (as you'd expect). However, a NULL value is inserted 
into master3-slave1. However, if I run the INSERT a second time (just the 
insert, no re-declaration of the user-defined variable), the value is correctly 
inserted in to all three servers, so that the contents of test_table on the 
three servers looks as follows:
<snip>
Is this a known issue in MySQL with chained replication like this, or have I 
discovered a bug?

Do you happen to have any table level replication filters? If so it sounds like you are affected by a bug that was fixed in 5.5.32 (https://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-32.html):

*Replication:*Running the server with both the|--log-slave-updates| <http://dev.mysql.com/doc/refman/5.5/en/replication-options-slave.html#option_mysqld_log-slave-updates>and|--replicate-wild-ignore-table| <http://dev.mysql.com/doc/refman/5.5/en/replication-options-slave.html#option_mysqld_replicate-wild-ignore-table>options in some cases caused updates to user variables not to be logged.

(Note: at least replicate-ignore-table is also triggering that bug).

Best regards,
Jesper Krogh
MySQL Support

Reply via email to