albertyw/albertyw.com

View on GitHub
app/notes/20230605-0718.md

Summary

Maintainability
Test Coverage
Fixing Mariadb --Column-Statistics Errors

mariadb-column-statistics

1685949512

Recent versions of mysqldump include a config to include a `COLUMN_STATISTICS`
table.  While [StackExchange](https://serverfault.com/a/912677) answers
recommand passing a `--column-statistics=0` flag to `mysqldump`, this isn't
always possible, e.g. when some
[code like Django](https://code.djangoproject.com/ticket/33537) is running
`mysqldump` for you.

Instead of patching your `mysqldump` calls, if you recently upgraded from
using mysql to mariadb, you should check if you're still using the Oracle
mysql version of `mysqldump`.  Switching to the `mariadb` version of
`mysqldump` may solve your problems.  On ubuntu/debian, you can do so with

```bash
apt update
apt remove mysql-client
apt install mariadb-client
```