To reproduce the problem, it's enough, on a clean machine where none of mariadb|mysql packages are installed:
- add official MariaDB 10.1 repo to the list (currently points at 10.1.34);
- run sudo apt-get install libmariadbclient18 (works okay);
- modify the repo list to point at the official MariaDB 10.2 repo (currently 10.2.16);
- run sudo apt-get install libmariadb3
=> it produces the error as above.
The very same sequence of actions with the same MariaDB versions works fine on Debian Stretch. I don't know what's the difference between Bionic and Stretch is.