[MDEV-4694] Changes to mysql.gtid_slave_pos table become visible too early Created: 2013-06-22 Updated: 2013-06-22 Resolved: 2013-06-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 10.0.4 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Elena Stepanova | Assignee: | Kristian Nielsen |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
The summary might be not quite accurate looking from inside, but it describes the effect I observe. Please feel free to modify it if needed. I have master=>slave setup with master_use_gtid=current_pos. The slave does not have log-slave-updates.
and prints the values like this:
Normally, I see either 3 equal values, as above, or
which I attributed to a delay at updating the variables.
That is, mysql.gtid_slave_pos already had seq_no 14040 before server crash, but after restart it's back to 14039. I can provide more information, including how to reproduce it with a stress test, or I can setup the test on perro, or modify the test in any manner, or do whatever it takes to debug it, but I'm also quite prepared to learn that it works as expected. bzr version-info
The effect is not related to two recent bugfixes, I observed it before as well. |
| Comments |
| Comment by Kristian Nielsen [ 2013-06-22 ] |
|
This is actually InnoDB behaviour, as per this comment from the source: ----------------------------------------------------------------------- I was able to repeat the same behaviour just with a standard InnoDB table, no -----------------------------------------------------------------------
--connect(con1,localhost,root,,) --connection default INSERT INTO t1 VALUES (1, 1); --write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --connection con1 --connection default --append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --enable_reconnect SELECT * FROM t1 ORDER BY a; --connection con1 --connection default You will need this .opt file: -----------------------------------------------------------------------
And this patch: ----------------------------------------------------------------------- mutex_exit(&kernel_mutex); trx_undo_insert_cleanup(trx); ----------------------------------------------------------------------- I get the following output: ----------------------------------------------------------------------- So the transaction is visible before the crash, but gone after the crash. So this seems to be intended InnoDB behaviour. Transactions seen just before a I believe it will not cause any issues for GTID, as you also seem to So I will mark this as "not a bug". But please re-open if you think there are |
| Comment by Elena Stepanova [ 2013-06-22 ] |
|
Thank you, I suspected there was a catch in there somewhere, but it looked so weird that I just had to find out. I agree that it's not a bug, at least as long as we don't find a scenario where it actually causes any trouble. |