Bug 1691290 - mysqld_safe --dry-run doesn't work as expected
Summary: mysqld_safe --dry-run doesn't work as expected
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: mariadb
Version: rh-mariadb102
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: alpha
: 3.3
Assignee: Michal Schorm
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-21 11:03 UTC by Michal Schorm
Modified: 2019-04-08 14:34 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1689300
Environment:
Last Closed: 2019-04-08 14:34:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Michal Schorm 2019-03-21 11:03:32 UTC
+++ This bug was initially created as a clone of Bug #1689300 +++

Description of problem:
mysqld_safe --dry-run doesn't work as expected

Version-Release number of selected component (if applicable):
mariadb-server-10.3.11-1.module+el8+2765+cfa4f87b

How reproducible:
always

Steps to Reproduce:
1. dnf install -y mariadb-server
2. systemctl start mariadb
3. systemctl stop mariadb
4. mysqld_safe --dry-run

Actual results:
[root@host-8-250-109 ~]# mysqld_safe --dry-run
/usr/bin/mysqld_safe: line 932: return: can only `return' from a function or sourced script
^C^C^C^C^C^Z
[1]+  Stopped                 mysqld_safe --dry-run
[root@host-8-250-109 ~]# ps -ef | grep mysql
root      7196  6107  0 11:52 pts/0    00:00:00 /bin/sh /usr/bin/mysqld_safe --dry-run
mysql     7280  7196  0 11:52 pts/0    00:00:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mariadb/plugin --user=mysql --log-error=/var/log/mariadb/mariadb.log --pid-file=/run/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sock


Expected results:
it returns to shell without mysqld running

Additional info:
# mysqld_safe --help | grep dry
  --dry-run                  Simulate the start to detect errors but don't start

--- Additional comment from Michal Schorm on 2019-03-21 10:43:42 UTC ---

Fix deployed for Fedora:
https://src.fedoraproject.org/rpms/mariadb/c/fe4891c5b8e6e5f0ce35328e3fa7b9e6efbb2644?branch=master

Comment 2 Michal Schorm 2019-03-21 11:05:16 UTC
In this collection, the server will not be started afterwards, so it is less of an issue than the original bug.

Comment 5 Michal Schorm 2019-04-08 14:34:51 UTC
Tracking for 10.3 collection.

Won't fix here, because upstream haven't ACKed the fix and there's no customer (or user) request, so it shouldn't be real issue.
  https://github.com/MariaDB/server/pull/1238

The purpose of "mysqld_safe --dry-run" was for a specific script "mariadb-service-convert".
It shouldn't be used for anything else.


Note You need to log in before you can comment on or make changes to this bug.