Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-25082

Trouble with Lazarus/ZeosDB with pipes, so how to now build libmysqld.dll?

Details

    Description

      I have tried:

      mysqld.exe --skip-networking --enable-named-pipe --named-pipe=<some-unique-name>
      and connecting via libmariadb.dll, via this named pipe <some-unique-name>.

      But as I am using ZeosDB under Lazarus (64bit) naming a pipe does not seem to be an option.

      So I have returned to trying the Embedded dll soluton and ...
      – Previously ...

      cmake . -DWITH_EMBEDDED_SERVER=1 && cmake --build . --config relwithdebinfo --target libmysqld

      As per https://jira.mariadb.org/plugins/servlet/mobile#issue/MDEV-15100/comment/106350
      would build libmysqld.dll and you would find it in

       libmysqld\RelWithDebInfo directory
      

      How now do we build libmysqld.dll?

      Or is it completely depreciated (-- but still very useful/needed sometimes!)

      Attachments

        Issue Links

          Activity

            It is useful in very, very limited scenarios. We did not build it on Windows for 5 years, or something close to that. When I try to build 10.5 now on Windows, it fails, because apparently, something has changed in the way we make static libs out of static libs, and there are other errors. I doubt think there will be a revival of Windows embedded soon.

            Instead I'd suggest to talk to whoever builds that framework that you are using, to support named pipes. If this Zeos, whatever it is, uses C client library underneath, you can pass string "." as host, and named pipe name as unix socket.

            Or, you can use TCP as well, just find the port that is not used, and change the server's bind parameter to only accept local connections.

            wlad Vladislav Vaintroub added a comment - It is useful in very, very limited scenarios. We did not build it on Windows for 5 years, or something close to that. When I try to build 10.5 now on Windows, it fails, because apparently, something has changed in the way we make static libs out of static libs, and there are other errors. I doubt think there will be a revival of Windows embedded soon. Instead I'd suggest to talk to whoever builds that framework that you are using, to support named pipes. If this Zeos, whatever it is, uses C client library underneath, you can pass string "." as host, and named pipe name as unix socket. Or, you can use TCP as well, just find the port that is not used, and change the server's bind parameter to only accept local connections.
            PaulNormanNZ Paul Norman added a comment -

            Thank you I'll run your suggestions past ZeosDB community.

            So as described above, use unix socket, even though documentation suggests its for *Nix family only?

            Embeded is really more useful than might appear the case at first – it is afterall much much more than SQLite3 — on steriods, and far more advanced!
            And look how widely used Sqlite3 is even in stand alone applications

            Sad that Oracle was just blindly followed on this one, and please people don't forget those of us who have to write for Windows as well

            PaulNormanNZ Paul Norman added a comment - Thank you I'll run your suggestions past ZeosDB community. So as described above, use unix socket, even though documentation suggests its for *Nix family only? Embeded is really more useful than might appear the case at first – it is afterall much much more than SQLite3 — on steriods, and far more advanced! And look how widely used Sqlite3 is even in stand alone applications Sad that Oracle was just blindly followed on this one, and please people don't forget those of us who have to write for Windows as well
            wlad Vladislav Vaintroub added a comment - - edited

            The documentation for mysql_real_connect , for both MariaDB and MySQL, says that unix_socket is unix domain socket, or named pipe. The name if the parameter is misleading, I agree.

            MySQL documentation also documents what happens if host name passed to the function is "."

            With that, anything based on C client can work with named pipes, as long it exposes host and unix_socket parameter. I was not able to find any documentation for ZeosDB on the web, but I hope that it could work.

            As for following Oracle's, I think this is a typical misunderstanding. Once again MariaDB(on Windows) pioneered throwing away an untested component, and Oracle followed, as always, without proper attribution.

            wlad Vladislav Vaintroub added a comment - - edited The documentation for mysql_real_connect , for both MariaDB and MySQL, says that unix_socket is unix domain socket, or named pipe. The name if the parameter is misleading, I agree. MySQL documentation also documents what happens if host name passed to the function is "." With that, anything based on C client can work with named pipes, as long it exposes host and unix_socket parameter. I was not able to find any documentation for ZeosDB on the web, but I hope that it could work. As for following Oracle's, I think this is a typical misunderstanding. Once again MariaDB(on Windows) pioneered throwing away an untested component, and Oracle followed, as always, without proper attribution.

            I'm closing it for now. a 10 year old discussion https://zeoslib.sourceforge.io/viewtopic.php?t=3364 seems to have an example on how to connect using named pipes.

            wlad Vladislav Vaintroub added a comment - I'm closing it for now. a 10 year old discussion https://zeoslib.sourceforge.io/viewtopic.php?t=3364 seems to have an example on how to connect using named pipes.

            People

              Unassigned Unassigned
              PaulNormanNZ Paul Norman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.