I am finalizing my Percona Live talk MySQL and Vitess (and Kubernetes) at HubSpot. In this talk, I mentioned that I like that Percona is providing better MySQL with Percona Server. This comes with a little inconvenience though: with improvements, sometimes comes regression. This post is about such regression and a workaround I implemented some time ago (I should have shared it
I recently conducted a test backup of my “master-slave” setup in my VirtualBox as I was migrating from Percona Server 5.6.12 to version 5.6.13-rel61.0 with Percona XtraBackup v2.2.0 rev. 4885. However, doing the backup on my slave, I encountered this problem:
[04] Compressing and streaming ./test/checksum.ibd [01] Compressing and streaming ./mysql/slave_master_info.ibd Assertion "to_read % cursor->page_size == 0" failed at fil_cur.cc:293 innobackupex: Error: The xtrabackup child process has died at /usr/bin/innobackupex line 2641.
This is related to a bug posted by my colleague George …
[Read more]
I've come up with some interesting workarounds for missing
features using @session variables and I'd like to share one with
you today: DELETE ... JOIN ... LIMIT N;
okay, so we've got two tables, one with many duplicates and one
with no duplicates.
We want to join the tables using 'id', but only want to delete N
duplicates from t1.
MySQL's DELETE does not include LIMIT support when JOIN is used,
so we need to work around
that using some fancy footwork:
mysql> select * from t1;
+------+------+
| id | abc |
+------+------+
| 1 | 1 |
| 1 | 1 |
| 1 | 1 |
| 1 | 1 |
| 1 | 1 |
| 1 | 1 |
| 1 | 1 |
| 1 | 1 |
+------+------+
8 rows in set (0.00 sec)
mysql> select * from t2;
+----+------+
| id | xyz |
+----+------+
| 1 | 1 |
+----+------+
1 row …