Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Incomplete
-
10.2.5, 10.2.6
-
Arch Linux
-
10.2.7-1
Description
MariaDB 10.2.x (including current stable version 10.2.6) ships with new libmariadb. This new client library is built with new header files mariadb_*.h.
When compiling clients these are linked against new libmariadb, but use old header file mysql.h that is still shipped.
The header files use conflicting data definitions. One example is struct st_mysql_stmt, defined in mysql.h at line 723 and mariadb_stmt.h at line 193. Possibly there are more conflicts.
These conflicting data definitions lead to memory corruption, illegal memory access and crashes for the client. This has been discovered with perl-dbd-mysql where lots of tests fail with make test.
Looks like our packaging is at least part of the issue:
MariaDB 10.2.6 has two versions of mysql.h (include/mysql.h and libmariadb/include/mysql.h), depending on the install order you will end up with the wrong or correct one. Please purge the wrong one from repositories and tarballs.
Having the correct version of mysql.h brings up another problem: mysql_version.h is no longer included, thus MYSQL_VERSION_ID is not defined. Is that by intention? A lot of packages fail to build without that define.