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

Create MariaDB named commands on Windows

Details

    Description

      Windows needs a different solution for MariaDB named commands. For linux the commands ar added as symlinks in cmake, which doesn't work on Windows.

      Attachments

        Issue Links

          Activity

            The following commits have wrongly committed as MDEV-19781. It was supposed to be for MDEV-19871. please ignore the following
            commits:

            commit 41f6e68878df46dd7abc8a98234f58a1fa030592
            Author: Thirunarayanan Balathandayuthapani <thiru@mariadb.com>
            Date:   Mon Jul 1 21:58:20 2019 +0530
             
                MDEV-19781 Add page id matching check in innochecksum tool
             
            commit 40c1f4bd4cdd8f8ed69c466e151a2c52f7b79b72
            Author: Thirunarayanan Balathandayuthapani <thiru@mariadb.com>
            Date:   Mon Jul 1 20:21:26 2019 +0530
             
                MDEV-19781 Add page id matching check in innochecksum tool
             
            commit 0c6514eece98d6817bdf11830244c068b17bd06b
            Author: Marko Mäkelä <marko.makela@mariadb.com>
            Date:   Tue Jul 2 21:33:54 2019 +0300
             
                MDEV-19781: Skip the test for embedded server
            
            

            thiru Thirunarayanan Balathandayuthapani added a comment - The following commits have wrongly committed as MDEV-19781 . It was supposed to be for MDEV-19871 . please ignore the following commits: commit 41f6e68878df46dd7abc8a98234f58a1fa030592 Author: Thirunarayanan Balathandayuthapani <thiru@mariadb.com> Date: Mon Jul 1 21:58:20 2019 +0530   MDEV-19781 Add page id matching check in innochecksum tool   commit 40c1f4bd4cdd8f8ed69c466e151a2c52f7b79b72 Author: Thirunarayanan Balathandayuthapani <thiru@mariadb.com> Date: Mon Jul 1 20:21:26 2019 +0530   MDEV-19781 Add page id matching check in innochecksum tool   commit 0c6514eece98d6817bdf11830244c068b17bd06b Author: Marko Mäkelä <marko.makela@mariadb.com> Date: Tue Jul 2 21:33:54 2019 +0300   MDEV-19781: Skip the test for embedded server

            wlad,

            Can you give commit 08b1917 in branch bb-10.4-MDEV-19781 a review?

            ratzpo Rasmus Johansson (Inactive) added a comment - wlad , Can you give commit 08b1917 in branch bb-10.4- MDEV-19781 a review?

            wlad I finally got further with this. Can you review latest revision 10092fdc4f4d351918 in the branch bb-10.4-MDEV-19781?

            ratzpo Rasmus Johansson (Inactive) added a comment - wlad I finally got further with this. Can you review latest revision 10092fdc4f4d351918 in the branch bb-10.4- MDEV-19781 ?
            wlad Vladislav Vaintroub added a comment - - edited

            Hi Rasmus,
            this will work. Feel free to push. However, there are some rough angles in this patch . I could fix them later.

            • 2 parallel string arrays
              Would be better (easier to read) to have

            static struct

            { wstring exe, wstring symlink}

            symlinks[] =
            {

            {L"mysqld.exe", L"mariadbd.exe"}

            ,
            ....
            }

            It is easier to read, because you do have to rely on the positions in the arrays to correspond.

            • it would be better if this array was stored in a CMake-generated file, based on the information that is already in CMakeLists.txt . So you would not have to change it every time new exe is added.
            • C++17 is an overkill, for that one symlink operation. We're on Windows, this is part of the Windows installer , it will never will be ported to anything else. Given that, CreateSymbolicLinkW() does what needs to do done.
              Some people are still using VS2015, (we recently had a bug report), and I have no idea if C++ 17 filesystem still works with it. We can also build with clang-cl, and do not know if clang-cl supports C++17 filesystem.
            wlad Vladislav Vaintroub added a comment - - edited Hi Rasmus, this will work. Feel free to push. However, there are some rough angles in this patch . I could fix them later. 2 parallel string arrays Would be better (easier to read) to have static struct { wstring exe, wstring symlink} symlinks[] = { {L"mysqld.exe", L"mariadbd.exe"} , .... } It is easier to read, because you do have to rely on the positions in the arrays to correspond. it would be better if this array was stored in a CMake-generated file, based on the information that is already in CMakeLists.txt . So you would not have to change it every time new exe is added. C++17 is an overkill, for that one symlink operation. We're on Windows, this is part of the Windows installer , it will never will be ported to anything else. Given that, CreateSymbolicLinkW() does what needs to do done. Some people are still using VS2015, (we recently had a bug report), and I have no idea if C++ 17 filesystem still works with it. We can also build with clang-cl, and do not know if clang-cl supports C++17 filesystem.

            I've now removed C++17 and changed to use CreateSymbolicLinkW. Now the lists of executables are read from cmake where they are present for the Linux implementation.

            The new commit is 0a6fb738c00

            ratzpo Rasmus Johansson (Inactive) added a comment - I've now removed C++17 and changed to use CreateSymbolicLinkW. Now the lists of executables are read from cmake where they are present for the Linux implementation. The new commit is 0a6fb738c00

            Hi Rasmus.
            this is ok to push.
            If you do not mind, I might still create a cleanup commit on top of it, so that the source and destination lists are not stored in MSI (I'd rather have a generated C/C++ file with source->destination file mapping )

            wlad Vladislav Vaintroub added a comment - Hi Rasmus. this is ok to push. If you do not mind, I might still create a cleanup commit on top of it, so that the source and destination lists are not stored in MSI (I'd rather have a generated C/C++ file with source->destination file mapping )
            ratzpo Rasmus Johansson (Inactive) added a comment - Pushed https://github.com/MariaDB/server/commit/b6f7ec6a5b8da27866136d50f50337fcce64eff5

            People

              ratzpo Rasmus Johansson (Inactive)
              ratzpo Rasmus Johansson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.