• Joerg Bruehe's avatar
    Fix Bug #56581 RPM scripts use hardcoded datadir location · 106e5900
    Joerg Bruehe authored
    When fixing the 27072 bug, the shell snippets running before/after
    a RPM upgrade got expanded to look at files in the data directory
    and at the PID file.
    In this expansion, the standard locations were used.
    
    There are users who configure their installations to use non-standard
    locations for the data directory, the PID file, and other objects.
    For these users, the fix of 27072 did not work.
    As a result, the fact that a server was running at upgrade start was
    not noticed, and the new server was not started after the upgrade.
    
    With this patch, the shell snippets now try to get these locations
    from "my_print_defaults" before falling back to the defaults.
    Now, the fact that the old server is running is again noticed (even
    with non-standard locations), and the new server is started.
    
    Also, the upgrade log is written to the correct data directory.
    
    support-files/mysql.spec.sh:
      See the global comment for the purpose of this change.
      
      In tests on SuSE 11, it was found necessary to use the full path name
      of "my_print_defaults", it seems $PATH die not include "/usr/bin".
    106e5900
mysql.spec.sh 64.5 KB