simply running mysql_library_init() ... mysql_library_end() works as expected. However, if mysql_library_init() is later called to reinitialize the library, it crashes with a signal 11. I have attached a simple test which reproduces the problem. I do have a core as well (too large to attach here)
build flags were
cmake -DCMAKE_INSTALL_PREFIX=$HOME/mytile_server -DWITH_EMBEDDED_SERVER=ON -DPLUGIN_TOKUDB=NO -DPLUGIN_ROCKSDB=NO -DPLUGIN_MROONGA=NO -DPLUGIN_SPIDER=NO -DPLUGIN_SPHINX=NO -DPLUGIN_FEDERATED=NO -DPLUGIN_FEDERATEDX=NO -DPLUGIN_CONNECT=NO -DCMAKE_BUILD_TYPE=Debug -SWITH_DEBUG=1 ..