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

mysql init script should accept arguments

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.0.2, 5.5.30, 5.5.29-galera
    • Fix Version/s: 10.0.4, 5.5.32
    • Component/s: None
    • Labels:
      None
    • Environment:
      Debian, Ubuntu

      Description

      The /etc/init.d/mysql script does not accept any arguments, even though the "service" tool on those platforms does accept arguments/"OPTIONS" these days. This is particularly problematic in the case of Galera, for example, where you may occasionally need to pass --wsrep-cluster-address=gcomm:// to bootstrap a cluster.

      This issue is very easily resolved by replacing this line:

                  /usr/bin/mysqld_safe > /dev/null 2>&1 &
      

      with this one:

                  /usr/bin/mysqld_safe "${@:2}" > /dev/null 2>&1 &
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              primetomas Tomas Gustavsson added a comment -

              I believe MDEV-4253 is the same issue, the analysis there is the same, i.e. mysql init script does not pass on parameters.

              Show
              primetomas Tomas Gustavsson added a comment - I believe MDEV-4253 is the same issue, the analysis there is the same, i.e. mysql init script does not pass on parameters.
              Hide
              primetomas Tomas Gustavsson added a comment -

              Verified that the patch with:

              /usr/bin/mysqld_safe "$

              {@:2}

              " > /dev/null 2>&1 &

              works fine.
              Now:
              service mysql start --wsrep-cluster-address=gcomm://

              works great.

              Show
              primetomas Tomas Gustavsson added a comment - Verified that the patch with: /usr/bin/mysqld_safe "$ {@:2} " > /dev/null 2>&1 & works fine. Now: service mysql start --wsrep-cluster-address=gcomm:// works great.
              Hide
              elenst Elena Stepanova added a comment -

              Not really sure who it should belong to, please reassign if needed.

              It's more generic than MDEV-4253 and I also don't see why not to do it in all init scripts rather than Galera only; but I'm inclined to keep MDEV-4253 open too, and assigned to Seppo, so that he'll make the change in the upstream (codership) version of the script and it won't get lost on the next merge if it again comes as a replacement of the old files.

              Show
              elenst Elena Stepanova added a comment - Not really sure who it should belong to, please reassign if needed. It's more generic than MDEV-4253 and I also don't see why not to do it in all init scripts rather than Galera only; but I'm inclined to keep MDEV-4253 open too, and assigned to Seppo, so that he'll make the change in the upstream (codership) version of the script and it won't get lost on the next merge if it again comes as a replacement of the old files.
              Hide
              elenst Elena Stepanova added a comment -

              Raising the priority due to upcoming 5.5.31-galera release, since it should be easy and safe to fix.
              See also MDEV-4253.

              Show
              elenst Elena Stepanova added a comment - Raising the priority due to upcoming 5.5.31-galera release, since it should be easy and safe to fix. See also MDEV-4253 .
              Hide
              danblack Daniel Black added a comment -

              seems to be fixed
              mariadb-galera-server-5.5 5.5.35+maria-1~wheezy

               fgrep safe /etc/init.d/mysql
              
              #                    and its wrapper script "mysqld_safe".
                          /usr/bin/mysqld_safe "${@:2}" > /dev/null 2>&1 &
              
              Show
              danblack Daniel Black added a comment - seems to be fixed mariadb-galera-server-5.5 5.5.35+maria-1~wheezy fgrep safe /etc/init.d/mysql # and its wrapper script "mysqld_safe". /usr/bin/mysqld_safe "${@:2}" > /dev/null 2>&1 &

                People

                • Assignee:
                  serg Sergei Golubchik
                  Reporter:
                  kolbe Kolbe Kegel
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 1 hour
                    1h
                    Remaining:
                    Time Spent - 30 minutes Remaining Estimate - 30 minutes
                    30m
                    Logged:
                    Time Spent - 30 minutes Remaining Estimate - 30 minutes
                    30m