Merge lp:~tplavcic/percona-server/bld-242-5.6 into lp:percona-server/5.6

Proposed by Tomislav Plavcic
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: 730
Merged at revision: 731
Proposed branch: lp:~tplavcic/percona-server/bld-242-5.6
Merge into: lp:percona-server/5.6
Diff against target: 64 lines (+39/-2)
1 file modified
build-ps/percona-server.spec (+39/-2)
To merge this branch: bzr merge lp:~tplavcic/percona-server/bld-242-5.6
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+246905@code.launchpad.net

Description of the change

After fixing the bug on server upgrade on centos 5/6 where it wasn't started if it was running before upgrade (at least the case where pid was located in datadir) it was noticed that if tokudb was installed the server (new upgraded version) got started with the old version of tokudb which then failed to init (BLD-242).
The problem is in the sequence of starting/stopping the server when upgrading so the correct thing is to stop the server, upgrade it and if TokuDB is installed don't start the server until new TokuDB version is unpacked - so that means if it was running before that TokuDB package needs to start it on upgrade.
This affects centos 5/6.

Test packages:
http://jenkins.percona.com/view/Percona-RELEASES/job/percona-server-5.6-redhat-binary/110/
http://jenkins.percona.com/view/Percona-RELEASES/job/percona-server-5.6-debian-binary/100/

Some testing - centos 6 mostly, but tried centos5, centos7 and ubuntu14 also - all pass:
test1: with running service before upgrade and installed tokudb
test2: without running service before upgrade and installed tokudb
test3: with running service before upgrade and no installed tokudb
test4: install tokudb package on running server
test5: without running service before upgrade and no installed tokudb
test6: centos7 - running service with tokudb and upgrade
test7: centos5 - running service with tokudb and upgrade
test8: ubuntu 14.04 - running service with tokudb and upgrade

Test data:
### TEST1: WITH RUNNING SERVICE BEFORE UPGRADE AND INSTALLED TOKUDB:
mysql> show variables like '%version%';
+-------------------------+--------------------------------------------------+
| Variable_name | Value |
+-------------------------+--------------------------------------------------+
| innodb_version | 5.6.21-70.1 |
| protocol_version | 10 |
| slave_type_conversions | |
| tokudb_version | tokudb-7.5.2 |
| version | 5.6.21-70.1 |
| version_comment | Percona Server (GPL), Release 70.1, Revision 698 |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+--------------------------------------------------+

mysql> show table status like 'City';
+------+--------+---------+-------------+------+----------------+-------------+---------------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+---------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
+------+--------+---------+-------------+------+----------------+-------------+---------------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+---------+
| City | TokuDB | 10 | tokudb_zlib | 4079 | 67 | 273293 | 9223372036854775807 | 36711 | 0 | 4080 | 2015-01-19 02:29:04 | 2015-01-19 02:29:04 | NULL | latin1_swedish_ci | NULL | | |
+------+--------+---------+-------------+------+----------------+-------------+---------------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+---------+
1 row in set (0,00 sec)

[vagrant@t-centos6-64 ~]$ sudo service mysql status;
 SUCCESS! MySQL (Percona Server) running (1364)

UPGRADE:
[vagrant@t-centos6-64 new]$ sudo yum install *.rpm
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: mirror.met.hu
 * extras: mirror.met.hu
 * updates: mirror.met.hu
Setting up Install Process
Examining Percona-Server-client-56-5.6.22-rel71.0.el6.x86_64.rpm: Percona-Server-client-56-5.6.22-rel71.0.el6.x86_64
Marking Percona-Server-client-56-5.6.22-rel71.0.el6.x86_64.rpm as an update to Percona-Server-client-56-5.6.21-rel70.1.el6.x86_64
Examining Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64.rpm: Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64
Marking Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64.rpm as an update to Percona-Server-server-56-5.6.21-rel70.1.el6.x86_64
Examining Percona-Server-shared-56-5.6.22-rel71.0.el6.x86_64.rpm: Percona-Server-shared-56-5.6.22-rel71.0.el6.x86_64
Marking Percona-Server-shared-56-5.6.22-rel71.0.el6.x86_64.rpm as an update to Percona-Server-shared-56-5.6.21-rel70.1.el6.x86_64
Examining Percona-Server-tokudb-56-5.6.22-rel71.0.el6.x86_64.rpm: Percona-Server-tokudb-56-5.6.22-rel71.0.el6.x86_64
Marking Percona-Server-tokudb-56-5.6.22-rel71.0.el6.x86_64.rpm as an update to Percona-Server-tokudb-56-5.6.21-rel70.1.el6.x86_64
Resolving Dependencies
--> Running transaction check
---> Package Percona-Server-client-56.x86_64 0:5.6.21-rel70.1.el6 will be updated
---> Package Percona-Server-client-56.x86_64 0:5.6.22-rel71.0.el6 will be an update
---> Package Percona-Server-server-56.x86_64 0:5.6.21-rel70.1.el6 will be updated
---> Package Percona-Server-server-56.x86_64 0:5.6.22-rel71.0.el6 will be an update
---> Package Percona-Server-shared-56.x86_64 0:5.6.21-rel70.1.el6 will be updated
---> Package Percona-Server-shared-56.x86_64 0:5.6.22-rel71.0.el6 will be an update
---> Package Percona-Server-tokudb-56.x86_64 0:5.6.21-rel70.1.el6 will be updated
---> Package Percona-Server-tokudb-56.x86_64 0:5.6.22-rel71.0.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================================================================================================================
 Package Arch Version Repository Size
=======================================================================================================================================================================================================================================
Updating:
 Percona-Server-client-56 x86_64 5.6.22-rel71.0.el6 /Percona-Server-client-56-5.6.22-rel71.0.el6.x86_64 33 M
 Percona-Server-server-56 x86_64 5.6.22-rel71.0.el6 /Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64 87 M
 Percona-Server-shared-56 x86_64 5.6.22-rel71.0.el6 /Percona-Server-shared-56-5.6.22-rel71.0.el6.x86_64 3.4 M
 Percona-Server-tokudb-56 x86_64 5.6.22-rel71.0.el6 /Percona-Server-tokudb-56-5.6.22-rel71.0.el6.x86_64 4.4 M

Transaction Summary
=======================================================================================================================================================================================================================================
Upgrade 4 Package(s)

Running Transaction
  Updating : Percona-Server-shared-56-5.6.22-rel71.0.el6.x86_64 1/8
  Updating : Percona-Server-client-56-5.6.22-rel71.0.el6.x86_64 2/8
  Updating : Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64 3/8
