enforce_storage_engine and debian-start, mysql_upgrade

Bug #1441087 reported by Raghavendra D Prabhu
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Triaged
Medium
Unassigned
5.6
Triaged
Medium
Unassigned
5.7
Invalid
Medium
Unassigned

Bug Description

debian-start is invoked automatically on PS.

However, due to https://bugs.launchpad.net/percona-server/+bug/1218664 this can corrupt mysql/PFS database tables (one reported quite recently), something that mysql_upgrade doesn't fix either (requires load from a mysqldump).

So, either

 > Change debian-start to invoke with --skip-grant-tables for mysql_upgrade by default.
 > Disable invocation of mysql_upgrade from debian-start
 > Fix the issue in 1218664 (will file a separate issue, found something based on my investigation).

Tags: enforce-se pkg
Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :

https://bugs.launchpad.net/percona-server/+bug/1236938 has been merged in newer versions.

So as per last comment in this bug, https://bugs.launchpad.net/percona-server/+bug/1218664

If using enforce-storage-engine, we must either disable it before doing mysql_upgrade or perform mysql_upgrade with server started with --skip-grants-tables. This changes is not done in debian-start yet.

nilnandan@desktop:~$ cat /etc/mysql/debian-start
#!/bin/bash
#
# This script is executed by "/etc/init.d/mysql" on every (re)start.
#
# Changes to this file will be preserved when updating the Debian package.
#

PERCONA_PREFIX=/usr
source "${PERCONA_PREFIX}"/share/mysql/debian-start.inc.sh

MYSQL="${PERCONA_PREFIX}/bin/mysql --defaults-file=/etc/mysql/debian.cnf"
MYADMIN="${PERCONA_PREFIX}/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
MYUPGRADE="${PERCONA_PREFIX}/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf"
MYCHECK="${PERCONA_PREFIX}/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf"
MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables"
MYCHECK_PARAMS="--all-databases --fast --silent"
MYCHECK_RCPT="root"

# The following commands should be run when the server is up but in background
# where they do not block the server start and in one shell instance so that
# they run sequentially. They are supposed not to echo anything to stdout.
# If you want to disable the check for crashed tables comment
# "check_for_crashed_tables" out.
# (There may be no output to stdout inside the background process!)
echo "Checking for corrupt, not cleanly closed and upgrade needing tables."
(
  upgrade_system_tables_if_necessary;
  check_root_accounts;
  check_for_crashed_tables;
) >&2 &

exit 0
nilnandan@desktop:~

tags: added: pkg
tags: added: enforce-se
Revision history for this message
Tomislav Plavcic (tplavcic) wrote :

5.7 unaffected as it doesn't run mysql_upgrade automatically.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1619

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.