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

Proposed by Tomislav Plavcic
Status: Superseded
Proposed branch: lp:~tplavcic/percona-server/bld-212-5.6-tokudb
Merge into: lp:percona-server/5.6
Diff against target: 390 lines (+283/-23)
6 files modified
build-ps/debian/percona-server-tokudb-5.6.files (+1/-0)
build-ps/debian/percona-server-tokudb-5.6.postinst (+3/-9)
build-ps/percona-server.spec (+9/-14)
scripts/CMakeLists.txt (+1/-0)
scripts/mysqld_safe.sh (+42/-0)
scripts/ps_tokudb_admin.sh (+227/-0)
To merge this branch: bzr merge lp:~tplavcic/percona-server/bld-212-5.6-tokudb
Reviewer Review Type Date Requested Status
Roel Van de Paar (community) Needs Information
Laurynas Biveinis (community) Needs Information
Review via email: mp+246539@code.launchpad.net

This proposal has been superseded by a proposal from 2015-01-15.

Description of the change

This change is for BLD-212 (simplify TokuDB installation).
It adds ps_tokudb_admin script which can install/uninstall TokuDB plugin and disable transparent huge pages.
Mysqld_safe was changed to read thp-setting option from my.cnf

Extensive testing was done in BLD-212 so here I only show how install/uninstall works on centos7.
Test packages are available here:
http://jenkins.percona.com/job/percona-server-5.6-RELEASE/96/

INSTALL
-------
[vagrant@t-centos7-64 ~]$ sudo ps_tokudb_admin -e -u root
Checking transparent huge pages status on the system...
>> Transparent huge pages are enabled (should be disabled).

Checking if thp-setting=never option is already set in config file...
>> Option thp-setting=never is not set in the config file.
>> (needed only if THP is not disabled permanently on the system)

Checking TokuDB plugin status...
>> TokuDB plugin is not installed.

Disabling transparent huge pages for the current session...
>> Successfuly disabled transparent huge pages for this session.

Adding thp-setting=never option into /etc/my.cnf
>> Successfuly added thp-setting=never option into /etc/my.cnf

Installing TokuDB engine...
>> Successfuly installed TokuDB plugin.

mysql> show plugins;
...
| TokuDB | ACTIVE | STORAGE ENGINE | ha_tokudb.so | GPL |
| TokuDB_file_map | ACTIVE | INFORMATION SCHEMA | ha_tokudb.so | GPL |
| TokuDB_fractal_tree_info | ACTIVE | INFORMATION SCHEMA | ha_tokudb.so | GPL |
| TokuDB_fractal_tree_block_map | ACTIVE | INFORMATION SCHEMA | ha_tokudb.so | GPL |
| TokuDB_trx | ACTIVE | INFORMATION SCHEMA | ha_tokudb.so | GPL |
| TokuDB_locks | ACTIVE | INFORMATION SCHEMA | ha_tokudb.so | GPL |
| TokuDB_lock_waits | ACTIVE | INFORMATION SCHEMA | ha_tokudb.so | GPL |
+-------------------------------+----------+--------------------+--------------+---------+

UNINSTALL
---------
[vagrant@t-centos7-64 ~]$ sudo ps_tokudb_admin -d -u root
Checking transparent huge pages status on the system...
>> Transparent huge pages are currently disabled on the system.

Checking if thp-setting=never option is already set in config file...
>> Option thp-setting=never is set in the config file.

Checking TokuDB plugin status...
>> TokuDB plugin is installed.

Removing thp-setting=never option from /etc/my.cnf
>> Successfuly removed thp-setting=never option from /etc/my.cnf

Uninstalling TokuDB plugin...
>> Successfuly uninstalled TokuDB plugin.

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

It needs a blueprint?

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

Created some blueprint - please check.

Revision history for this message
Roel Van de Paar (roel11) wrote :

The script does not allow specification of host/socket/port. Thus, it assumes that PS is installed in a standard way (yum/apt), on a standard port, etc.

If the customer has both MS and PS on one box, on different ports, the wrong one may be auto-selected depending on which one is running on the default port, etc.

review: Needs Information
Revision history for this message
Roel Van de Paar (roel11) wrote :