ls: cannot access /var/lib/mysql/*.err: No such file or directory
ls: cannot access /var/lib/mysql/*.err: No such file or directory
Giving mysqld 5 seconds to exit nicely
Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit.
Run the following commands to create these functions:
mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"
mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"
mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'"
See http://www.percona.com/doc/percona-server/5.6/management/udf_percona_toolkit.html for more details
  Updating : Percona-Server-tokudb-56-5.6.22-rel71.0.el6.x86_64 4/8
Starting MySQL (Percona Server).. SUCCESS!
Giving mysqld 5 seconds to start
  Cleanup : Percona-Server-tokudb-56-5.6.21-rel70.1.el6.x86_64 5/8
  Cleanup : Percona-Server-server-56-5.6.21-rel70.1.el6.x86_64 6/8
  Cleanup : Percona-Server-client-56-5.6.21-rel70.1.el6.x86_64 7/8
  Cleanup : Percona-Server-shared-56-5.6.21-rel70.1.el6.x86_64 8/8
  Verifying : Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64 1/8
  Verifying : Percona-Server-client-56-5.6.22-rel71.0.el6.x86_64 2/8
  Verifying : Percona-Server-shared-56-5.6.22-rel71.0.el6.x86_64 3/8
  Verifying : Percona-Server-tokudb-56-5.6.22-rel71.0.el6.x86_64 4/8
  Verifying : Percona-Server-server-56-5.6.21-rel70.1.el6.x86_64 5/8
  Verifying : Percona-Server-client-56-5.6.21-rel70.1.el6.x86_64 6/8
  Verifying : Percona-Server-tokudb-56-5.6.21-rel70.1.el6.x86_64 7/8
  Verifying : Percona-Server-shared-56-5.6.21-rel70.1.el6.x86_64 8/8

Updated:
  Percona-Server-client-56.x86_64 0:5.6.22-rel71.0.el6 Percona-Server-server-56.x86_64 0:5.6.22-rel71.0.el6 Percona-Server-shared-56.x86_64 0:5.6.22-rel71.0.el6 Percona-Server-tokudb-56.x86_64 0:5.6.22-rel71.0.el6

Complete!

CHECK AFTER UPGRADE:
[vagrant@t-centos6-64 new]$ sudo service mysql status;
 SUCCESS! MySQL (Percona Server) running (2517)

mysql> show variables like '%version%';
+-------------------------+--------------------------------------------------+
| Variable_name | Value |
+-------------------------+--------------------------------------------------+
| innodb_version | 5.6.22-71.0 |
| protocol_version | 10 |
| slave_type_conversions | |
| tokudb_version | tokudb-7.5.4 |
| version | 5.6.22-71.0 |
| version_comment | Percona Server (GPL), Release 71.0, Revision 730 |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+--------------------------------------------------+
8 rows in set (0,01 sec)

mysql> select * from City limit 10;
+----+----------------+-------------+---------------+------------+
| ID | Name | CountryCode | District | Population |
+----+----------------+-------------+---------------+------------+
| 1 | Kabul | AFG | Kabol | 1780000 |
| 2 | Qandahar | AFG | Qandahar | 237500 |
| 3 | Herat | AFG | Herat | 186800 |
| 4 | Mazar-e-Sharif | AFG | Balkh | 127800 |
| 5 | Amsterdam | NLD | Noord-Holland | 731200 |
| 6 | Rotterdam | NLD | Zuid-Holland | 593321 |
| 7 | Haag | NLD | Zuid-Holland | 440900 |
| 8 | Utrecht | NLD | Utrecht | 234323 |
| 9 | Eindhoven | NLD | Noord-Brabant | 201843 |
| 10 | Tilburg | NLD | Noord-Brabant | 193238 |
+----+----------------+-------------+---------------+------------+
10 rows in set (0,01 sec)

mysql> show table status like 'City';
+------+--------+---------+-------------+------+----------------+-------------+---------------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+---------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
+------+--------+---------+-------------+------+----------------+-------------+---------------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+---------+
| City | TokuDB | 10 | tokudb_zlib | 4079 | 67 | 273293 | 9223372036854775807 | 36711 | 0 | 4080 | 2015-01-19 02:29:04 | 2015-01-19 02:29:04 | NULL | latin1_swedish_ci | NULL | | |
+------+--------+---------+-------------+------+----------------+-------------+---------------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+---------+
1 row in set (0,00 sec)

LOG:
150119 02:48:47 mysqld_safe mysqld from pid file /var/lib/mysql/t-centos6-64.pid ended
150119 02:48:55 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2015-01-19 02:48:56 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-01-19 02:48:56 2517 [Note] Plugin 'FEDERATED' is disabled.
2015-01-19 02:48:56 2517 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-01-19 02:48:56 2517 [Note] InnoDB: The InnoDB memory heap is disabled
2015-01-19 02:48:56 2517 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-01-19 02:48:56 2517 [Note] InnoDB: Memory barrier is not used
2015-01-19 02:48:56 2517 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-01-19 02:48:56 2517 [Note] InnoDB: Using Linux native AIO
2015-01-19 02:48:56 2517 [Note] InnoDB: Not using CPU crc32 instructions
2015-01-19 02:48:56 2517 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-01-19 02:48:56 2517 [Note] InnoDB: Completed initialization of buffer pool
2015-01-19 02:48:56 2517 [Note] InnoDB: Highest supported file format is Barracuda.
2015-01-19 02:48:56 2517 [Note] InnoDB: 128 rollback segment(s) are active.
2015-01-19 02:48:56 2517 [Note] InnoDB: Waiting for purge to start
2015-01-19 02:48:56 2517 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.22-71.0 started; log sequence number 2939991
2015-01-19 02:48:57 2517 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.
2015-01-19 02:48:57 2517 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2015-01-19 02:48:57 2517 [Note] Server hostname (bind-address): '*'; port: 3306
2015-01-19 02:48:57 2517 [Note] IPv6 is available.
2015-01-19 02:48:57 2517 [Note] - '::' resolves to '::';
2015-01-19 02:48:57 2517 [Note] Server socket created on IP: '::'.
2015-01-19 02:48:57 2517 [Note] Event Scheduler: Loaded 0 events
2015-01-19 02:48:57 2517 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.22-71.0' socket: '/var/lib/mysql/mysql.sock' port: 3306 Percona Server (GPL), Release 71.0, Revision 730

### TEST2: WITHOUT RUNNING SERVICE BEFORE UPGRADE AND INSTALLED TOKUDB:
mysql> show variables like '%version%';
+-------------------------+--------------------------------------------------+
| Variable_name | Value |
+-------------------------+--------------------------------------------------+
| innodb_version | 5.6.21-70.1 |
| protocol_version | 10 |
| slave_type_conversions | |
| tokudb_version | tokudb-7.5.2 |
| version | 5.6.21-70.1 |
| version_comment | Percona Server (GPL), Release 70.1, Revision 698 |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+--------------------------------------------------+

[vagrant@t-centos6-64 ~]$ sudo service mysql status
 ERROR! MySQL (Percona Server) is not running

UPGRADE:
=======================================================================================================================================================================================================================================
 Package Arch Version Repository Size
=======================================================================================================================================================================================================================================
Updating:
 Percona-Server-client-56 x86_64 5.6.22-rel71.0.el6 /Percona-Server-client-56-5.6.22-rel71.0.el6.x86_64 33 M
 Percona-Server-server-56 x86_64 5.6.22-rel71.0.el6 /Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64 87 M
 Percona-Server-shared-56 x86_64 5.6.22-rel71.0.el6 /Percona-Server-shared-56-5.6.22-rel71.0.el6.x86_64 3.4 M
 Percona-Server-tokudb-56 x86_64 5.6.22-rel71.0.el6 /Percona-Server-tokudb-56-5.6.22-rel71.0.el6.x86_64 4.4 M

Transaction Summary
=======================================================================================================================================================================================================================================
Upgrade 4 Package(s)

Total size: 127 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating : Percona-Server-shared-56-5.6.22-rel71.0.el6.x86_64 1/8
  Updating : Percona-Server-client-56-5.6.22-rel71.0.el6.x86_64 2/8
  Updating : Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64 3/8
ls: cannot access /var/lib/mysql/*.err: No such file or directory
ls: cannot access /var/lib/mysql/*.err: No such file or directory
Giving mysqld 5 seconds to exit nicely
Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit.
Run the following commands to create these functions:
mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"
mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"
mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'"
See http://www.percona.com/doc/percona-server/5.6/management/udf_percona_toolkit.html for more details
  Updating : Percona-Server-tokudb-56-5.6.22-rel71.0.el6.x86_64 4/8
  Cleanup : Percona-Server-tokudb-56-5.6.21-rel70.1.el6.x86_64 5/8
  Cleanup : Percona-Server-server-56-5.6.21-rel70.1.el6.x86_64 6/8
  Cleanup : Percona-Server-client-56-5.6.21-rel70.1.el6.x86_64 7/8
  Cleanup : Percona-Server-shared-56-5.6.21-rel70.1.el6.x86_64 8/8
  Verifying : Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64 1/8
  Verifying : Percona-Server-client-56-5.6.22-rel71.0.el6.x86_64 2/8
  Verifying : Percona-Server-shared-56-5.6.22-rel71.0.el6.x86_64 3/8
  Verifying : Percona-Server-tokudb-56-5.6.22-rel71.0.el6.x86_64 4/8
  Verifying : Percona-Server-server-56-5.6.21-rel70.1.el6.x86_64 5/8
  Verifying : Percona-Server-client-56-5.6.21-rel70.1.el6.x86_64 6/8
  Verifying : Percona-Server-tokudb-56-5.6.21-rel70.1.el6.x86_64 7/8
  Verifying : Percona-Server-shared-56-5.6.21-rel70.1.el6.x86_64

[vagrant@t-centos6-64 new]$ sudo service mysql status
 ERROR! MySQL (Percona Server) is not running

[vagrant@t-centos6-64 new]$ sudo service mysql start
Starting MySQL (Percona Server). SUCCESS!

mysql> show variables like '%version%';
+-------------------------+--------------------------------------------------+
| Variable_name | Value |
+-------------------------+--------------------------------------------------+
| innodb_version | 5.6.22-71.0 |
| protocol_version | 10 |
| slave_type_conversions | |
| tokudb_version | tokudb-7.5.4 |
| version | 5.6.22-71.0 |
| version_comment | Percona Server (GPL), Release 71.0, Revision 730 |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+--------------------------------------------------+
8 rows in set (0,02 sec)

mysql> select * from City limit 10;
+----+----------------+-------------+---------------+------------+
| ID | Name | CountryCode | District | Population |
+----+----------------+-------------+---------------+------------+
| 1 | Kabul | AFG | Kabol | 1780000 |
| 2 | Qandahar | AFG | Qandahar | 237500 |
| 3 | Herat | AFG | Herat | 186800 |
| 4 | Mazar-e-Sharif | AFG | Balkh | 127800 |
| 5 | Amsterdam | NLD | Noord-Holland | 731200 |
| 6 | Rotterdam | NLD | Zuid-Holland | 593321 |
| 7 | Haag | NLD | Zuid-Holland | 440900 |
| 8 | Utrecht | NLD | Utrecht | 234323 |
| 9 | Eindhoven | NLD | Noord-Brabant | 201843 |
| 10 | Tilburg | NLD | Noord-Brabant | 193238 |
+----+----------------+-------------+---------------+------------+
10 rows in set (0,01 sec)

### TEST3: WITH RUNNING SERVICE BEFORE UPGRADE AND NO INSTALLED TOKUDB
[vagrant@t-centos6-64 new]$ sudo yum list installed|grep -i percona
Percona-Server-client-56.x86_64
                                        @/Percona-Server-client-56-5.6.21-rel70.1.el6.x86_64
Percona-Server-server-56.x86_64
                                        @/Percona-Server-server-56-5.6.21-rel70.1.el6.x86_64
Percona-Server-shared-56.x86_64
                                        @/Percona-Server-shared-56-5.6.21-rel70.1.el6.x86_64
jemalloc.x86_64 3.3.1-1.el6 @percona-release-x86_64

mysql> show variables like '%version%';
+-------------------------+--------------------------------------------------+
| Variable_name | Value |
+-------------------------+--------------------------------------------------+
| innodb_version | 5.6.21-70.1 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 5.6.21-70.1 |
| version_comment | Percona Server (GPL), Release 70.1, Revision 698 |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+--------------------------------------------------+
7 rows in set (0,02 sec)

[vagrant@t-centos6-64 ~]$ sudo service mysql status;
 SUCCESS! MySQL (Percona Server) running (2678)

UPGRADE:
[vagrant@t-centos6-64 new]$ sudo yum install *.rpm
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: mirror.met.hu
 * extras: mirror.met.hu
 * updates: mirror.met.hu
Setting up Install Process
Examining Percona-Server-client-56-5.6.22-rel71.0.el6.x86_64.rpm: Percona-Server-client-56-5.6.22-rel71.0.el6.x86_64
Marking Percona-Server-client-56-5.6.22-rel71.0.el6.x86_64.rpm as an update to Percona-Server-client-56-5.6.21-rel70.1.el6.x86_64
Examining Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64.rpm: Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64
Marking Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64.rpm as an update to Percona-Server-server-56-5.6.21-rel70.1.el6.x86_64
Examining Percona-Server-shared-56-5.6.22-rel71.0.el6.x86_64.rpm: Percona-Server-shared-56-5.6.22-rel71.0.el6.x86_64
Marking Percona-Server-shared-56-5.6.22-rel71.0.el6.x86_64.rpm as an update to Percona-Server-shared-56-5.6.21-rel70.1.el6.x86_64
Resolving Dependencies
--> Running transaction check
---> Package Percona-Server-client-56.x86_64 0:5.6.21-rel70.1.el6 will be updated
---> Package Percona-Server-client-56.x86_64 0:5.6.22-rel71.0.el6 will be an update
---> Package Percona-Server-server-56.x86_64 0:5.6.21-rel70.1.el6 will be updated
---> Package Percona-Server-server-56.x86_64 0:5.6.22-rel71.0.el6 will be an update
---> Package Percona-Server-shared-56.x86_64 0:5.6.21-rel70.1.el6 will be updated
---> Package Percona-Server-shared-56.x86_64 0:5.6.22-rel71.0.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================================================================================================================
 Package Arch Version Repository Size
=======================================================================================================================================================================================================================================
Updating:
 Percona-Server-client-56 x86_64 5.6.22-rel71.0.el6 /Percona-Server-client-56-5.6.22-rel71.0.el6.x86_64 33 M
 Percona-Server-server-56 x86_64 5.6.22-rel71.0.el6 /Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64 87 M
 Percona-Server-shared-56 x86_64 5.6.22-rel71.0.el6 /Percona-Server-shared-56-5.6.22-rel71.0.el6.x86_64 3.4 M

Transaction Summary
=======================================================================================================================================================================================================================================
Upgrade 3 Package(s)

Running Transaction
  Updating : Percona-Server-shared-56-5.6.22-rel71.0.el6.x86_64 1/6
  Updating : Percona-Server-client-56-5.6.22-rel71.0.el6.x86_64 2/6
  Updating : Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64 3/6
ls: cannot access /var/lib/mysql/*.err: No such file or directory
ls: cannot access /var/lib/mysql/*.err: No such file or directory
Giving mysqld 5 seconds to exit nicely
Starting MySQL (Percona Server). SUCCESS!
Giving mysqld 5 seconds to start
Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit.
Run the following commands to create these functions:
mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"
mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"
mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'"
See http://www.percona.com/doc/percona-server/5.6/management/udf_percona_toolkit.html for more details
  Cleanup : Percona-Server-server-56-5.6.21-rel70.1.el6.x86_64 4/6
  Cleanup : Percona-Server-client-56-5.6.21-rel70.1.el6.x86_64 5/6
  Cleanup : Percona-Server-shared-56-5.6.21-rel70.1.el6.x86_64 6/6
  Verifying : Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64 1/6
  Verifying : Percona-Server-client-56-5.6.22-rel71.0.el6.x86_64 2/6
  Verifying : Percona-Server-shared-56-5.6.22-rel71.0.el6.x86_64 3/6
  Verifying : Percona-Server-server-56-5.6.21-rel70.1.el6.x86_64 4/6
  Verifying : Percona-Server-client-56-5.6.21-rel70.1.el6.x86_64 5/6
  Verifying : Percona-Server-shared-56-5.6.21-rel70.1.el6.x86_64 6/6

Updated:
  Percona-Server-client-56.x86_64 0:5.6.22-rel71.0.el6 Percona-Server-server-56.x86_64 0:5.6.22-rel71.0.el6 Percona-Server-shared-56.x86_64 0:5.6.22-rel71.0.el6

Complete!

[vagrant@t-centos6-64 new]$ sudo service mysql status;
 SUCCESS! MySQL (Percona Server) running (2982)

mysql> show variables like '%version%';
+-------------------------+--------------------------------------------------+
| Variable_name | Value |
+-------------------------+--------------------------------------------------+
| innodb_version | 5.6.22-71.0 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 5.6.22-71.0 |
| version_comment | Percona Server (GPL), Release 71.0, Revision 730 |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+--------------------------------------------------+
7 rows in set (0,01 sec)

### TEST4: INSTALL TOKUDB PACKAGE ON RUNNING SERVER
[vagrant@t-centos6-64 new]$ sudo yum install Percona-Server-tokudb-56-5.6.22-rel71.0.el6.x86_64.rpm
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: mirror.met.hu
 * extras: mirror.met.hu
 * updates: mirror.met.hu
Setting up Install Process
Examining Percona-Server-tokudb-56-5.6.22-rel71.0.el6.x86_64.rpm: Percona-Server-tokudb-56-5.6.22-rel71.0.el6.x86_64
Marking Percona-Server-tokudb-56-5.6.22-rel71.0.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package Percona-Server-tokudb-56.x86_64 0:5.6.22-rel71.0.el6 will be installed
--> Finished Dependency Resolution

Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : Percona-Server-tokudb-56-5.6.22-rel71.0.el6.x86_64 1/1

* This release of Percona Server is distributed with TokuDB storage engine.
* Run the following commands to enable the TokuDB storage engine in Percona Server:

mysql -e "INSTALL PLUGIN tokudb SONAME 'ha_tokudb.so';"
mysql -e "INSTALL PLUGIN tokudb_file_map SONAME 'ha_tokudb.so';"
mysql -e "INSTALL PLUGIN tokudb_fractal_tree_info SONAME 'ha_tokudb.so';"
mysql -e "INSTALL PLUGIN tokudb_fractal_tree_block_map SONAME 'ha_tokudb.so';"
mysql -e "INSTALL PLUGIN tokudb_trx SONAME 'ha_tokudb.so';"
mysql -e "INSTALL PLUGIN tokudb_locks SONAME 'ha_tokudb.so';"
mysql -e "INSTALL PLUGIN tokudb_lock_waits SONAME 'ha_tokudb.so';"

* See http://www.percona.com/doc/percona-server/5.6/tokudb/tokudb_intro.html for more details

  Verifying : Percona-Server-tokudb-56-5.6.22-rel71.0.el6.x86_64 1/1

Installed:
  Percona-Server-tokudb-56.x86_64 0:5.6.22-rel71.0.el6

Complete!

[vagrant@t-centos6-64 new]$ sudo service mysql status;
 SUCCESS! MySQL (Percona Server) running (2982)

mysql> show variables like '%version%';
+-------------------------+--------------------------------------------------+
| Variable_name | Value |
+-------------------------+--------------------------------------------------+
| innodb_version | 5.6.22-71.0 |
| protocol_version | 10 |
| slave_type_conversions | |
| tokudb_version | tokudb-7.5.4 |
| version | 5.6.22-71.0 |
| version_comment | Percona Server (GPL), Release 71.0, Revision 730 |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+--------------------------------------------------+
8 rows in set (0,01 sec)

[vagrant@t-centos6-64 new]$ sudo service mysql stop;
Shutting down MySQL (Percona Server).. SUCCESS!
[vagrant@t-centos6-64 new]$ sudo service mysql start;
Starting MySQL (Percona Server). SUCCESS!

### TEST5: WITHOUT RUNNING SERVICE BEFORE UPGRADE AND NO INSTALLED TOKUDB
[vagrant@t-centos6-64 ~]$ sudo service mysql status
 ERROR! MySQL (Percona Server) is not running

[vagrant@t-centos6-64 ~]$ sudo yum list installed|grep -i percona
Percona-Server-client-56.x86_64
                                        @/Percona-Server-client-56-5.6.21-rel70.1.el6.x86_64
Percona-Server-server-56.x86_64
                                        @/Percona-Server-server-56-5.6.21-rel70.1.el6.x86_64
Percona-Server-shared-56.x86_64
                                        @/Percona-Server-shared-56-5.6.21-rel70.1.el6.x86_64

UPGRADE:
Resolving Dependencies
--> Running transaction check
---> Package Percona-Server-client-56.x86_64 0:5.6.21-rel70.1.el6 will be updated
---> Package Percona-Server-client-56.x86_64 0:5.6.22-rel71.0.el6 will be an update
---> Package Percona-Server-server-56.x86_64 0:5.6.21-rel70.1.el6 will be updated
---> Package Percona-Server-server-56.x86_64 0:5.6.22-rel71.0.el6 will be an update
---> Package Percona-Server-shared-56.x86_64 0:5.6.21-rel70.1.el6 will be updated
---> Package Percona-Server-shared-56.x86_64 0:5.6.22-rel71.0.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

Running Transaction
  Updating : Percona-Server-shared-56-5.6.22-rel71.0.el6.x86_64 1/6
  Updating : Percona-Server-client-56-5.6.22-rel71.0.el6.x86_64 2/6
  Updating : Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64 3/6
ls: cannot access /var/lib/mysql/*.err: No such file or directory
ls: cannot access /var/lib/mysql/*.err: No such file or directory
Giving mysqld 5 seconds to exit nicely
Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit.
Run the following commands to create these functions:
mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"
mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"
mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'"
See http://www.percona.com/doc/percona-server/5.6/management/udf_percona_toolkit.html for more details
  Cleanup : Percona-Server-server-56-5.6.21-rel70.1.el6.x86_64 4/6
  Cleanup : Percona-Server-client-56-5.6.21-rel70.1.el6.x86_64 5/6
  Cleanup : Percona-Server-shared-56-5.6.21-rel70.1.el6.x86_64 6/6
  Verifying : Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64 1/6
  Verifying : Percona-Server-client-56-5.6.22-rel71.0.el6.x86_64 2/6
  Verifying : Percona-Server-shared-56-5.6.22-rel71.0.el6.x86_64 3/6
  Verifying : Percona-Server-server-56-5.6.21-rel70.1.el6.x86_64 4/6
  Verifying : Percona-Server-client-56-5.6.21-rel70.1.el6.x86_64 5/6
  Verifying : Percona-Server-shared-56-5.6.21-rel70.1.el6.x86_64 6/6

Updated:
  Percona-Server-client-56.x86_64 0:5.6.22-rel71.0.el6 Percona-Server-server-56.x86_64 0:5.6.22-rel71.0.el6 Percona-Server-shared-56.x86_64 0:5.6.22-rel71.0.el6

Complete!

[vagrant@t-centos6-64 new]$ sudo service mysql status
 ERROR! MySQL (Percona Server) is not running
[vagrant@t-centos6-64 new]$ sudo service mysql start
Starting MySQL (Percona Server). SUCCESS!

### TEST6: CENTOS7 - RUNNING SERVICE WITH TOKUDB AND UPGRADE
[vagrant@t-centos7-64 new]$ sudo systemctl status mysql
mysqld.service - MySQL Percona Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled)
   Active: active (running) since Pon 2015-01-19 13:59:47 CET; 4min 27s ago
  Process: 3641 ExecStartPost=/usr/bin/mysql-systemd post (code=exited, status=0/SUCCESS)
  Process: 3610 ExecStartPre=/usr/bin/mysql-systemd pre (code=exited, status=0/SUCCESS)
 Main PID: 3640 (mysqld_safe)
   CGroup: /system.slice/mysqld.service
           ├─3640 /bin/sh /usr/bin/mysqld_safe
           └─3786 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.soc...

mysql> show variables like '%version%';
+-------------------------+--------------------------------------------------+
| Variable_name | Value |
+-------------------------+--------------------------------------------------+
| innodb_version | 5.6.21-70.1 |
| protocol_version | 10 |
| slave_type_conversions | |
| tokudb_version | tokudb-7.5.2 |
| version | 5.6.21-70.1 |
| version_comment | Percona Server (GPL), Release 70.1, Revision 698 |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+--------------------------------------------------+
8 rows in set (0,02 sec)

UPGRADE:
=======================================================================================================================================================================================================================================
 Package Arch Version Repository Size
=======================================================================================================================================================================================================================================
Updating:
 Percona-Server-client-56 x86_64 5.6.22-rel71.0.el7 /Percona-Server-client-56-5.6.22-rel71.0.el7.x86_64 33 M
 Percona-Server-server-56 x86_64 5.6.22-rel71.0.el7 /Percona-Server-server-56-5.6.22-rel71.0.el7.x86_64 87 M
 Percona-Server-shared-56 x86_64 5.6.22-rel71.0.el7 /Percona-Server-shared-56-5.6.22-rel71.0.el7.x86_64 3.4 M
 Percona-Server-tokudb-56 x86_64 5.6.22-rel71.0.el7 /Percona-Server-tokudb-56-5.6.22-rel71.0.el7.x86_64 4.5 M

Transaction Summary
=======================================================================================================================================================================================================================================
Upgrade 4 Packages

Total size: 128 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating : Percona-Server-shared-56-5.6.22-rel71.0.el7.x86_64 1/8
  Updating : Percona-Server-client-56-5.6.22-rel71.0.el7.x86_64 2/8
ls: cannot access /var/lib/mysql/*.err: No such file or directory
ls: cannot access /var/lib/mysql/*.err: No such file or directory
  Updating : Percona-Server-server-56-5.6.22-rel71.0.el7.x86_64 3/8
Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit.
Run the following commands to create these functions:
mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"
mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"
mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'"
See http://www.percona.com/doc/percona-server/5.6/management/udf_percona_toolkit.html for more details
  Updating : Percona-Server-tokudb-56-5.6.22-rel71.0.el7.x86_64 4/8
  Cleanup : Percona-Server-tokudb-56-5.6.21-rel70.1.el7.x86_64 5/8
  Cleanup : Percona-Server-server-56-5.6.21-rel70.1.el7.x86_64 6/8
  Cleanup : Percona-Server-client-56-5.6.21-rel70.1.el7.x86_64 7/8
  Cleanup : Percona-Server-shared-56-5.6.21-rel70.1.el7.x86_64 8/8
  Verifying : Percona-Server-tokudb-56-5.6.22-rel71.0.el7.x86_64 1/8
  Verifying : Percona-Server-client-56-5.6.22-rel71.0.el7.x86_64 2/8
  Verifying : Percona-Server-shared-56-5.6.22-rel71.0.el7.x86_64 3/8
  Verifying : Percona-Server-server-56-5.6.22-rel71.0.el7.x86_64 4/8
  Verifying : Percona-Server-shared-56-5.6.21-rel70.1.el7.x86_64 5/8
  Verifying : Percona-Server-server-56-5.6.21-rel70.1.el7.x86_64 6/8
  Verifying : Percona-Server-client-56-5.6.21-rel70.1.el7.x86_64 7/8
  Verifying : Percona-Server-tokudb-56-5.6.21-rel70.1.el7.x86_64 8/8

Updated:
  Percona-Server-client-56.x86_64 0:5.6.22-rel71.0.el7 Percona-Server-server-56.x86_64 0:5.6.22-rel71.0.el7 Percona-Server-shared-56.x86_64 0:5.6.22-rel71.0.el7 Percona-Server-tokudb-56.x86_64 0:5.6.22-rel71.0.el7

Complete!

[vagrant@t-centos7-64 new]$ sudo systemctl status mysql
mysqld.service - MySQL Percona Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled)
   Active: active (running) since Pon 2015-01-19 14:06:23 CET; 26s ago
  Process: 4019 ExecStartPost=/usr/bin/mysql-systemd post (code=exited, status=0/SUCCESS)
  Process: 3988 ExecStartPre=/usr/bin/mysql-systemd pre (code=exited, status=0/SUCCESS)
 Main PID: 4018 (mysqld_safe)
   CGroup: /system.slice/mysqld.service
           ├─4018 /bin/sh /usr/bin/mysqld_safe
           └─4164 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.soc...

Sij 19 14:06:02 t-centos7-64 systemd[1]: Starting MySQL Percona Server...
Sij 19 14:06:02 t-centos7-64 mysqld_safe[4018]: 150119 14:06:02 mysqld_safe Adding '/usr/lib64/libjemalloc.so.1' to LD_PRELOAD for mysqld
Sij 19 14:06:02 t-centos7-64 mysqld_safe[4018]: 150119 14:06:02 mysqld_safe Logging to '/var/log/mysqld.log'.
Sij 19 14:06:02 t-centos7-64 mysqld_safe[4018]: 150119 14:06:02 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Sij 19 14:06:23 t-centos7-64 systemd[1]: Started MySQL Percona Server.

mysql> show variables like '%version%';
+-------------------------+--------------------------------------------------+
| Variable_name | Value |
+-------------------------+--------------------------------------------------+
| innodb_version | 5.6.22-71.0 |
| protocol_version | 10 |
| slave_type_conversions | |
| tokudb_version | tokudb-7.5.4 |
| version | 5.6.22-71.0 |
| version_comment | Percona Server (GPL), Release 71.0, Revision 730 |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+--------------------------------------------------+
8 rows in set (0,02 sec)

mysql> select * from City limit 10;
+----+----------------+-------------+---------------+------------+
| ID | Name | CountryCode | District | Population |
+----+----------------+-------------+---------------+------------+
| 1 | Kabul | AFG | Kabol | 1780000 |
| 2 | Qandahar | AFG | Qandahar | 237500 |
| 3 | Herat | AFG | Herat | 186800 |
| 4 | Mazar-e-Sharif | AFG | Balkh | 127800 |
| 5 | Amsterdam | NLD | Noord-Holland | 731200 |
| 6 | Rotterdam | NLD | Zuid-Holland | 593321 |
| 7 | Haag | NLD | Zuid-Holland | 440900 |
| 8 | Utrecht | NLD | Utrecht | 234323 |
| 9 | Eindhoven | NLD | Noord-Brabant | 201843 |
| 10 | Tilburg | NLD | Noord-Brabant | 193238 |
+----+----------------+-------------+---------------+------------+
10 rows in set (0,01 sec)

### TEST7: CENTOS5 - RUNNING SERVICE WITH TOKUDB AND UPGRADE
mysql> show variables like '%version%';
+-------------------------+--------------------------------------------------+
| Variable_name | Value |
+-------------------------+--------------------------------------------------+
| innodb_version | 5.6.21-70.1 |
| protocol_version | 10 |
| slave_type_conversions | |
| tokudb_version | tokudb-7.5.2 |
| version | 5.6.21-70.1 |
| version_comment | Percona Server (GPL), Release 70.1, Revision 698 |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+--------------------------------------------------+
8 rows in set (0,00 sec)

[vagrant@t-centos5-64 ~]$ sudo /etc/init.d/mysql status
MySQL (Percona Server) running (4382) [ OK ]

UPGRADE:
=======================================================================================================================================================================================================================================
 Package Arch Version Repository Size
=======================================================================================================================================================================================================================================
Updating:
 Percona-Server-client-56 x86_64 5.6.22-rel71.0.el5 /Percona-Server-client-56-5.6.22-rel71.0.el5.x86_64 33 M
 Percona-Server-server-56 x86_64 5.6.22-rel71.0.el5 /Percona-Server-server-56-5.6.22-rel71.0.el5.x86_64 87 M
 Percona-Server-shared-56 x86_64 5.6.22-rel71.0.el5 /Percona-Server-shared-56-5.6.22-rel71.0.el5.x86_64 3.4 M
 Percona-Server-tokudb-56 x86_64 5.6.22-rel71.0.el5 /Percona-Server-tokudb-56-5.6.22-rel71.0.el5.x86_64 4.4 M

Transaction Summary
=======================================================================================================================================================================================================================================
Install 0 Package(s)
Upgrade 4 Package(s)

Total size: 127 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating : Percona-Server-shared-56 1/8
  Updating : Percona-Server-client-56 2/8
Giving mysqld 5 seconds to exit nicely
  Updating : Percona-Server-server-56 3/8
Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit.
Run the following commands to create these functions:
mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"
mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"
mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'"
See http://www.percona.com/doc/percona-server/5.6/management/udf_percona_toolkit.html for more details
  Updating : Percona-Server-tokudb-56 4/8
Starting MySQL (Percona Server)..[ OK ]
Giving mysqld 5 seconds to start
  Cleanup : Percona-Server-shared-56 5/8
  Cleanup : Percona-Server-server-56 6/8
  Cleanup : Percona-Server-client-56 7/8
  Cleanup : Percona-Server-tokudb-56 8/8

Updated:
  Percona-Server-client-56.x86_64 0:5.6.22-rel71.0.el5 Percona-Server-server-56.x86_64 0:5.6.22-rel71.0.el5 Percona-Server-shared-56.x86_64 0:5.6.22-rel71.0.el5 Percona-Server-tokudb-56.x86_64 0:5.6.22-rel71.0.el5

Complete!

[vagrant@t-centos5-64 new]$ sudo /etc/init.d/mysql status
MySQL (Percona Server) running (4634) [ OK ]

mysql> show variables like '%version%';
+-------------------------+--------------------------------------------------+
| Variable_name | Value |
+-------------------------+--------------------------------------------------+
| innodb_version | 5.6.22-71.0 |
| protocol_version | 10 |
| slave_type_conversions | |
| tokudb_version | tokudb-7.5.4 |
| version | 5.6.22-71.0 |
| version_comment | Percona Server (GPL), Release 71.0, Revision 730 |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+--------------------------------------------------+
8 rows in set (0,01 sec)

mysql> select * from City limit 10;
+----+----------------+-------------+---------------+------------+
| ID | Name | CountryCode | District | Population |
+----+----------------+-------------+---------------+------------+
| 1 | Kabul | AFG | Kabol | 1780000 |
| 2 | Qandahar | AFG | Qandahar | 237500 |
| 3 | Herat | AFG | Herat | 186800 |
| 4 | Mazar-e-Sharif | AFG | Balkh | 127800 |
| 5 | Amsterdam | NLD | Noord-Holland | 731200 |
| 6 | Rotterdam | NLD | Zuid-Holland | 593321 |
| 7 | Haag | NLD | Zuid-Holland | 440900 |
| 8 | Utrecht | NLD | Utrecht | 234323 |
| 9 | Eindhoven | NLD | Noord-Brabant | 201843 |
| 10 | Tilburg | NLD | Noord-Brabant | 193238 |
+----+----------------+-------------+---------------+------------+
10 rows in set (0,00 sec)

### TEST8: UBUNTU 14.04 - RUNNING SERVICE WITH TOKUDB AND UPGRADE
vagrant@t-ubuntu1404-64:~$ sudo service mysql status
 * /usr/bin/mysqladmin Ver 8.42 Distrib 5.6.21-70.1, for debian-linux-gnu on x86_64
Copyright (c) 2009-2014 Percona LLC and/or its affiliates
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Server version 5.6.21-70.1
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/run/mysqld/mysqld.sock
Uptime: 8 min 26 sec

Threads: 1 Questions: 6284 Slow queries: 0 Opens: 768 Flush tables: 1 Open tables: 82 Queries per second avg: 12.418

mysql> show variables like '%version%';
+-------------------------+--------------------------------------------------+
| Variable_name | Value |
+-------------------------+--------------------------------------------------+
| innodb_version | 5.6.21-70.1 |
| protocol_version | 10 |
| slave_type_conversions | |
| tokudb_version | tokudb-7.5.2 |
| version | 5.6.21-70.1 |
| version_comment | Percona Server (GPL), Release 70.1, Revision 698 |
| version_compile_machine | x86_64 |
| version_compile_os | debian-linux-gnu |
+-------------------------+--------------------------------------------------+
8 rows in set (0.02 sec)

UPGRADE:
vagrant@t-ubuntu1404-64:~$ sudo apt-get install percona-server-server-5.6 percona-server-tokudb-5.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libperconaserverclient18.1 percona-server-client-5.6
  percona-server-common-5.6
Suggested packages:
  tinyca
The following packages will be upgraded:
  libperconaserverclient18.1 percona-server-client-5.6
  percona-server-common-5.6 percona-server-server-5.6
  percona-server-tokudb-5.6
5 upgraded, 0 newly installed, 0 to remove and 46 not upgraded.
Need to get 16.8 MB of archives.
After this operation, 67.6 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://repo.percona.com/apt/ trusty/main percona-server-common-5.6 amd64 5.6.22-71.0-726.trusty [11.5 kB]
Get:2 http://repo.percona.com/apt/ trusty/main percona-server-tokudb-5.6 amd64 5.6.22-71.0-726.trusty [2,650 kB]
Get:3 http://repo.percona.com/apt/ trusty/main libperconaserverclient18.1 amd64 5.6.22-71.0-726.trusty [566 kB]
Get:4 http://repo.percona.com/apt/ trusty/main percona-server-client-5.6 amd64 5.6.22-71.0-726.trusty [1,392 kB]
Get:5 http://repo.percona.com/apt/ trusty/main percona-server-server-5.6 amd64 5.6.22-71.0-726.trusty [12.2 MB]
Fetched 16.8 MB in 40s (414 kB/s)
Preconfiguring packages ...
(Reading database ... 104045 files and directories currently installed.)
Preparing to unpack .../percona-server-common-5.6_5.6.22-71.0-726.trusty_amd64.deb ...
Unpacking percona-server-common-5.6 (5.6.22-71.0-726.trusty) over (5.6.21-70.1-698.trusty) ...
Preparing to unpack .../percona-server-tokudb-5.6_5.6.22-71.0-726.trusty_amd64.deb ...
Unpacking percona-server-tokudb-5.6 (5.6.22-71.0-726.trusty) over (5.6.21-70.1-698.trusty) ...
Preparing to unpack .../libperconaserverclient18.1_5.6.22-71.0-726.trusty_amd64.deb ...
Unpacking libperconaserverclient18.1 (5.6.22-71.0-726.trusty) over (5.6.21-70.1-698.trusty) ...
Preparing to unpack .../percona-server-client-5.6_5.6.22-71.0-726.trusty_amd64.deb ...
Unpacking percona-server-client-5.6 (5.6.22-71.0-726.trusty) over (5.6.21-70.1-698.trusty) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up percona-server-common-5.6 (5.6.22-71.0-726.trusty) ...
(Reading database ... 104045 files and directories currently installed.)
Preparing to unpack .../percona-server-server-5.6_5.6.22-71.0-726.trusty_amd64.deb ...
 * Stopping MySQL (Percona Server) mysqld
   ...done.
 * Stopping MySQL (Percona Server) mysqld
   ...done.
Unpacking percona-server-server-5.6 (5.6.22-71.0-726.trusty) over (5.6.21-70.1-698.trusty) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up libperconaserverclient18.1 (5.6.22-71.0-726.trusty) ...
Setting up percona-server-client-5.6 (5.6.22-71.0-726.trusty) ...
Setting up percona-server-server-5.6 (5.6.22-71.0-726.trusty) ...
Installing new version of config file /etc/init.d/mysql ...
 * Stopping MySQL (Percona Server) mysqld
   ...done.

 * Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit.
 * Run the following commands to create these functions:

        mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"
        mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"
        mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'"

 * See http://www.percona.com/doc/percona-server/5.6/management/udf_percona_toolkit.html for more details

 * Starting MySQL (Percona Server) database server mysqld
   ...done.
 * Checking for corrupt, not cleanly closed and upgrade needing tables.
Processing triggers for ureadahead (0.100.0-16) ...
Setting up percona-server-tokudb-5.6 (5.6.22-71.0-726.trusty) ...
Processing triggers for libc-bin (2.19-0ubuntu6.4) ...

vagrant@t-ubuntu1404-64:~$ sudo service mysql status
 * /usr/bin/mysqladmin Ver 8.42 Distrib 5.6.22-71.0, for debian-linux-gnu on x86_64
Copyright (c) 2009-2014 Percona LLC and/or its affiliates
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Server version 5.6.22-71.0
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/run/mysqld/mysqld.sock
Uptime: 1 min 5 sec

Threads: 1 Questions: 914 Slow queries: 0 Opens: 796 Flush tables: 2 Open tables: 83 Queries per second avg: 14.061

mysql> show variables like '%version%';
+-------------------------+--------------------------------------------------+
| Variable_name | Value |
+-------------------------+--------------------------------------------------+
| innodb_version | 5.6.22-71.0 |
| protocol_version | 10 |
| slave_type_conversions | |
| tokudb_version | tokudb-7.5.4 |
| version | 5.6.22-71.0 |
| version_comment | Percona Server (GPL), Release 71.0, Revision 726 |
| version_compile_machine | x86_64 |
| version_compile_os | debian-linux-gnu |
+-------------------------+--------------------------------------------------+
8 rows in set (0.00 sec)

mysql> select * from City limit 10;
+----+----------------+-------------+---------------+------------+
| ID | Name | CountryCode | District | Population |
+----+----------------+-------------+---------------+------------+
| 1 | Kabul | AFG | Kabol | 1780000 |
| 2 | Qandahar | AFG | Qandahar | 237500 |
| 3 | Herat | AFG | Herat | 186800 |
| 4 | Mazar-e-Sharif | AFG | Balkh | 127800 |
| 5 | Amsterdam | NLD | Noord-Holland | 731200 |
| 6 | Rotterdam | NLD | Zuid-Holland | 593321 |
| 7 | Haag | NLD | Zuid-Holland | 440900 |
| 8 | Utrecht | NLD | Utrecht | 234323 |
| 9 | Eindhoven | NLD | Noord-Brabant | 201843 |
| 10 | Tilburg | NLD | Noord-Brabant | 193238 |
+----+----------------+-------------+---------------+------------+
10 rows in set (0.01 sec)

To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

It needs a Launchpad bug

review: Needs Information
Revision history for this message
Tomislav Plavcic (tplavcic) wrote :

Opened: https://bugs.launchpad.net/percona-server/+bug/1413956
Linked to the branch and jira ticket.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'build-ps/percona-server.spec'
2--- build-ps/percona-server.spec 2015-01-13 14:38:41 +0000
3+++ build-ps/percona-server.spec 2015-01-19 14:55:22 +0000
4@@ -951,7 +951,10 @@
5 # For systemd check postun
6 %if 0%{?systemd} == 0
7 # Was the server running before the upgrade? If so, restart the new one.
8-if [ "$SERVER_TO_START" = "true" ] ; then
9+# Don't start it if TokuDB package is installed - it will be started
10+# after TokuDB package is upgraded - prevents TokuDB init error
11+tokudb_installed=`rpm -q Percona-Server-tokudb-56 2>/dev/null`
12+if [ $? -eq 1 -a "$SERVER_TO_START" = "true" ] ; then
13 # Restart in the same way that mysqld will be started normally.
14 if [ -x %{_sysconfdir}/init.d/mysql ] ; then
15 %{_sysconfdir}/init.d/mysql start
16@@ -974,7 +977,7 @@
17 echo "=====" >> $STATUS_FILE
18 STATUS_HISTORY=$mysql_datadir/RPM_UPGRADE_HISTORY
19 cat $STATUS_FILE >> $STATUS_HISTORY
20-mv -f $STATUS_FILE ${STATUS_FILE}-LAST # for "triggerpostun"
21+mv -f $STATUS_FILE ${STATUS_FILE}-LAST # for "triggerpostun" and TokuDB package
22
23
24 #echo "Thank you for installing the MySQL Community Server! For Production
25@@ -1109,6 +1112,40 @@
26 echo "* See http://www.percona.com/doc/percona-server/5.6/tokudb/tokudb_intro.html for more details"
27 echo ""
28 fi
29+# If upgrade is in question and the server was started before upgrade we need to start it
30+# after upgrading TokuDB package and not before because TokuDB will fail on init
31+%if 0%{?systemd} == 0
32+if [ $1 -eq 2 ]; then
33+ # There are users who deviate from the default file system layout.
34+ # Check local settings to support them.
35+ if [ -x %{_bindir}/my_print_defaults ]
36+ then
37+ mysql_datadir=`%{_bindir}/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p' | tail -n 1`
38+ fi
39+ if [ -z "$mysql_datadir" ]
40+ then
41+ mysql_datadir=%{mysqldatadir}
42+ fi
43+
44+ STATUS_FILE=$mysql_datadir/RPM_UPGRADE_MARKER-LAST
45+
46+ if [ -f $STATUS_FILE ] ; then
47+ SERVER_TO_START=`grep '^SERVER_TO_START=' $STATUS_FILE | cut -c17-`
48+ else
49+ SERVER_TO_START=''
50+ fi
51+
52+ # Was the server running before the upgrade? If so, restart the new one.
53+ if [ "$SERVER_TO_START" = "true" ] ; then
54+ # Restart in the same way that mysqld will be started normally.
55+ if [ -x %{_sysconfdir}/init.d/mysql ] ; then
56+ %{_sysconfdir}/init.d/mysql start
57+ echo "Giving mysqld 5 seconds to start"
58+ sleep 5
59+ fi
60+ fi
61+fi
62+%endif
63 # ----------------------------------------------------------------------------
64 %endif
65

Subscribers

People subscribed via source and target branches