That sounds reasonable - service files aren’t “meant” to be edited, so won’t be in the PKGBUILD’s backup
array (also linked below).
systemctl edit mariadb
is a good way to override elements of a unit’s behaviour which won’t be removed when the service file is upgraded.