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

MariaDB upgrade on CentOS 6 fails due to sed error

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 5.5.36, 10.0.10
    • 5.5.37, 10.0.11
    • None

    Description

      When updating MariaDB-server from 5.5.36 to 10.0.10 on CentOS, an error happens when trying to check information about the already installed MariaDB-server package.

      The main issue seems to revolve around an invalid sed syntax:

      Error in PREIN scriptlet in rpm package MariaDB-server-10.0.10-1.el6.x86_64
      sed: invalid option – '1'

      Full error message is attached as log file.

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova added a comment - - edited

            The problem affects minor upgrades too, so it must be fixed by 5.5.37 release.

            The line in the pre-in script is
            installed=`echo "$installed"|sed -n -1p`

            I'm not sure whether -1p is a non-standard sed option or a typo, but since it doesn't work with standard sed on the target systems, it can't be used.

            It was introduced in 5.5 tree by the following revision:

            revno: 4118
            revision-id: sergii@pisem.net-20140324190137-t0554znbq5ed1w10
            parent: sergii@pisem.net-20140319090334-mpgf90l05547ji8y
            committer: Sergei Golubchik <sergii@pisem.net>
            branch nick: 5.5
            timestamp: Mon 2014-03-24 20:01:37 +0100
            message:
              MDEV-5831 Upgrade from MariaDB 5.5.36 via yum fails
             
              Allow "rpm -q --whatprovides mysql-server" to return more than one row.
              (all rows should be identical though)

            elenst Elena Stepanova added a comment - - edited The problem affects minor upgrades too, so it must be fixed by 5.5.37 release. The line in the pre-in script is installed=`echo "$installed"|sed -n -1p` I'm not sure whether -1p is a non-standard sed option or a typo, but since it doesn't work with standard sed on the target systems, it can't be used. It was introduced in 5.5 tree by the following revision: revno: 4118 revision-id: sergii@pisem.net-20140324190137-t0554znbq5ed1w10 parent: sergii@pisem.net-20140319090334-mpgf90l05547ji8y committer: Sergei Golubchik <sergii@pisem.net> branch nick: 5.5 timestamp: Mon 2014-03-24 20:01:37 +0100 message: MDEV-5831 Upgrade from MariaDB 5.5.36 via yum fails   Allow "rpm -q --whatprovides mysql-server" to return more than one row. (all rows should be identical though)
            atkinson.tommy Tom Atkinson added a comment - - edited

            Suggested fix:

            installed=`echo "$installed"|uniq`

            or

            installed=`echo "$installed"|head -n1`

            atkinson.tommy Tom Atkinson added a comment - - edited Suggested fix: installed=`echo "$installed"|uniq` or installed=`echo "$installed"|head -n1`

            I would suggest simply:-

            installed =`echo "$installed"|sed -n p1`

            In the mean time you can upgrade like this:-

            sudo yum remove MariaDB-server && sudo yum install MariaDB-server

            chaz6 Chris Hills (Inactive) added a comment - I would suggest simply:- installed =`echo "$installed"|sed -n p1` In the mean time you can upgrade like this:- sudo yum remove MariaDB-server && sudo yum install MariaDB-server
            shenlong Hansen Ler added a comment -

            Thanks Christ for the workaround. Just remember after running this script

            sudo yum remove MariaDB-server && sudo yum install MariaDB-server

            Remember to start your SQL server

            sudo service mysql start

            shenlong Hansen Ler added a comment - Thanks Christ for the workaround. Just remember after running this script sudo yum remove MariaDB-server && sudo yum install MariaDB-server Remember to start your SQL server sudo service mysql start

            ...and don't forget to run mysql_upgrade.
            In other words, do what exactly the error message (after the sed error) says, it suggests to perform manual upgrade via remove/install.

            elenst Elena Stepanova added a comment - ...and don't forget to run mysql_upgrade. In other words, do what exactly the error message (after the sed error) says, it suggests to perform manual upgrade via remove/install.

            People

              serg Sergei Golubchik
              pprkut Heinz Wiesinger
              Votes:
              1 Vote for this issue
              Watchers:
              7 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.