maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #03975
(/usr/include/mysql and libmysqlclient) vs (/usr/include/mariadb libmariadbclient and libmariadb)
First, let me clarify everything here is MariaDB - nothing actually
involving the MySQL code.
In Arch Linux, I'm running a MariaDB server and client. I installed
the mariadb package, built from the source at:
http://ftp.heanet.ie/mirrors/mariadb/mariadb-10.1.18/source/mariadb-10.1.18.tar.gz
This provides:
- /usr/include/mysql/* (141 .h files)
- /usr/lib/libmysqlclient.so
- /usr/lib/libmysqld.so (I see this is for embedding a MariaDB server
in an application which I don't need, so I'll ignore that for the rest
of my message.)
I have C++ applications that will access MariaDB, and I thought I also
needed mariadb-connector-c, so I built tag v2.3.1 at
https://github.com/MariaDB/mariadb-connector-c
This provides:
- /usr/include/mariadb/* (40 .h files)
- /usr/lib/mariadb/libmariadbclient.a
- /usr/lib/mariadb/libmariadb.so
Q1 -
What's the purpose and difference between libmysqlclient,
libmariadbclient, and libmariadb? (Ignoring difference shared vs
static library.)
Q2 -
/usr/include/mysql/mysql.h (from
http://ftp.heanet.ie/mirrors/mariadb/mariadb-10.1.18/source/mariadb-10.1.18.tar.gz)
and
/usr/include/mariadb/mysql.h (from tag v2.3.1 at from
https://github.com/MariaDB/mariadb-connector-c)
Are quite similar and have a lot of identical code, but are also way different.
I ran into that /usr/include/mysql/mysql.h defines:
const char * STDCALL mysql_error(MYSQL * myql);
But /usr/include/mariadb/mysql.h defines:
char * STDCALL mysql_error(MYSQL *mysql);
(Note the missing const on the return value.)
I got very confused at this point why the same function is declared in
each, why they're different, which I should be using, etc.
Follow ups