Skip to content
  • Dyre Tjeldvoll's avatar
    fa3880ae
    WL#10441: Add mysqld_safe-functionality to server · fa3880ae
    Dyre Tjeldvoll authored
    - Find the the absolute path of the executable and make argv[0] point to it
    
    - Deduce mysql_home (aka basedir) from the executable path
    
    - Let mysqld::runtime::mysqld_daemonize() return (rather than call
      exit directly) on the parent side, and call
      flush_error_log_messages() to get all messages from the daemonize
      process properly formatted. Move the call to mysqld_daemonize() to a
      point where paths have been resolved agains CWD so that a daemon
      process treats relative paths in the same way as a regular server.
    
    - Print the name of the chosen error log file before opening and redirecting
      stderr so that users can see where the daemon will try to log messages.
    
    - Fix a bug in open_error_log() which assumed the log file could be used if stat
      showed it to be writable for user (that will be true even if it is not owned
      by the current uid). When calling my_freopen() on such a file the stderr
      FILE pointer becomes invalid, and this causing messages to be lost.
    
    - New mtr test main.basedir.
    fa3880ae
    WL#10441: Add mysqld_safe-functionality to server
    Dyre Tjeldvoll authored
    - Find the the absolute path of the executable and make argv[0] point to it
    
    - Deduce mysql_home (aka basedir) from the executable path
    
    - Let mysqld::runtime::mysqld_daemonize() return (rather than call
      exit directly) on the parent side, and call
      flush_error_log_messages() to get all messages from the daemonize
      process properly formatted. Move the call to mysqld_daemonize() to a
      point where paths have been resolved agains CWD so that a daemon
      process treats relative paths in the same way as a regular server.
    
    - Print the name of the chosen error log file before opening and redirecting
      stderr so that users can see where the daemon will try to log messages.
    
    - Fix a bug in open_error_log() which assumed the log file could be used if stat
      showed it to be writable for user (that will be true even if it is not owned
      by the current uid). When calling my_freopen() on such a file the stderr
      FILE pointer becomes invalid, and this causing messages to be lost.
    
    - New mtr test main.basedir.
Loading