Update unit tests to handle MariaDB and MySQL 8 differences.
Review Request #12041 — Created Feb. 4, 2022 and submitted
We had some tests that worked on MariaDB, and older versions of MySQL,
but failed on MySQL 8.
These tests now check a flag in the database backend for MariaDB, and
conditionalize the expected SQL statements based on this flag.
Unit tests pass for all supported databases.