====== galera timezone import ======
The mysql.time_zone* tables are MyISAM. This causes issues for Galera/Xtrabackup replication. Really, the problem seems to be that the session variables are not properly accessible for the replicated statements. The fix:
- Import tz data, but disable the non-functional "workaround" [which mysql_tzinfo_to_sql automatically enables] with sed:
$ mysql_tzinfo_to_sql /usr/share/zoneinfo |sed -e 's@^SET SESSION wsrep_replicate_myisam=ON;@@g;' |mysql mysql
- Export the tz data from the same host you just imported it on:
$ mysqldump --single-transaction --quick mysql time_zone time_zone_name time_zone_leap_second time_zone_transition time_zone_transition_type >> time_zone_inout.sql
- Edit the ''time_zone_inout.sql'' file that you just created, to include the following at the top (as the first SQL statement in the file) - **NOTE: this requires that your version of galera has session support for the ''wsrep_replicate_myisam'' parameter**:
-- enable myiasm replication for the session --
SET wsrep_replicate_myisam = ON;
- Re-imoprt the data on the same node that you performed all the previous steps from:
mysql mysql < time_zone_inout.sql
- Profit!
==== Extra info ====
* [[https://jira.percona.com/browse/PXC-1321|Percona XtraDB PXE-1321]]
* [[https://jira.mariadb.org/browse/MDEV-11653|MariaDB bug MDEV-11653]]
==
{{tag>:linux:server :linux}}