present): the problem originally was that the tables in auxilliary_tables did not have
the correct real_name, which caused problems in the second call to tables_ok().
The fix corrects the real_name problem, and also sets the updating flag properly,
which makes the second call to tables_ok() unnecessary.
mysql-test/r/rpl_multi_delete2.result:
updates for for BUG#11139
mysql-test/t/rpl_multi_delete2-slave.opt:
updates for for BUG#11139
mysql-test/t/rpl_multi_delete2.test:
updates for for BUG#11139
sql/mysql_priv.h:
fix for BUG#11139 (multi-delete with alias breaking replication if table rules are
present)
sql/slave.cc:
fix for BUG#11139 (multi-delete with alias breaking replication if table rules are
present)
sql/sql_parse.cc:
fix for BUG#11139 (multi-delete with alias breaking replication if table rules are
present)
sql/sql_yacc.yy:
fix for BUG#11139 (multi-delete with alias breaking replication if table rules are
present)
In tables_ok(), when there is no table having "updating==TRUE" in the list,
return that we don't replicate this statement (the slave is supposed to
replicate *changes* only).
In practice, the case can only happen for this statement:
DELETE t FROM t,u WHERE ... ;
tables_ok(t,u) will now return 0, which (check all_tables_not_ok())
will give a chance to tables_ok(t) to run.
sql/slave.cc:
In tables_ok(), when there is no table having "updating==TRUE" in the list,
return that we don't replicate this statement (the slave is supposed to
replicate *changes* only).
In practice, the case can only happen for this statement:
DELETE t FROM t,u WHERE ... ;
tables_ok(t,u) will now return 0, which (check all_tables_not_ok())
will give a chance to tables_ok(t) to run.