Skip to content

Add support for mariadbd binary #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions amplify/ext/mysql/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def _find_local(ps=None):
# break processing returning a fault-tolerant empty list
return []

if not any('mysqld' in line for line in ps):
if not any('mysqld' or 'mariadbd' in line for line in ps):
context.log.info('no mysqld processes found')

# break processing returning a fault-tolerant empty list
Expand All @@ -193,7 +193,7 @@ def _find_local(ps=None):
pid, ppid, cmd = parsed # unpack values

# match master process
if cmd.split(' ', 1)[0].endswith('mysqld'):
if cmd.split(' ', 1)[0].endswith('d'):
if not launch_method_supported("mysql", ppid):
continue

Expand Down
2 changes: 1 addition & 1 deletion amplify/ext/mysql/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
__email__ = "[email protected]"


PS_CMD = "ps xao pid,ppid,command | grep -E 'mysqld( |$)'" # grep -P doesn't work on BSD systems
PS_CMD = "ps xao pid,ppid,command | grep -E '(mariadb|mysql)d( |$)'" # grep -P doesn't work on BSD systems
PS_REGEX = re.compile(r'\s*(?P<pid>\d+)\s+(?P<ppid>\d+)\s+(?P<cmd>.+)\s*')

LS_CMD = "ls -la /proc/%s/exe"
Expand Down