Adding database-specific privs for user gives table 'db' is full, MariaDB, *tiny* toy database
This isn't really an answer, in that I still have no idea why this was failing. It just provides a workaround. I noticed that the db table used the &quot;new&quot; storage engine &quot;aria&quot;, so I converted it to use the traditional MyIsam storage engine, like so:
alter table db engine=myisam

After doing this, the problems posted disappeared.