When trying to call repeated mysql_library_init() and mysql_library_end() it fails on different error.
With MariaDB Connector/C 2.3.2 I can call
above code only 1024 times. At 1025 step it fails with error:
With client from MariaDB 10.3.6 above code can be called only one time. After second time it fails with error:
With client from MariaDB 10.1.26 everything is working fine and 10000 iteration passed without problem.
This problem was found while developing Perl DBI driver DBD::MariaDB:
In attachment is a simple application to testing mysql_library_init() and mysql_library_end() calls. Compile it with gcc test-init.c -o test-init `mysql_config --cflags --libs`