• unknown's avatar
    Fix for bug#18516 (also #19353, reported for 5.1): · 3a216290
    unknown authored
    In addition to include "mysql_upgrade" in a RPM, it should also be called
    when the RPM is upgraded.
    
    
    support-files/mysql.server.sh:
      Support getting additional arguments, which need to be passed on to the server.
      This works only if the server is started through "mysqld_safe", as the IM will not pass such arguments.
      So if the IM would be used, additional arguments cause the start to fail (voluntarily).
      
      This feature is needed so that tools like RPM can start the server in an "isolated" way,
      see the patch to the RPM spec file (also in this changeset) to call "mysql_upgrade".
    support-files/mysql.spec.sh:
      Call "mysql_upgrade" during an RPM upgrade.
      
      "mysql_upgrade" needs a server to run, as it issues SQL commands.
      (This had been neglected previously.)
      It also needs to connect as "root", but in an RPM upgrade the password is unknown.
      To allow this, the server is started "--skip-grant-tables".
      Normally, this would open big security holes, so it is also started "--skip-networking",
      and access to the socket is limited to "mysql" + "root" by temporarily setting mode 700.
    3a216290
mysql.spec.sh 37.6 KB