MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Alfranio Correia Date:September 20 2009 11:37am
Subject:Re: bzr commit into mysql-pe branch (alfranio.correia:3514) WL#2687
WL#5072
View as plain text  
Hi Sven,

Thank you for the review.
I don't know why but my commit does not appear in the commit list.
Ping me tomorrow so I can recommit or send you an email with the patch.
See comments in-line.

Sven Sandberg wrote:
> Hi Alfranio,
>
> Impressive work with this patch! It's very good but I'm rejecting
> since some things can still be improved.
>
>
> SUGGESTIONS:
>
> (S1) add tests for Ce (i.e., commit fails with an error). This can be
> done by setting @@client.debug='inject_fault_writing'. The following
> scenarios would be good to test:
>
> B T N Ce
> B TN Ce
> B nT nT Ce
> B N nT T Ce
Done. I did it a little bit different.

Unfortunately, there is a bug somewhere and the rollback is not being
called.
I will file a bug report and fix this later on.
>
> (see comments inline)
>
> (S2) simplify the test case by moving 'show binlog events' into
> rpl_mixing_engines.inc (see comments inline)
done.
>
> (S3) rename Te-begin to eT and Te-end to Te, etc (see comments inline)
done.
>
> (S4) improve some comments (see comments inline)
done.
>
> (S5) verify that non-transactional updates go to the SC/binlog and not
> to the TC. You can do that by query_get_value(show master status)
> before and after each statement.
done.
>
> I think it's ok if you don't check that DDL goes directly to the
> binlog instead of to the SC. This is internal behavior, and if it
> changes the test should still pass.
I will do this later on after approving this work as we are running out
of time.
>
> (S6) I think it generates the wrong binlog entries in case 13.e: For
> "B Nte T R", it should just generate "Nte", and not "B T R". This
> looks like a server bug
No. See comments in-line.
>
> (S7) simplify the result file by using only two columns in the tables
> (see comment below)
Done.
>
> (S8) make rpl_mixed_engines.inc understand S1/R1 for 'savepoint s1'
> and 'rollback to s1' (see comment below)
>
> (S9) rpl_mixed_engines.inc still uses case-insensitive comparison
> (see, e.g., the result file where @commands='Nt': it executes NT, nT,
> and Nt).
Done.
>
> (S10) Please do 'source include/diff_tables.inc' instead of dumping
> tables manually.
It is not possible to defined multiple tables. :(
So if you don't mind I will keep the current solution.
>
>
> /Sven
>
>
> rpl_mixing_engines.test:
>> ################################################################################
>>
>> # This checks if transactions that mixes transactional and
>> non-transactional are
>> # correctly handled as follows. #
>> # Definitions:
>> #
>> #   D1. A table that has a transactional engine is called a T-table.
>> #
>> #   D2. A table that has a non-transactional engine is called an
>> #       N-table.
>> #
>> #   D3. Events are either appended to the Transaction Cache (TC) or to
>> #       the Statement Cache (SC).
>> #
>> # CALL statements are unrolled, so that each statement executed by the
>> # stored procedure is logged separately. (If a stored procedure A
>> # invokes a stored procedure B, then B is unrolled recursively).  In the
>> # following, we assume that unrolling has already been done, and the
>> # word "statement" refers to a non-CALL top-level statement or a
>> # non-CALL sub-statement.
>> #
>> # Let S be a statement that either updates a T-table or N-table.
>> #
>> # 1. Before executing S, determine unsafeness.
>> #
>> #   R1. If S reads or writes an N-table, and either S or a previous
>> #       statement in the same transaction reads or writes to a T-table,
>> #       then S is marked as unsafe.
>> #
>> # 2. When logging S, determine where to log it by applying the following
>> #   rules in order.
>> #
>> #   R2. If logging in statement format:
>> #
>> #       - If S produces an error and does not update any N-table, do
>> #         not log.
>> #
>> #       - Otherwise, if either S or any previous statement in the same
>> #         transaction reads or writes to any T-tables, log to TC.
>> #
>> #       - Otherwise, log to SC.
>> #
>> #   R3. If logging in row format:
>> #
>> #       - Log row events that update N-tables to SC.
>> #
>> #       - If S produces an error, do not log row events that update
>> #         T-tables.
>> #
>> #       - If S does not produce an error, log row events that update
>> #         T-tables to TC.
>> #
>> #   R4. At the end of S, write the SC to the binlog and clear the SC.
>> #
>> # 3. At end of transaction:
>> #
>> #   R5. At COMMIT, if the COMMIT does not produce an error:
>> #        - If the TC is non-empty, write BEGIN + TC + COMMIT to the
>> binlog.
>> #        - If the TC is empty, do nothing.
>> #
>> #   R6. At ROLLBACK or at COMMIT that produces an error:
>> #        - If the TC contains writes to N-tables, write
>> #          BEGIN + TC + ROLLBACK to the binlog.
>> #        - If the TC does not contain writes to N-tables, do nothing.
>> #
>> #   R7. Clear the TC at the end of the transaction.
>> #
>> # In addition, we have the following properties:
>> #
>> #   R8. Savepoints should not affect the content of the SC cache.
>
> (S4) I suggest using the formulation of R7 at
> http://forge.mysql.com/wiki/MySQL_Internals_Replication#Logging_transactions,
>
> it's more clear.
Done.
>
>> #
>> #   R9. CREATE * SELECT should be flushed to the binary log as an atomic
>> #   operation regarless the type of the table.
>> # # The format of the entries in the binlog depends on the mode and
>> on the type
>> # statements. In what follows, we use the following convention 
>
> (S4) I think this comment can be clarified. Something like "We use the
> include file rpl_mixing_engines.inc to generate sql commands from a
> format string. The format string consists of a sequence of 'codes'
> separated by spaces. The following codes exist:"
Done.
>
>> #
>> # - Format of the log:
>> # S - statement.
>> # R - row.
>> #
>> # - Define the scope of a transaction:
>> # B - Begin.
>> # C - Commit.
>> # R - Rollback.
>> #
>> # - Change only T-Tables:
>> # T - Updates a T-Table.
>> # T-trig - Updates T-Tables through a trigger.
>> # T-proc - Updates T-Tables through a procedure.
>> # Te-beging - Fails while updating the first tuple in a T-Table.
>> # Te-end - Fails while updating an n-tuple (n > 1) in a T-Table.
>> # Te-trig - Fails while updating an n-tuple (n > 1) in a T-Table.
>
> (S4) Suggestion: call it Te if the error happens after the
> modification and eT if the error happens before the modification.
> Currently, Te-trig is ambiguous.
Done.
>
>> #
>> # - Change only N-Tables # N - Updates a N-Table.
>> # N-trig - Updates N-Tables through a trigger.
>> # N-proc - Updates N-Tables through a procedure.
>> # Ne-beging - Fails while updating the first tuple in a N-Table.
>> # Ne-end - Fails while updating an n-tuple (n > 1) in a N-Table.
>> # Ne-trig - Fails while updating an n-tuple (n > 1) in a N-Table.
>
> (S4) Similar here, you could use eN/Ne to make it completely transparent.
Done.
>
>> #
>> # - Access both types of tables and change N-Tables:
>
> (S4) It would be more clear to write: "Read T-table and write N-table"
Done.
>
>> # Nt - Updates a N-Table
>> # Nte - Fails while updating an n-tuple (n > 1) in a N-Table.
>
> (S4) Shouldn't it be tN and tNe (the read happens before the write)?
No. Changed it to Net.
>
>> #
>> # - Access both types of tables and change N-Tables:
>
> (S4) It would be more clear to write: "Read N-table and write T-table"
Done.
>
>> # nT - Updates a T-Table.
>> # nTe - Fails while updating an n-tuple (n > 1) in a T-Table.
>> #
>> # - Access and update both types of tables. First a N-Table and the a
>> T-Table:
>> # NT - Upates both types of tables through an update statement.
>> # NT-trig - Updates both types of tables through a trigger.
>> # NT-proc - Updates both types of tables through a procedure.
>> # NTe-trig - Fails while updating an n-tuple (n > 1) in a T-Table.
>> #
>> # - Access and update both types of tables. First a T-Table and the a
>> N-Table:
>> # TN - Upates both types of tables through an update statement.
>> # TN-trig - Updates both types of tables through a trigger.
>> # TN-proc - Updates both types of tables through a procedure.
>> # TNe-trig - Fails while updating an n-tuple (n > 1) in a N-Table.
>
> (S4) I think we have to explain what "M" means, since it's used in
> comments below. Something like
I agree. Done.
>
> # M - when it is clear from the context which statement is referred to,
> #     we sometimes use "M" to denote a "Mixed" statement, i.e., one that
> #     accesses both a T-table and an N-table.

Done.
>
>> # # For further details, please, read WL#2687 and WL#5072.
>> ################################################################################
>>
>> --source include/have_innodb.inc
>>  
>> --echo
>> #########################################################################
>>
>> --echo #                            CONFIGURATION
>> --echo
>> #########################################################################
>>
>> SET @commands= 'configure';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> --echo
>> #########################################################################
>>
>> --echo #         1 - MIXING TRANSACTIONAL and NON-TRANSACTIONAL TABLES
>> --echo
>> #########################################################################
>>
>> connection master;
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #1) Generates in the binlog what follows:
>> --echo #      --> STMT  "B T C" entries, format S.
>> --echo #      --> ROW   "B T C" entries, format R.
>> --echo #      --> MIXED "B T C" entries, format S.
>> --echo #
>> SET @commands= 'T';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'T-trig';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'T-proc';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>
> (S2) I think you can make this file even simpler by moving the SHOW
> MASTER STATUS and show_binlog_events into rpl_mixing_transactions.inc.
> I.e.:
>
>   if (`SELECT @commands = ''`) {
>     let $binlog_start= $first_binlog_start;
>     --source include/show_binlog_events.inc;
>   }
>   if (`SELECT strcmp(@commands, '') != 0`)
>   {
>     if (`SELECT '$first_binlog_start' = '') {
>       let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>                                                Position, 1);
>     }
>     [...]
>   }
Done.
>
>
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #1.e) Generates in the binlog what follows:
>> --echo #        --> STMT  empty.
>> --echo #        --> ROW   empty.
>> --echo #        --> MIXED empty.
>> --echo #
>> SET @commands= 'Te-begin';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'Te-end';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'Te-trig';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #2) Generates in the binlog what follows:
>> --echo #      --> STMT  "N" entry, format S.
>> --echo #      --> ROW   "N" entry, format R.
>> --echo #      --> MIXED "N" entry, format S.
>> --echo #
>> SET @commands= 'N';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'N-trig';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'N-proc';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #2.e) Generates in the binglog what follows if a N-table is
>> changed:
>> --echo #        --> STMT  "N" entry, format S.
>> --echo #        --> ROW   "N" entry, format R.
>> --echo #        --> MIXED "N" entry, format S.
>> --echo #
>> SET @commands= 'Ne-begin';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'Ne-end';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'Ne-trig';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #3) Generates in the binglog what follows:
>> --echo #      --> STMT  "M" entry if only N-Table is changed, format S.
>> --echo #      --> STMT  "B M C" entries, format S.
>> --echo #      --> ROW   "N B T C" entries, format R.
>> --echo #      --> MIXED "N B T C" entries, format R.
>> --echo #
>> SET @commands= 'Nt';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'nT';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'NT';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'NT-trig';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'NT-proc';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'TN';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'TN-trig';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'TN-proc';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #3.e) Generates in the binglog what follows:
>> --echo #      --> STMT  "M" entry if only N-Table is changed, format S.
>> --echo #      --> STMT  "B M R" entries, format S.
>> --echo #      --> ROW   "N" entry, format R.
>> --echo #      --> MIXED "N" entry, format R.
>> SET @commands= 'Nte';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'nTe';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'NTe-trig';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'TNe-trig';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #4) Generates in the binlog what follows:
>> --echo #     --> STMT  "B T T C" entries, format S.
>> --echo #     --> ROW   "B T T C" entries, format R.
>> --echo #     --> MIXED "B T T C" entries, format S
>> --echo #
>> SET @commands= 'B T T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T T-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T T-proc C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-trig T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-trig T-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-trig T-proc C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-proc T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-proc T-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-proc T-proc C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #4.e) Generates in the binlog what follows:
>> --echo #       --> STMT  "B T C" entries, format S.
>> --echo #       --> ROW   "B T C" entries, format R.
>> --echo #       --> MIXED "B T C" entries, format S.
>> --echo #
>> SET @commands= 'B T Te-begin C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T Te-end C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T Te-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B Te-begin T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B Te-end T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B Te-trig T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #5) Generates in the binlog what follows:
>> --echo #     --> STMT  empty.
>> --echo #     --> ROW   empty.
>> --echo #     --> MIXED empty.
>> --echo #
>> SET @commands= 'B T T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T T-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T T-proc R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-trig T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-trig T-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-trig T-proc R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-proc T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-proc T-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-proc T-proc R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #5.e) Generates in the binlog what follows:
>> --echo #       --> STMT  empty.
>> --echo #       --> ROW   empty.
>> --echo #       --> MIXED empty.
>> --echo #
>> SET @commands= 'B T Te-begin R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T Te-end R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T Te-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B Te-begin T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B Te-end T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B Te-trig T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #6) Generates in the binglog what follows:
>> --echo #     --> STMT  "N N" entries, format S.
>> --echo #     --> ROW   "N N" entries, format R.
>> --echo #     --> MIXED "N N" entries, format S.
>> --echo #
>> SET @commands= 'B N N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N N-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N N-proc C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-trig N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-trig N-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-trig N-proc C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-proc N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-proc N-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-proc N-proc C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> --echo #
>> --echo #6.e) Generates in the binglog what follows if a N-Table is
>> changed:
>> --echo #     --> STMT  "N N" entries, format S.
>> --echo #     --> ROW   "N N" entries, format R.
>> --echo #     --> MIXED "N N" entries, format S.
>> --echo #
>> SET @commands= 'B N Ne-begin C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N Ne-end C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N Ne-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B Ne-begin N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B Ne-end N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B Ne-trig N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #7) Generates in the binlog what follows:
>> --echo #      --> STMT  "N N" entries, format S.
>> --echo #      --> ROW   "N N" entries, format R.
>> --echo #      --> MIXED "N N" entries, format S.
>> --echo #
>> SET @commands= 'B N N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N N-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N N-proc R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-trig N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-trig N-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-trig N-proc R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-proc N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-proc N-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-proc N-proc R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> --echo #
>> --echo #7.e) Generates in the binglog what follows if a N-Table is
>> changed:
>> --echo #     --> STMT  "N N" entries, format S.
>> --echo #     --> ROW   "N N" entries, format R.
>> --echo #     --> MIXED "N N" entries, format S.
>> --echo #
>> SET @commands= 'B N Ne-begin R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N Ne-end R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N Ne-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B Ne-begin N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B Ne-end N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B Ne-trig N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #8) Generates in the binlog what follows:
>> --echo #       --> STMT  "B T N C" entries, format S.
>> --echo #       --> ROW   "N B T C" entries, format R.
>> --echo #       --> MIXED "N B T C" entries, format R in N and S in T.
>> --echo #
>> SET @commands= 'B T N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T N-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T N-proc C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-trig N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-trig N-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-trig N-proc C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-proc N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-proc N-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-proc N-proc C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #8.e) Generates in the binlog what follows if T-* fails:
>> --echo #       --> STMT  "N" entry, format S.
>> --echo #       --> ROW   "N" entry, format R.
>> --echo #       --> MIXED "N" entry, format R.
>> --echo #     Otherwise, what follows if N-* fails and a N-Table is
>> changed:
>> --echo #       --> STMT  "B T N C" entries, format S.
>> --echo #       --> ROW   "N B T C" entries, format R.
>> --echo #       --> MIXED "N B T C" entries, format R in N and S in T.
>
> (S4) Why not split the above comment and move the last four lines to...
Although the comments are together, after the changes suggested by you I
think the output
is clear. Please, check it again and let me know if you still think this
should be changed.
>
>> --echo #
>> SET @commands= 'B Te-begin N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B Te-end N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>
> ... here?
>
>>
>> SET @commands= 'B T Ne-begin C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T Ne-end C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #9) Generates in the binlog what follows:
>> --echo #     --> STMT  "B T N R" entries, format S.
>> --echo #     --> ROW   "N" entry, format R.
>> --echo #     --> MIXED "N" entry, format R.
>> --echo #
>> SET @commands= 'B T N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T N-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T N-proc R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-trig N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-trig N-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-trig N-proc R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-proc N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-proc N-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T-proc N-proc R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #9.e) Generates in the binlog what follows if T* fails:
>> --echo #       --> STMT  "N" entry, format S.
>> --echo #       --> ROW   "N" entry, format R.
>> --echo #       --> MIXED "N" entry, format R.
>> --echo #     Otherwise, what follows if N* fails and a N-Table is
>> changed:
>> --echo #       --> STMT  "B T N R" entries, format S.
>> --echo #       --> ROW   "N" entry, format R.
>> --echo #       --> MIXED "N" entry, format R.
>
> (S4) why not split the above comment and move the last 4 lines...
Although the comments are together, after the changes suggested by you I
think the output
is clear. Please, check it again and let me know if you still think this
should be changed.
>
>> --echo #
>> SET @commands= 'B Te-begin N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B Te-end N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>
> ... here?
>
>>
>> SET @commands= 'B T Ne-begin R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T Ne-end R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #10) Generates in the binlog:
>> --echo #     --> STMT  "N B T C" entries, format S.
>> --echo #     --> ROW   "N B T C" entries, format R.
>> --echo #     --> MIXED "N B T C" entries, format S.
>> --echo #
>> SET @commands= 'B N T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N T-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N T-proc C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-trig T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-trig T-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-trig T-proc C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-proc T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-proc T-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-proc T-proc C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> --echo #
>> --echo #10.e) Check 8.e
>> --echo #
>
> (S4) Can this comment be removed?
Done.
>
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #11) Generates in the binlog what follows:
>> --echo #     --> STMT  "N N" entries, format S.
>> --echo #     --> ROW   "N N" entries, format R.
>> --echo #     --> MIXED "N N" entries, format S.
>
> (S4) This does not match what is being tested below.

Changed.
>
>> --echo #
>>
>> SET @commands= 'B N T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N T-proc R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N T-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-trig T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-trig T-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-trig T-proc R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-proc T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-proc T-proc R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N-proc T-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> --echo #
>> --echo #11.e) Check 9.e
>> --echo #
>
> (S4) Can this comment be removed?
Done.
>
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #12) "B M T C" generates in the binlog what follows:
>> --echo #      --> STMT  "M B T C" entries if in M only N-Table is
>> changed, format S.
>> --echo #      --> STMT  "B M T C" entries, format S.
>> --echo #      --> ROW   "N B T T C" entries, format R.
>> --echo #      --> MIXED "N B T T C" entries, format R in N/T and
>> format S in T.
>> --echo #
>> SET @commands= 'B Nt T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B nT T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B NT T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B NT-trig T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B NT-proc T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B TN T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B TN-trig T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B TN-proc T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #12.e) Generates in the binlog what follows if a N-Table is
>> changed:
>> --echo #        --> STMT  "M B T C" entries if in M only N-Table is
>> changed, format S.
>> --echo #        --> STMT  "B M T C" entries, format S.
>> --echo #        --> ROW   "N B T T C" entries, format R.
>> --echo #        --> MIXED "N B T T C" entries, format R in N/T and
>> format S in T.
>> --echo #  SET @commands= 'B Nte T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B nTe T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B NTe-trig T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B TNe-trig T C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #13) "B M T R" generates in the binlog:
>> --echo #      --> STMT  "M B T R" entries if in M only N-Table is
>> changed, format S.
>> --echo #      --> STMT  "B M T R" entries, format S.
>> --echo #      --> ROW   "N" entry, format R.
>> --echo #      --> MIXED "N" entry, format R.
>> --echo #
>> SET @commands= 'B Nt T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B nT T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B NT T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B NT-trig T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B NT-proc T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B TN T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B TN-trig T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B TN-proc T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #13.e) Generates in the binlog what follows if a N-Table is
>> changed:
>> --echo #        --> STMT  "M B T R" entries if in M only N-Table is
>> changed, format S.
>
> (S6) I think "B Nte T R" should be logged as just "Nte". We should
> never write "B T R" in the binlog.
This would be the ideal solution however we need to flush the
transactional cache as the variable
update_non_transactional_table is true and the cache's content is not
empty and there is no way to
check that the transactional cache does not hold any changes on
non-transactional tables.
>
>> --echo #        --> STMT  "B M T R" entries, format S.
>> --echo #        --> ROW   "N" entry, format R.
>> --echo #        --> MIXED "N" entry, format R.
>> --echo #
>> SET @commands= 'B Nte T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B nTe T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B NTe-trig T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B TNe-trig T R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #14) Generates in the binlog what follows if a N-Table is
>> changed:
>> --echo #      --> STMT  "B T M C" entries, format S.
>> --echo #      --> ROW   "N B T T C" entries, format R.
>> --echo #      --> MIXED "N B T T C" entries, format R in N/T and
>> format S in T.
>> --echo #
>> SET @commands= 'B T Nt C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T nT C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T NT C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T NT-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T NT-proc C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T TN C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T TN-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T TN-proc C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #14.e) Generates in the binlog what follows if a N-Table is
>> changed:
>> --echo #        --> STMT  "B T M C" entries, format S.
>> --echo #        --> ROW   "N B T C" entry, format R.
>> --echo #        --> MIXED "N B T C" entry, format R.
>> --echo #
>> SET @commands= 'B T Nte C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T nTe C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T NTe-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T TNe-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #15) Generates in the binlog what follows if a N-Table is
>> changed:
>> --echo #        --> STMT  "B T M R" entries, format S.
>> --echo #        --> ROW   "N" entry, format R.
>> --echo #        --> MIXED "N" entry, format R.
>> --echo #
>
> (S4) Note that 'B T nT R' should not be written to the binlog at all.
Sure. This is exactly what is happening.
There is the comment "if a N-Table is changed"
>
>> SET @commands= 'B T Nt R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T nT R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T NT R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T NT-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T NT-proc R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T TN R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T TN-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T TN-proc R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #15.e) Generates in the binlog what follows if a N-Table is
>> changed:
>> --echo #        --> STMT  "B T M R" entries, format S.
>> --echo #        --> ROW   "N" entry, format R.
>> --echo #        --> MIXED "N" entry, format R.
>
> Note that 'B T nTe R' should not be written to the binlog at all.
Sure. This is exactly what is happening.
>
>> --echo #
>> SET @commands= 'B T Nte R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T nTe R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T NTe-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B T TNe-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #16) Generates in the binlog what follows if a N-Table is
>> changed:
>> --echo #      --> STMT  "M N" entries if in M only N-Table is
>> changed, format S.
>> --echo #      --> STMT  "B M N C" entries, format S.
>> --echo #      --> ROW   "N N B T C" entries, format R.
>> --echo #      --> MIXED "M N" entries if in M only N-Table is
>> changed, format S.
>> --echo #      --> MIXED "N N B T C" entries, format R.
>> --echo #
>> SET @commands= 'B Nt N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B nT N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B NT N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B NT-trig N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B NT-proc N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B TN N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B TN-trig N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B TN-proc N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #16.e) Generates in the binlog what follows if a N-Table is
>> changed:
>> --echo #      --> STMT  "M N" entries if in M only N-Table is
>> changed, format S.
>> --echo #      --> STMT  "B M N C" entries, format S.
>> --echo #      --> ROW   "N N B T C" entries, format R.
>> --echo #      --> MIXED "M N" entries if in M only N-Table is
>> changed, format S.
>> --echo #      --> MIXED "N N B T C" entries, format R.
>> --echo #
>> SET @commands= 'B Nte N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B nTe N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B NTe-trig N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B TNe-trig N C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #17) Generates in the binlog what follows if a N-Table is
>> changed:
>> --echo #    --> STMT  "M N" entries if in M only N-Table is changed,
>> format S.
>> --echo #    --> STMT  "B M N R" entries, format S.
>> --echo #    --> ROW   "N N" entries, format R.
>> --echo #    --> MIXED "M N" entries if in M only N-Table is changed,
>> format S.
>> --echo #    --> MIXED "N N" entries, format R.
>> --echo #
>> SET @commands= 'B Nt N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B nT N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B NT N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B NT-trig N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B NT-proc N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B TN N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B TN-trig N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B TN-proc N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #17.e) Generates in the binlog what follows if a N-Table is
>> changed:
>> --echo #      --> STMT  "M N" entries if in M only N-Table is
>> changed, format S.
>> --echo #      --> STMT  "B M N R" entries, format S.
>> --echo #      --> ROW   "N N" entries, format R.
>> --echo #      --> MIXED "M N" entries if in M only N-Table is
>> changed, format S.
>> --echo #      --> MIXED "N N" entries, format R.
>> --echo #
>> SET @commands= 'B Nte N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B nTe N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B NTe-trig N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B TNe-trig N R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #18) Generates in the binlog what follows if a N-Table is
>> changed:
>> --echo #    --> STMT  "N M" entries if in M only N-Table is changed,
>> format S.
>> --echo #    --> STMT  "N B M C" entries, format S.
>> --echo #    --> ROW   "N N B T C" entries, format R.
>> --echo #    --> MIXED "N N B T C" entries, format S in first N and
>> format R in the other.
>> --echo #
>>
>> SET @commands= 'B N Nt C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N nT C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N NT C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N NT-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N NT-proc C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N TN C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N TN-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N TN-proc C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #18.e) Generates in the binlog what follows if a N-Table is
>> changed:
>> --echo #      --> STMT  "N M" entries if in M only N-Table is
>> changed, format S.
>> --echo #      --> STMT  "N B M C" entries, format S.
>> --echo #      --> ROW   "N N" entries, format R.
>> --echo #      --> MIXED "N N" entries, format S in first N and format
>> R in the other.
>> --echo #
>> SET @commands= 'B N Nte C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N nTe C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N NTe-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N TNe-trig C';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #19) Generates in the binlog what follows if a N-Table is
>> changed:
>> --echo #    --> STMT  "N M" entries if in M only N-Table is changed,
>> format S.
>> --echo #    --> STMT  "N B M R" entries, format S.
>> --echo #    --> ROW   "N N" entries, format R.
>> --echo #    --> MIXED "N N" entries, format S in first N and format R
>> in the other.
>> --echo #
>>
>> SET @commands= 'B N Nt R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N nT R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N NT R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N NT-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N NT-proc R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N TN R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N TN-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N TN-proc R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>> --echo
>> --echo
>> --echo
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>> --echo #
>> --echo #19.e) Generates in the binlog what follows if a N-Table is
>> changed:
>> --echo #      --> STMT  "N M" entries if in M only N-Table is
>> changed, format S.
>> --echo #      --> STMT  "N B M R" entries, format S.
>> --echo #      --> ROW   "N N" entries, format R.
>> --echo #      --> MIXED "N N" entries, format S in first N and format
>> R in the other.
>> --echo #
>> SET @commands= 'B N Nte R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N nTe R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N NTe-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> SET @commands= 'B N TNe-trig R';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> connection master;
>> sync_slave_with_master;
>>
>> --exec $MYSQL_DUMP --compact --order-by-primary
>> --skip-extended-insert --no-create-info test >
>> $MYSQLTEST_VARDIR/tmp/test-nmt-master.sql
>> --exec $MYSQL_DUMP_SLAVE --compact --order-by-primary
>> --skip-extended-insert --no-create-info test >
>> $MYSQLTEST_VARDIR/tmp/test-nmt-slave.sql
>> --diff_files $MYSQLTEST_VARDIR/tmp/test-nmt-master.sql
>> $MYSQLTEST_VARDIR/tmp/test-nmt-slave.sql
>
> (S10) Please use:
>
> --source include/diff_tables.inc
See comment above.
>
> instead.
>
>>
>> --echo
>>
> ###################################################################################
>>
>> --echo #                               2 - SAVEPOINT
>> --echo
>>
> ###################################################################################
>>
>> connection master;
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>>
>> BEGIN;
>> INSERT INTO tt_3 VALUES ("new text -34", -35, '');
>> INSERT INTO tt_4 VALUES ("new text -35", -35, '');
>> SAVEPOINT sv;
>> INSERT INTO nt_3 VALUES ("new text -36", -36, '');
>> INSERT INTO tt_3 VALUES ("new text -37", -37, '');
>> ROLLBACK TO sv;
>> COMMIT;
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>
> (S8) Can't you add S1, R1, (for "SAVEPOINT s1", "ROLLBACK TO s1") to
> rpl_mixing_engines.inc?
>
> (S1) I think we need to test more cases to ensure that savepoints work
> as specified:
>
> B T S1 T R1 C
> B N T S1 T R1 C
> B T N S1 T R1 C
> B T S1 N T R1 C
Done.
>
>>
>> --echo
>>
> ###################################################################################
>>
>> --echo #                 3 - CREATE TABLE...SELECT and CREATE
>> TABLE...LIKE
>> --echo
>>
> ###################################################################################
>>
>> connection master;
>> let $first_binlog_start= query_get_value("SHOW MASTER STATUS",
>> Position, 1);
>>
>> CREATE TABLE tt_xx10 engine=Innodb SELECT * FROM tt_2;
>> DROP TABLE tt_xx10;
>> CREATE TABLE nt_xx11 engine=MyIsam SELECT * FROM tt_2;
>> DROP TABLE nt_xx11;
>> CREATE TABLE nt_xx12 LIKE tt_2;
>> DROP TABLE nt_xx12;
>>
>> let $binlog_start= $first_binlog_start;
>> --source include/show_binlog_events.inc
>>
>> --echo
>>
> ###################################################################################
>>
>> --echo #                                        CLEAN
>> --echo
>>
> ###################################################################################
>>
>> SET @commands= 'clean';
>> --source extra/rpl_tests/rpl_mixing_engines.inc
> EOF
>
>
> rpl_mixing_engines.inc:
>
> (S4) Please add a comment explaining what this file does. Since it is
> described in the .test file, I think it's enough to just say that this
> is an auxiliary file used by rpl_mixing_engines.test, and that it
> executes SQL statements according to a format string, as specified in
> rpl_mixing_engines.test. In addition, it accepts the special format
> strings 'configure' and 'clean', used before and after everything else.
Done.
>
>> if (`SELECT strcmp(@commands, 'configure') = 0`)
>> {
>>   connection master;
>>
>>   SET SQL_LOG_BIN=0;
>>   CREATE TABLE nt_1 (a text, b int AUTO_INCREMENT, c text, PRIMARY
>> KEY(b)) ENGINE = MyISAM;
>>   CREATE TABLE nt_2 (a text, b int AUTO_INCREMENT, c text, PRIMARY
>> KEY(b)) ENGINE = MyISAM;
>>   CREATE TABLE nt_3 (a text, b int AUTO_INCREMENT, c text, PRIMARY
>> KEY(b)) ENGINE = MyISAM;
>>   CREATE TABLE nt_4 (a text, b int AUTO_INCREMENT, c text, PRIMARY
>> KEY(b)) ENGINE = MyISAM;
>>   CREATE TABLE nt_5 (a text, b int AUTO_INCREMENT, c text, PRIMARY
>> KEY(b)) ENGINE = MyISAM;
>>   CREATE TABLE nt_6 (a text, b int AUTO_INCREMENT, c text, PRIMARY
>> KEY(b)) ENGINE = MyISAM;
>>   CREATE TABLE tt_1 (a text, b int AUTO_INCREMENT, c text, PRIMARY
>> KEY(b)) ENGINE = Innodb;
>>   CREATE TABLE tt_2 (a text, b int AUTO_INCREMENT, c text, PRIMARY
>> KEY(b)) ENGINE = Innodb;
>>   CREATE TABLE tt_3 (a text, b int AUTO_INCREMENT, c text, PRIMARY
>> KEY(b)) ENGINE = Innodb;
>>   CREATE TABLE tt_4 (a text, b int AUTO_INCREMENT, c text, PRIMARY
>> KEY(b)) ENGINE = Innodb;
>>   CREATE TABLE tt_5 (a text, b int AUTO_INCREMENT, c text, PRIMARY
>> KEY(b)) ENGINE = Innodb;
>>   CREATE TABLE tt_6 (a text, b int AUTO_INCREMENT, c text, PRIMARY
>> KEY(b)) ENGINE = Innodb;
>>   SET SQL_LOG_BIN=1;
>
> (S7) Do you need three columns? It is not completely clear what is
> inserted in the three columns, making the result file a bit hard to
> read. Also, if a transaction is rolled back, then the next transaction
> will insert the same numbers. So in the binlog, it's hard to tell
> which of the two transactions was logged.
Not really.

>
> I think the result file would be more readable if we just had two
> columns:
>
> CREATE TABLE t (trans_id INT, stmt_id INT KEY(trans_id, stmt_id))
>
>  - trans_id is 1 for the first transaction, 2 for the second
> transaction, and so on.
>
>  - stmt_id is 1 for the first statement within the transaction, 2 for
> the second statement within the transaction, and so on.
Done.
>
>
> [...]
>
>


Thread
bzr commit into mysql-pe branch (alfranio.correia:3514) WL#2687 WL#5072Alfranio Correia13 Sep
Re: bzr commit into mysql-pe branch (alfranio.correia:3514) WL#2687WL#5072Sven Sandberg16 Sep
  • Re: bzr commit into mysql-pe branch (alfranio.correia:3514) WL#2687WL#5072Alfranio Correia17 Sep
  • Re: bzr commit into mysql-pe branch (alfranio.correia:3514) WL#2687WL#5072Alfranio Correia20 Sep
    • Re: bzr commit into mysql-pe branch (alfranio.correia:3514) WL#2687WL#5072Sven Sandberg21 Sep
      • Re: bzr commit into mysql-pe branch (alfranio.correia:3514) WL#2687WL#5072Alfranio Correia21 Sep
        • Re: bzr commit into mysql-pe branch (alfranio.correia:3514) WL#2687WL#5072Sven Sandberg23 Sep
          • Re: bzr commit into mysql-pe branch (alfranio.correia:3514) WL#2687WL#5072Alfranio Correia25 Sep
            • Re: bzr commit into mysql-pe branch (alfranio.correia:3514) WL#2687WL#5072Alfranio Correia28 Sep
              • Re: bzr commit into mysql-pe branch (alfranio.correia:3514) WL#2687WL#5072Sven Sandberg28 Sep