pBlueG / SA-MP-MySQL

MySQL plugin for San Andreas Multiplayer
BSD 3-Clause "New" or "Revised" License
196 stars 80 forks source link

How works the static version #219

Closed UserG1 closed 5 years ago

UserG1 commented 5 years ago

Hello! I know we need to post topics only for issues, but I already posted that question on SAMP forum and nobody answered, so that's why I decided to post here.

How works the static version of the MySQL plugin? I mean I read from the FAQ this: A: Use the mysql_static.so plugin file. It's statically linked to the libmysqlclient library.

So what I understand is the plugin gets the necessary resources from an external link (not local from the computer), am I right?

If this is true, then how the static plugin actually works, I mean how many times the plugin uses the external link: -Only once when the plugin is loaded and he gets the necessary resources from the external link and then works locally without using the external link anymore? -Or when a MySQL or cache function is called in the SAMP script, the plugin uses every time the external link to get the necessary resource?

maddinat0r commented 5 years ago

No, you got it wrong. The static version has the required MySQL client library linked into the plugin binary, in contrast to having it somewhere in your /usr/lib folder. The plugin doesn't establish any external connections (apart from the ones to your MySQL server you create with mysql_connect).