Comments on: Thoughts on MySQL 5.6 new replication features https://shlomi-noach.github.io/blog/mysql/thoughts-on-mysql-5-6-new-replication-features Blog by Shlomi Noach Wed, 10 Jul 2013 12:07:33 +0000 hourly 1 https://wordpress.org/?v=5.3.3 By: Avi Vainshtein https://shlomi-noach.github.io/blog/mysql/thoughts-on-mysql-5-6-new-replication-features/comment-page-1#comment-214404 Wed, 10 Jul 2013 12:07:33 +0000 https://shlomi-noach.github.io/blog/?p=5651#comment-214404 Thank you, Shlomi, for referring me to dba.stackexchange.com: i’ve got an answer from there, which is :
– stop slave;
– CHANGE MASTER TO MASTER_DELAY = 0, RELAY_LOG_FILE = ‘xxxxx-relay-bin.NNNNNN’, RELAY_LOG_POS = YYYYYYYY ;
(where the RELAY_LOG_FILE and RELAY_LOG_POS values are taken from ‘show slave status;’ output)
– start slave;

I’ve tried that and it worked fine.

As per your suggestion to try relay-log.info file: couldn’t do that because of ‘relay_log_info_repository=TABLE’.

]]>
By: shlomi https://shlomi-noach.github.io/blog/mysql/thoughts-on-mysql-5-6-new-replication-features/comment-page-1#comment-214372 Tue, 09 Jul 2013 12:31:33 +0000 https://shlomi-noach.github.io/blog/?p=5651#comment-214372 premature submit. Try to rewrite the number in said file (to 0?) while replication is STOPped. I’m curious to learn the answer.

Also try asking on dba.stackexchange.com

]]>
By: shlomi https://shlomi-noach.github.io/blog/mysql/thoughts-on-mysql-5-6-new-replication-features/comment-page-1#comment-214371 Tue, 09 Jul 2013 12:29:53 +0000 https://shlomi-noach.github.io/blog/?p=5651#comment-214371 The existing relay logs are deleted? Funny/sad this should be the behavior; I haven’t done so myself, so you’re the expert on this.

But do try following on the last paragraph in said documentation:

” The relay-log.info file now contains the delay value, so the file format has changed. See Section 16.2.2.2, “Slave Status Logs”. In particular, the first line of the file now indicates how many lines are in the file. If you downgrade a slave server to a version older than MySQL 5.6, the older server will not read the file correctly. To address this, modify the file in a text editor to delete the initial line containing the number of lines. “

]]>
By: Avi Vainshtein https://shlomi-noach.github.io/blog/mysql/thoughts-on-mysql-5-6-new-replication-features/comment-page-1#comment-214368 Tue, 09 Jul 2013 12:02:15 +0000 https://shlomi-noach.github.io/blog/?p=5651#comment-214368 @Shlomi,

This isn’t correct – as per my test.
After the commands:
stop slave;
CHANGE MASTER TO MASTER_DELAY=0;
start slave;
and while the Master is still not available – the IO slave is in “Connecting”State, all the existed before relay logs are deleted, and the SQL changes executed at the Master – were NOT applied at the Slave…

]]>
By: shlomi https://shlomi-noach.github.io/blog/mysql/thoughts-on-mysql-5-6-new-replication-features/comment-page-1#comment-214362 Tue, 09 Jul 2013 10:10:45 +0000 https://shlomi-noach.github.io/blog/?p=5651#comment-214362 @Avi,

As per http://dev.mysql.com/doc/refman/5.6/en/replication-delayed.html,
just CHANGE MASTER TO MASTER_DELAY=0;
and the slave will just execute whatever it has got in the relay logs.

]]>
By: Avi Vainshtein https://shlomi-noach.github.io/blog/mysql/thoughts-on-mysql-5-6-new-replication-features/comment-page-1#comment-214359 Tue, 09 Jul 2013 09:50:12 +0000 https://shlomi-noach.github.io/blog/?p=5651#comment-214359 Sorry for posting here, but i didn’t find a separate topic for issues about Delayed Replication in 5.6 .

Scenario: Master-Slave replication in 5.6 with a Delay (let’s say 2 hours). The Master fails and isn’t available at all.
The question is : what is the proper way to cause the Slave to execute all the not-yet-applied SQL ?(i.e. to cause SQL_Remaining_Delay to become 0 , without waiting the 2 hours ?)

]]>
By: Further experiments with MySQL 5.6.7-RC: submit your bugs | code.openark.org https://shlomi-noach.github.io/blog/mysql/thoughts-on-mysql-5-6-new-replication-features/comment-page-1#comment-125629 Mon, 22 Oct 2012 05:52:46 +0000 https://shlomi-noach.github.io/blog/?p=5651#comment-125629 […] Thoughts on MySQL 5.6 new replication features […]

]]>
By: Gerry https://shlomi-noach.github.io/blog/mysql/thoughts-on-mysql-5-6-new-replication-features/comment-page-1#comment-124838 Fri, 19 Oct 2012 17:50:16 +0000 https://shlomi-noach.github.io/blog/?p=5651#comment-124838 Could your bug be related to the one I filed a few days ago? See http://bugs.mysql.com/bug.php?id=67246

]]>
By: shlomi https://shlomi-noach.github.io/blog/mysql/thoughts-on-mysql-5-6-new-replication-features/comment-page-1#comment-124362 Thu, 18 Oct 2012 11:15:01 +0000 https://shlomi-noach.github.io/blog/?p=5651#comment-124362 @XL,

Thank you for elaborating. 5.6 presents undo log on its own tablespace. Is this a development change that can allow multiple tablespaces, then?

]]>
By: XL https://shlomi-noach.github.io/blog/mysql/thoughts-on-mysql-5-6-new-replication-features/comment-page-1#comment-123657 Tue, 16 Oct 2012 08:33:04 +0000 https://shlomi-noach.github.io/blog/?p=5651#comment-123657 Unfortunately there is no way to separate InnoDB “system” and “user” tables in a way that allows you to drop table spaces for user tables, but not for system tables. The reason is the InnoDB data dictionary and especially how InnoDB is panicking once it finds something that looks like data dictionary corruption.

The data dictionary is located in the system table space (if there are multiple ibdata files, it might even be spread about those).

Now if you remove an ibd file without touching the DD, then InnoDB will sometimes just refuse to do anything (including deleting the table from the DD) with “table does not exist” error. If you happen to delete the ibd file for a single partition of a partitioned table, then InnoDB might even crash.

OTOH you could just delete the shared table space(s) (and thus also the DD) – then InnoDB will forget anything it ever knew about any InnoDB table. Any data in ibd files will be lost (not quite, it is possible to recover such data, but not automatically)

OK. Nothing of this is new.

Now what is bad with the new InnoDB system tables in 5.6 is that the server cannot recover from losing them. OTOH InnoDB can perfectly well recover from losing the DD – it will just create a new, empty one. And exactly the same it should do for the statistics and slave status tables. OK, this is a bit harder because those tables can use file_per_table. And they do have frm files. Maybe this was wrong in the first place. I don’t see why those tables could not be anonymous system tables just as the DD.

]]>