What is the objective of macro "MYSQL_CLIENT" ?

The macro "MYSQL_CLINET" and "MYSQL_SERVER" are wildly used. What is the objective of them? How do understand them?

Answer

If you're writing MySQL/MariaDB client — you don't have to define either.

If you're writing some code for the server — you don't have to define either.

If you're writing a plugin, you might need to define MYSQL_SERVER to see all internal server definitions, but it breaks the plugin API and is not recommended.

If you're writing mysqlbinlog.cc (which is a client, that includes server internal code) you need to define both.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.