ps_tokudb_admin script fails after upgrade to PS 5.7

Bug #1673610 reported by Juan Pablo Arruti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Invalid
Undecided
Unassigned
5.6
New
Undecided
Unassigned
5.7
New
Undecided
Unassigned

Bug Description

When executing ps_tokudb_admin --enable after upgrading Percona Server from version 5.6 to 5.7.17, it fails with the following error:

ERROR 1146 (42S02) at line 1: Table 'performance_schema.session_variables' doesn't exist
ERROR: Pid file location unknown!

Documentation says (https://www.percona.com/doc/percona-server/5.7/upgrading_guide_56_57.html) that ps_tokudb_admin script must be executed before mysql_upgrade otherwise you'll get errors. Here is a test case.

1. Upgrade Percona Server from 5.6 to 5.7.17

2. Execute ps_tokudb_admin --enable

[root@red-hat7 ~]# ps_tokudb_admin --enable -u root -p
Checking SELinux status...
INFO: SELinux is in permissive mode.

ERROR 1146 (42S02) at line 1: Table 'performance_schema.session_variables' doesn't exist
ERROR: Pid file location unknown!

3. After this error it's necessary to execute first mysql_upgrade and then ps_tokudb_admin:

[root@red-hat7 ~]# mysql_upgrade -u root -p
Enter password:
Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
Checking system database.
mysql.columns_priv OK
mysql.db OK
mysql.engine_cost OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.gtid_executed OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.server_cost OK
mysql.servers OK
mysql.slave_master_info OK
mysql.slave_relay_log_info OK
mysql.slave_worker_info OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
Upgrading the sys schema.
Checking databases.
sys.sys_config OK
Upgrade process completed successfully.
Checking if update is needed.

[root@red-hat7 ~]# ps_tokudb_admin --enable -u root -p
Checking SELinux status...
INFO: SELinux is in permissive mode.

ERROR 1682 (HY000) at line 1: Native table 'performance_schema'.'session_variables' has the wrong structure
ERROR: Pid file location unknown!

[root@red-hat7 ~]# service mysql restart
Redirecting to /bin/systemctl restart mysql.service
[root@red-hat7 ~]#
[root@red-hat7 ~]#
[root@red-hat7 ~]# ps_tokudb_admin --enable -u root -p
Checking SELinux status...
INFO: SELinux is in permissive mode.

Checking location of jemalloc library ...
INFO: Using jemalloc library from /usr/lib64/libjemalloc.so.1

Checking transparent huge pages status on the system...
INFO: Transparent huge pages are currently disabled on the system.

Checking if THP_SETTING variable is set to never or madvise in /etc/sysconfig/mysql...
INFO: Variable THP_SETTING is not set to never or madvise in /etc/sysconfig/mysql.

Checking if LD_PRELOAD variable is set for libjemalloc.so.1 in /etc/sysconfig/mysql...
INFO: Variable LD_PRELOAD for libjemalloc.so.1 is not set in /etc/sysconfig/mysql.

Checking TokuDB engine plugin status...
INFO: TokuDB engine plugin is installed.

Adding LD_PRELOAD variable into /etc/sysconfig/mysql
INFO: Successfully added LD_PRELOAD variable for libjemalloc.so.1 into /etc/sysconfig/mysql

PLEASE RESTART MYSQL SERVICE AND RUN THIS SCRIPT AGAIN TO FINISH INSTALLATION!

Tags: pkg
tags: added: pkg
Changed in percona-server:
assignee: nobody → Hrvoje Matijakovic (hrvojem)
Changed in percona-server:
assignee: Hrvoje Matijakovic (hrvojem) → nobody
Revision history for this message
Hrvoje Matijakovic (hrvojem) wrote :

There is a difference between ps_tokudb_admin in 5.6 and 5.7. In 5.7 on CentOS 7 tokudb settings are put into /etc/sysconfig/mysql instead of my.cnf like 5.6. This is why TokuDB storage engine needs to be re-enabled after upgrade.

Possible solution would be for ps_tokudb_admin to add tokudb setting in /etc/sysconfig/mysql for 5.6 on CentOS 7 as well. This shouldn't have any issues for 5.6 as this file isn't being used by mysqld_safe, but should avoid additional steps of re-enabling the tokudb after 5.6 -> 5.7 upgrade on CentOS 7.

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-3664

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.