can't set batched_key_access=on in optimizer_switch on mariadb 5.5
There is no batched_key_access key in MariaDB -- the functionality was released in MariaDB 5.3, long before MySQL 5.6, so it naturally had its own naming, from which MySQL diverged. What you might be looking for is join_cache_bka, but please read the page about block-based algorithms in full, as you also need to choose a suitable value for join_cache_level, depending on your needs.