Also, I am not sure about removing the INSTALL PLUGIN information from postinst. It may still make sense for many DBA's to quickly hop in a CLI and execute this, rather then using a new tool.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'build-ps/debian/percona-server-tokudb-5.6.files'
--- build-ps/debian/percona-server-tokudb-5.6.files 2014-09-27 13:49:22 +0000
+++ build-ps/debian/percona-server-tokudb-5.6.files 2015-01-15 08:09:15 +0000
@@ -1,3 +1,4 @@
1usr/lib/mysql/plugin/ha_tokudb.so1usr/lib/mysql/plugin/ha_tokudb.so
2usr/lib/mysql/plugin/debug/ha_tokudb.so2usr/lib/mysql/plugin/debug/ha_tokudb.so
3usr/bin/tokuftdump3usr/bin/tokuftdump
4usr/bin/ps_tokudb_admin
45
=== modified file 'build-ps/debian/percona-server-tokudb-5.6.postinst'
--- build-ps/debian/percona-server-tokudb-5.6.postinst 2014-05-20 21:04:08 +0000
+++ build-ps/debian/percona-server-tokudb-5.6.postinst 2015-01-15 08:09:15 +0000
@@ -3,15 +3,9 @@
3# Some postinstall info about TokuDB3# Some postinstall info about TokuDB
4if [ -z "$2" ]; then4if [ -z "$2" ]; then
5 echo -e "\n\n * This release of Percona Server is distributed with TokuDB storage engine."5 echo -e "\n\n * This release of Percona Server is distributed with TokuDB storage engine."
6 echo -e " * Run the following commands to enable the TokuDB storage engine in Percona Server:\n"6 echo -e " * Run the following script to enable the TokuDB storage engine in Percona Server:\n"
7 echo -e "\tmysql -e \"INSTALL PLUGIN tokudb SONAME 'ha_tokudb.so';\""7 echo -e "\tps_tokudb_admin --enable -u <mysql_admin_user> -p <mysql_admin_pass>\n"
8 echo -e "\tmysql -e \"INSTALL PLUGIN tokudb_file_map SONAME 'ha_tokudb.so';\""8 echo -e " * See http://www.percona.com/doc/percona-server/5.6/tokudb/tokudb_intro.html for more details\n\n"
9 echo -e "\tmysql -e \"INSTALL PLUGIN tokudb_fractal_tree_info SONAME 'ha_tokudb.so';\""
10 echo -e "\tmysql -e \"INSTALL PLUGIN tokudb_fractal_tree_block_map SONAME 'ha_tokudb.so';\""
11 echo -e "\tmysql -e \"INSTALL PLUGIN tokudb_trx SONAME 'ha_tokudb.so';\""
12 echo -e "\tmysql -e \"INSTALL PLUGIN tokudb_locks SONAME 'ha_tokudb.so';\""
13 echo -e "\tmysql -e \"INSTALL PLUGIN tokudb_lock_waits SONAME 'ha_tokudb.so';\""
14 echo -e "\n * See http://www.percona.com/doc/percona-server/5.6/tokudb/tokudb_intro.html for more details\n\n"
15fi9fi
1610
17#DEBHELPER#11#DEBHELPER#
1812
=== modified file 'build-ps/percona-server.spec'
--- build-ps/percona-server.spec 2015-01-13 14:38:41 +0000
+++ build-ps/percona-server.spec 2015-01-15 08:09:15 +0000
@@ -651,6 +651,10 @@
651%if 0%{?systemd}651%if 0%{?systemd}
652rm -rf $RBR%{_sysconfdir}/init.d/mysql652rm -rf $RBR%{_sysconfdir}/init.d/mysql
653%endif653%endif
654# Not needed if TokuDB package is not created
655%if ! %{with tokudb}
656rm -rf $RBR%{_bindir}/ps_tokudb_admin
657%endif
654658
655##############################################################################659##############################################################################
656# Post processing actions, i.e. when installed660# Post processing actions, i.e. when installed
@@ -1094,20 +1098,10 @@
1094%post -n Percona-Server-tokudb%{product_suffix}1098%post -n Percona-Server-tokudb%{product_suffix}
10951099
1096if [ $1 -eq 1 ] ; then1100if [ $1 -eq 1 ] ; then
1097 echo ""1101 echo -e "\n\n * This release of Percona Server is distributed with TokuDB storage engine."
1098 echo "* This release of Percona Server is distributed with TokuDB storage engine."1102 echo -e " * Run the following script to enable the TokuDB storage engine in Percona Server:\n"
1099 echo "* Run the following commands to enable the TokuDB storage engine in Percona Server:"1103 echo -e "\tps_tokudb_admin --enable -u <mysql_admin_user> -p <mysql_admin_pass>\n"
1100 echo ""1104 echo -e " * See http://www.percona.com/doc/percona-server/5.6/tokudb/tokudb_intro.html for more details\n\n"
1101 echo "mysql -e \"INSTALL PLUGIN tokudb SONAME 'ha_tokudb.so';\""
1102 echo "mysql -e \"INSTALL PLUGIN tokudb_file_map SONAME 'ha_tokudb.so';\""
1103 echo "mysql -e \"INSTALL PLUGIN tokudb_fractal_tree_info SONAME 'ha_tokudb.so';\""
1104 echo "mysql -e \"INSTALL PLUGIN tokudb_fractal_tree_block_map SONAME 'ha_tokudb.so';\""
1105 echo "mysql -e \"INSTALL PLUGIN tokudb_trx SONAME 'ha_tokudb.so';\""
1106 echo "mysql -e \"INSTALL PLUGIN tokudb_locks SONAME 'ha_tokudb.so';\""
1107 echo "mysql -e \"INSTALL PLUGIN tokudb_lock_waits SONAME 'ha_tokudb.so';\""
1108 echo ""
1109 echo "* See http://www.percona.com/doc/percona-server/5.6/tokudb/tokudb_intro.html for more details"
1110 echo ""
1111fi1105fi
1112# ----------------------------------------------------------------------------1106# ----------------------------------------------------------------------------
1113%endif1107%endif
@@ -1375,6 +1369,7 @@
1375%{_bindir}/tokuftdump1369%{_bindir}/tokuftdump
1376%{_libdir}/mysql/plugin/ha_tokudb.so1370%{_libdir}/mysql/plugin/ha_tokudb.so
1377%attr(755, root, root) %{_libdir}/mysql/plugin/debug/ha_tokudb.so1371%attr(755, root, root) %{_libdir}/mysql/plugin/debug/ha_tokudb.so
1372%attr(755, root, root) %{_bindir}/ps_tokudb_admin
1378%endif1373%endif
13791374
1380# ----------------------------------------------------------------------------1375# ----------------------------------------------------------------------------
13811376
=== modified file 'scripts/CMakeLists.txt'
--- scripts/CMakeLists.txt 2014-12-16 06:00:17 +0000
+++ scripts/CMakeLists.txt 2015-01-15 08:09:15 +0000
@@ -339,6 +339,7 @@
339 mysqldumpslow339 mysqldumpslow
340 mysqld_multi340 mysqld_multi
341 mysqld_safe341 mysqld_safe
342 ps_tokudb_admin
342 )343 )
343 FOREACH(file ${BIN_SCRIPTS})344 FOREACH(file ${BIN_SCRIPTS})
344 IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh)345 IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh)
345346
=== modified file 'scripts/mysqld_safe.sh'
--- scripts/mysqld_safe.sh 2014-12-01 07:53:48 +0000
+++ scripts/mysqld_safe.sh 2015-01-15 08:09:15 +0000
@@ -20,6 +20,8 @@
20load_jemalloc=120load_jemalloc=1
21flush_caches=021flush_caches=0
22numa_interleave=022numa_interleave=0
23# Change (disable) transparent huge pages (TokuDB requirement)
24thp_setting=
2325
24# Initial logging status: error log is not open, and not using syslog26# Initial logging status: error log is not open, and not using syslog
25logging=init27logging=init
@@ -233,6 +235,7 @@
233 --open-files-limit=*) open_files="$val" ;;235 --open-files-limit=*) open_files="$val" ;;
234 --open_files_limit=*) open_files="$val" ;;236 --open_files_limit=*) open_files="$val" ;;
235 --skip-kill-mysqld*) KILL_MYSQLD=0 ;;237 --skip-kill-mysqld*) KILL_MYSQLD=0 ;;
238 --thp-setting=*) thp_setting="$val" ;;
236 --syslog) want_syslog=1 ;;239 --syslog) want_syslog=1 ;;
237 --skip-syslog) want_syslog=0 ;;240 --skip-syslog) want_syslog=0 ;;
238 --syslog-tag=*) syslog_tag="$val" ;;241 --syslog-tag=*) syslog_tag="$val" ;;
@@ -799,6 +802,45 @@
799 exit 1802 exit 1
800fi803fi
801804
805# Change transparent huge pages setting if thp-setting option specified
806if [ -n "$thp_setting" ]
807then
808 if [ $(id -u) -ne 0 ]; then
809 log_error "mysqld_safe must be run as root for setting transparent huge pages!"
810 exit 1
811 elif [ $thp_setting != "always" -a $thp_setting != "madvise" -a $thp_setting != "never" ]; then
812 log_error "Invalid value for thp-setting=$thp_setting in config file. Valid values are: always, madvise or never"
813 exit 1
814 else
815 if [ -f /sys/kernel/mm/transparent_hugepage/enabled ]; then
816 CONTENT_THP=$(cat /sys/kernel/mm/transparent_hugepage/enabled)
817 STATUS_THP=0
818 set +e
819 STATUS_THP=$(echo $CONTENT_THP | grep -cv "\[${thp_setting}\]")
820 set -e
821 fi
822 if [ $STATUS_THP -eq 0 ]; then
823 log_notice "Transparent huge pages are already set to: ${thp_setting}."
824 else
825 if [ -f /sys/kernel/mm/transparent_hugepage/defrag ]; then
826 echo $thp_setting > /sys/kernel/mm/transparent_hugepage/defrag
827 if [ $? -ne 0 ]; then
828 log_error "Error setting transparent huge pages to: ${thp_setting}."
829 exit 1
830 fi
831 fi
832 if [ -f /sys/kernel/mm/transparent_hugepage/enabled ]; then
833 echo $thp_setting > /sys/kernel/mm/transparent_hugepage/enabled
834 if [ $? -ne 0 ]; then
835 log_error "Error setting transparent huge pages to: ${thp_setting}."
836 exit 1
837 fi
838 fi
839 log_notice "Successfuly set transparent huge pages to: ${thp_setting}."
840 fi
841 fi
842fi
843
802#844#
803# Uncomment the following lines if you want all tables to be automatically845# Uncomment the following lines if you want all tables to be automatically
804# checked and repaired during startup. You should add sensible key_buffer846# checked and repaired during startup. You should add sensible key_buffer
805847
=== added file 'scripts/ps_tokudb_admin.sh'
--- scripts/ps_tokudb_admin.sh 1970-01-01 00:00:00 +0000
+++ scripts/ps_tokudb_admin.sh 2015-01-15 08:09:15 +0000
@@ -0,0 +1,227 @@
1#!/bin/bash
2#
3# Script for installing TokuDB plugin in Percona Server
4#
5
6# Bail out on errors, be strict
7set -ue
8
9# Examine parameters
10# default user
11USER="root"
12# default pass
13PASSWORD=""
14STATUS_THP_SYSTEM=0
15STATUS_THP_MYCNF=0
16STATUS_PLUGIN=0
17ENABLE=0
18DISABLE=0
19MYCNF_LOCATION=
20MYSQLD_SAFE_STATUS=0
21
22# Check if we have a functional getopt(1)
23if ! getopt --test
24 then
25 go_out="$(getopt --options=u:p:edh \
26 --longoptions=user:,password:,enable,disable,help \
27 --name="$(basename "$0")" -- "$@")"
28 test $? -eq 0 || exit 1
29 eval set -- $go_out
30fi
31
32for arg
33do
34 case "$arg" in
35 -- ) shift; break;;
36 -u | --user )
37 shift
38 USER="$1"
39 ;;
40 -p | --password )
41 shift
42 PASSWORD="-p$1"
43 ;;
44 -e | --enable )
45 shift
46 ENABLE=1
47 ;;
48 -d | --disable )
49 shift
50 DISABLE=1
51 ;;
52 -h | --help )
53 printf "This script is used for installing and uninstalling TokuDB plugin for Percona Server 5.6.\n"
54 printf "If transparent huge pages are enabled on the system it adds thp-setting=never option to my.cnf\n"
55 printf "to disable it on runtime.\n\n"
56 printf "Valid options are:\n"
57 printf " -u, --user <USER>\t mysql admin username\n"
58 printf " -p, --password <PASS>\t mysql admin password\n"
59 printf " -e, --enable\t\t enable TokuDB plugin and disable transparent huge pages in my.cnf\n"
60 printf " -d, --disable\t\t disable TokuDB plugin and remove thp-setting=never option in my.cnf\n"
61 printf " -h, --help\t\t show this help\n\n"
62 printf "For TokuDB requirements and manual steps for installation please visit this webpage:\n"
63 printf "http://www.percona.com/doc/percona-server/5.6/tokudb/tokudb_installation.html\n\n"
64 exit 0
65 ;;
66 esac
67done
68
69# Make sure only root can run this script
70if [ $(id -u) -ne 0 ]; then
71 echo "This script must be run as root!" 1>&2
72 exit 1
73fi
74
75if [ $ENABLE = 1 -a $DISABLE = 1 ]; then
76 printf "Only --enable OR --disable can be specified - not both!\n"
77 exit 1
78elif [ $ENABLE = 0 -a $DISABLE = 0 ]; then
79 printf "You should specify --enable or --disable option. Use --help for printing options.\n"
80 exit 1
81fi
82
83# Check transparent huge pages status on the system
84printf "Checking transparent huge pages status on the system...\n"
85if [ -f /sys/kernel/mm/transparent_hugepage/enabled ]; then
86 CONTENT_TRANSHP=$(</sys/kernel/mm/transparent_hugepage/enabled)
87 set +e
88 STATUS_THP_SYSTEM=$(echo $CONTENT_TRANSHP | grep -cv '\[never\]')
89 set -e
90fi
91if [ $STATUS_THP_SYSTEM = 0 ]; then
92 printf ">> Transparent huge pages are currently disabled on the system.\n\n"
93else
94 printf ">> Transparent huge pages are enabled (should be disabled).\n\n"
95fi
96
97# Check thp-setting=never option in my.cnf
98printf "Checking if thp-setting=never option is already set in config file...\n"
99set +e
100STATUS_THP_MYCNF=$(my_print_defaults server mysqld mysqld_safe|grep -c thp-setting=never)
101set -e
102if [ $STATUS_THP_MYCNF = 0 ]; then
103 printf ">> Option thp-setting=never is not set in the config file.\n"
104 printf ">> (needed only if THP is not disabled permanently on the system)\n\n"
105else
106 printf ">> Option thp-setting=never is set in the config file.\n\n"
107fi
108
109# Check location of my.cnf
110if [ -f /etc/my.cnf ]; then
111 MYCNF_LOCATION=/etc/my.cnf
112elif [ -f /etc/mysql/my.cnf ]; then
113 MYCNF_LOCATION=/etc/mysql/my.cnf
114elif [ -f /usr/etc/my.cnf ]; then
115 MYCNF_LOCATION=/usr/etc/my.cnf
116else
117 if [ -d /etc/mysql ]; then
118 MYCNF_LOCATION=/etc/mysql/my.cnf
119 else
120 MYCNF_LOCATION=/etc/my.cnf
121 fi
122 echo -n "" >> ${MYCNF_LOCATION}
123fi
124
125# Check TokuDB plugin status
126printf "Checking TokuDB plugin status...\n"
127LIST_ENGINE=$(mysql -e "show plugins;" -u$USER $PASSWORD)
128if [ $? -ne 0 ]; then
129 printf ">> Error checking TokuDB plugin status!\n";
130 exit 1
131fi
132set +e
133STATUS_PLUGIN=$(echo "$LIST_ENGINE" | grep -c "TokuDB")
134set -e
135if [ $STATUS_PLUGIN = 0 ]; then
136 printf ">> TokuDB plugin is not installed.\n\n"
137elif [ $STATUS_PLUGIN = 7 ]; then
138 printf ">> TokuDB plugin is installed.\n\n"
139else
140 printf ">> TokuDB plugin is partially installed. Please cleanup manually.\n\n"
141 exit 1
142fi
143
144# Disable transparent huge pages in the current session so
145# that the plugin can be installed without restarting PS
146if [ $ENABLE = 1 -a $STATUS_THP_SYSTEM = 1 ]; then
147 printf "Disabling transparent huge pages for the current session...\n"
148 if test -f /sys/kernel/mm/transparent_hugepage/defrag; then
149 echo never > /sys/kernel/mm/transparent_hugepage/defrag
150 fi
151 if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
152 echo never > /sys/kernel/mm/transparent_hugepage/enabled
153 fi
154 if [ $? -eq 0 ]; then
155 printf ">> Successfuly disabled transparent huge pages for this session.\n\n"
156 else
157 printf ">> Error disabling transparent huge pages for this session.\n\n"
158 exit 1
159 fi
160fi
161
162# Add option to disable transparent huge pages into my.cnf
163if [ $ENABLE = 1 -a $STATUS_THP_MYCNF = 0 ]; then
164 printf "Adding thp-setting=never option into $MYCNF_LOCATION\n"
165 set +e
166 MYSQLD_SAFE_STATUS=$(grep -c "^\[mysqld_safe\]$" $MYCNF_LOCATION)
167 set -e
168 if [ $MYSQLD_SAFE_STATUS = 0 ]; then
169 echo -e "\n[mysqld_safe]\nthp-setting=never" >> $MYCNF_LOCATION
170 else
171 sed -i '/^\[mysqld_safe\]$/a thp-setting=never' $MYCNF_LOCATION
172 fi
173 if [ $? -eq 0 ]; then
174 printf ">> Successfuly added thp-setting=never option into $MYCNF_LOCATION\n\n";
175 else
176 printf ">> Error adding thp-setting=never option into $MYCNF_LOCATION\n\n";
177 exit 1
178 fi
179fi
180
181# Remove option for disabling transparent huge pages from my.cnf
182if [ $DISABLE = 1 -a $STATUS_THP_MYCNF = 1 ]; then
183 printf "Removing thp-setting=never option from $MYCNF_LOCATION\n"
184 sed -i '/^thp-setting=never$/d' $MYCNF_LOCATION
185 if [ $? -eq 0 ]; then
186 printf ">> Successfuly removed thp-setting=never option from $MYCNF_LOCATION\n\n";
187 else
188 printf ">> Error removing thp-setting=never option from $MYCNF_LOCATION\n\n";
189 exit 1
190 fi
191fi
192
193# Installing TokuDB plugin
194if [ $ENABLE = 1 -a $STATUS_PLUGIN = 0 ]; then
195 printf "Installing TokuDB engine...\n"
196 mysql -e "INSTALL PLUGIN tokudb SONAME 'ha_tokudb.so';" -u$USER $PASSWORD &&
197 mysql -e "INSTALL PLUGIN tokudb_file_map SONAME 'ha_tokudb.so';" -u$USER $PASSWORD &&
198 mysql -e "INSTALL PLUGIN tokudb_fractal_tree_info SONAME 'ha_tokudb.so';" -u$USER $PASSWORD &&
199 mysql -e "INSTALL PLUGIN tokudb_fractal_tree_block_map SONAME 'ha_tokudb.so';" -u$USER $PASSWORD &&
200 mysql -e "INSTALL PLUGIN tokudb_trx SONAME 'ha_tokudb.so';" -u$USER $PASSWORD &&
201 mysql -e "INSTALL PLUGIN tokudb_locks SONAME 'ha_tokudb.so';" -u$USER $PASSWORD &&
202 mysql -e "INSTALL PLUGIN tokudb_lock_waits SONAME 'ha_tokudb.so';" -u$USER $PASSWORD
203 if [ $? -eq 0 ]; then
204 printf ">> Successfuly installed TokuDB plugin.\n\n"
205 else
206 printf ">> Error installing TokuDB plugin. Please check error log.\n\n"
207 exit 1
208 fi
209fi
210
211# Uninstalling TokuDB plugin
212if [ $DISABLE = 1 -a $STATUS_PLUGIN = 7 ]; then
213 printf "Uninstalling TokuDB plugin...\n"
214 mysql -e "UNINSTALL PLUGIN tokudb;" -u$USER $PASSWORD &&
215 mysql -e "UNINSTALL PLUGIN tokudb_file_map;" -u$USER $PASSWORD &&
216 mysql -e "UNINSTALL PLUGIN tokudb_fractal_tree_info;" -u$USER $PASSWORD &&
217 mysql -e "UNINSTALL PLUGIN tokudb_fractal_tree_block_map;" -u$USER $PASSWORD &&
218 mysql -e "UNINSTALL PLUGIN tokudb_trx;" -u$USER $PASSWORD &&
219 mysql -e "UNINSTALL PLUGIN tokudb_locks;" -u$USER $PASSWORD &&
220 mysql -e "UNINSTALL PLUGIN tokudb_lock_waits;" -u$USER $PASSWORD
221 if [ $? -eq 0 ]; then
222 printf ">> Successfuly uninstalled TokuDB plugin.\n\n"
223 else
224 printf ">> Error uninstalling TokuDB plugin. Please check error log.\n\n"
225 exit 1
226 fi
227fi

Subscribers

People subscribed via source and target branches