[MDEV-4816] rpl.rpl_trunc_temp fails in 10.0-serg Created: 2013-07-25 Updated: 2014-01-20 Resolved: 2014-01-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
rpl.rpl_trunc_temp test fails in 10.0-serg. The failure looks like this:
In the log, one can see
|
| Comments |
| Comment by Sergei Petrunia [ 2013-07-25 ] | |
|
Debugging, I found out that
| |
| Comment by Sergei Petrunia [ 2013-07-25 ] | |
|
I was debugging commands from rpl_trunc_temp on 10.0 and 10.0-serg. Breakpoint 3, mysql_execute_command (thd=0xbb9eb90) at /home/psergey/dev2/10.0-serg/sql/sql_parse.cc:2177 , cs = 0x8f715a0} Breakpoint 3, mysql_execute_command (thd=0xbb9eb90) at /home/psergey/dev2/10.0-serg/sql/sql_parse.cc:2177 , cs = 0x8f0f1a0} ... Breakpoint 9, trans_commit_stmt (thd=0xbb9eb90) at /home/psergey/dev2/10.0-serg/sql/transaction.cc:334 $405 = {string = {str = 0xbb8a2d9 "insert into t1 values(1)", length = 24} , cs = 0x8f715a0} Breakpoint 15, THD::decide_logging_format (this=0xbb9eb90, tables=0xaeecd5a8) at /home/psergey/dev2/10.0-serg/sql/sql_class.cc:4906 , cs = 0x8f715a0} Here, the problems start: table->table->no_replicate == true and the code in THD::decide_logging_format() executes these lines for it: if (lex->is_stmt_unsafe() || lex->is_stmt_row_injection()
after which we have In 10.0, we have: (gdb) p lex->is_stmt_unsafe() | |
| Comment by Sergei Petrunia [ 2013-07-25 ] | |
|
This difference causes another (in the same function 10.0-serg: | |
| Comment by Sergei Petrunia [ 2013-07-25 ] | |
|
... and the above difference stays. When I run another INSERT statement, at statement start I have the same BINLOG_FORMAT_STMT vs BINLOG_FORMAT_ROW difference. | |
| Comment by Sergei Petrunia [ 2013-07-25 ] | |
|
THD::decide_logging_format() eventually executes this code: if ((replicated_tables_count == 0) || ! is_write) { DBUG_PRINT("info", ("decision: no logging, no replicated table affected")); set_binlog_local_stmt_filter(); } | |
| Comment by Sergei Petrunia [ 2013-08-02 ] | |
|
Discussed with Sergei Vojtovich. Came up with this exploration patch: === modified file 'sql/sql_class.cc'
With this patch, the test passes: ============================================================================== TEST RESULT TIME (ms) or COMMENT worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019 | |
| Comment by Sergei Petrunia [ 2013-08-02 ] | |
|
Basic idea:
Also need to:
| |
| Comment by Sergei Petrunia [ 2013-08-02 ] | |
|
With the above patch (with strcmp) I get the following tests to fail: unit.dbug This is a proper subset of the failures one gets without the patch. Will work on polishing the patch | |
| Comment by Sergei Petrunia [ 2013-08-03 ] | |
|
Pushed the fix to 10.0-serg | |
| Comment by Kristian Nielsen [ 2013-09-03 ] | |
|
Something has gone wrong with this issue. The proposed patch was rejected in review: https://lists.launchpad.net/maria-developers/msg05966.html However, somehow the patch now nevertheless has ended up in main 10.0 | |
| Comment by Sergei Petrunia [ 2013-09-03 ] | |
|
Kristian, this was intended. See the review request https://lists.launchpad.net/maria-developers/msg05958.html: > In order to get rid of test failures of 10.0-serg, I have pushed the below patch. I pushed the patch during your vacation as a way to get the testsuite to pass. After that, you got back and rejected it. I did not act on the rejection, though. I've checked the current 10.0 - if I revert the patch for mdev-4816 with "patch -R", the testcase starts to fail again. I could act on your review comments, or you can take over for this issue. | |
| Comment by Kristian Nielsen [ 2013-11-27 ] | |
|
I pushed to 10.0-base a patch that corrects the GTID code to clear I still think you should revert the original patch in 10.0. (I tried to merge my 10.0-base patch to 10.0 to check if it solves the | |
| Comment by Sergei Petrunia [ 2013-11-27 ] | |
|
Ok. I'm fine with reverting the patch myself, or having someone else revert it. I've tried "patch -R" on current 10.0, and it applied. Should I push the reverse patch into 10.0? | |
| Comment by Sergei Petrunia [ 2014-01-20 ] | |
|
Pushed a change that reverts my original patch. |