[MDEV-4979] mysqld_safe section in my.cnf doesn't have mariadb equivalent Created: 2013-09-02  Updated: 2013-09-19  Resolved: 2013-09-19

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.32
Fix Version/s: 5.5.33a

Type: Bug Priority: Major
Reporter: Honza Horak Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None


 Description   

MariaDB's binary mysqld respects [mariadb] and [mariadb-5.5] sections in my.cnf. Then, inside mysqld_safe script, settings in the sections above can be read using (read #1)

/usr/bin/my_print_defaults  --loose-verbose --mysqld

After that mysqld_safe specific settings is read using (read #2)

/usr/bin/my_print_defaults --loose-verbose mysqld_safe safe_mysqld

Imagine the following my.cnf:

[mysqld_safe]
log-error=/var/log/mysqld.log
[mariadb]
log-error=/var/log/mariadb/mariadb.log

As a result, after log-error setting was read in [mariadb] section (read #1), it is overloaded by mysqld_safe section after that (read #2). Generally, there is no way how to define mysqld_safe settings differently in mariadb.

So what I'm proposing is to introduce mariadb specific settings for mysqld_safe, which would mean basically to introduce new section with name for example [mariadb_mysqld_safe].

A patch could be very simple:

diff -up mariadb-5.5.32/scripts/mysqld_safe.sh.mariasection mariadb-5.5.32/scripts/mysqld_safe.sh
--- mariadb-5.5.32/scripts/mysqld_safe.sh.mariasection  2013-09-02 14:08:16.523188070 +0200
+++ mariadb-5.5.32/scripts/mysqld_safe.sh       2013-09-02 14:15:28.710908632 +0200
@@ -509,7 +509,7 @@ then
   SET_USER=0
 fi
 
-parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld`
+parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld mariadb_mysqld_safe`
 parse_arguments PICK-ARGS-FROM-ARGV "$@"
 



 Comments   
Comment by Sergei Golubchik [ 2013-09-19 ]

added [mariadb_safe] section, modified the manpage accordingly

Generated at Thu Feb 08 07:00:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.