node-mariasql icon indicating copy to clipboard operation
node-mariasql copied to clipboard

Provide a way to use libmysqld instead of libmysqlclient.

Open augustl opened this issue 10 years ago • 6 comments

As per https://mariadb.com/kb/en/mariadb/embedded-mariadb-interface/.

It would be really convenient for testing to have a way to use the embedded server.

Let me know if I can help in implementing it, if you have some pointers. I'm not sure where I would start and how it should be structured, etc.

augustl avatar Mar 02 '15 19:03 augustl

For now this kind of functionality isn't on the roadmap. Currently I manually strip out most of the server-related code, however since the async features from libmariadbclient are now more widespread, we can probably just stop bundling libmariadbclient entirely and just load it as a shared library instead. This would make the code base smaller, improve maintainability, and allow features like the one you are requesting.

I can't guarantee when these kinds of changes will be made, but I am always open to pull requests to incorporate such changes.

mscdex avatar Mar 02 '15 19:03 mscdex

How would you imagine that a feature like this should work? Perhaps it makes more sense to have it as a completely separate module, and split the nodejs code into a "core" lib that both the client and daemon versions could depend on.

augustl avatar Mar 02 '15 20:03 augustl

How about exposing a flag to the build process that tells it to link to a shared libmariadbclient instead of building the bundled one?

jbergstroem avatar Apr 29 '15 02:04 jbergstroem

If we're going to open up to or change to linking with the shared library, I'd rather just remove the bundled libmariadbclient source because it does take up a considerable amount of space.

mscdex avatar Apr 29 '15 04:04 mscdex

@mscdex I'm happy to see it go.

jbergstroem avatar Apr 29 '15 04:04 jbergstroem

I think one of the major obstacles to removing the source from the repo is Windows users. They typically can't just apt-get install libmariadbclient-dev. How would we support them? Require them to have the libmariadbclient DLLs in the system path? Download the libmariadbclient DLLs from the repo (but not packaged in npm) before building? Something else?

mscdex avatar Apr 29 '15 04:04 mscdex