forked from Percona-QA/package-testing
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created script for native partitioning upgrade 5.7 to 8.0 Disabled selinux on centos6 because different images
- Loading branch information
Showing
16 changed files
with
191 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
if [ -f /etc/mysql/my.cnf ]; then | ||
MYCNF="/etc/mysql/my.cnf" | ||
else | ||
MYCNF="/etc/my.cnf" | ||
fi | ||
|
||
echo "Adding the config vars" | ||
service mysql stop | ||
sleep 10 | ||
if [ $(grep -c "\[mysqld\]" ${MYCNF}) -eq 0 ]; then | ||
echo -e "\n[mysqld]" >> ${MYCNF} | ||
fi | ||
sed -i '/\[mysqld\]/a rocksdb_enable_native_partition=ON' ${MYCNF} | ||
sed -i '/\[mysqld\]/a tokudb_enable_native_partition=ON' ${MYCNF} | ||
service mysql start | ||
sleep 10 | ||
|
||
echo "upgrade tables" | ||
mysql -e "ALTER TABLE comp_test.t1_RocksDB_default UPGRADE PARTITIONING;" | ||
mysql -e "ALTER TABLE comp_test.t1_RocksDB_lz4 UPGRADE PARTITIONING;" | ||
mysql -e "ALTER TABLE comp_test.t1_RocksDB_no UPGRADE PARTITIONING;" | ||
mysql -e "ALTER TABLE comp_test.t1_RocksDB_zlib UPGRADE PARTITIONING;" | ||
mysql -e "ALTER TABLE comp_test.t1_RocksDB_zstd UPGRADE PARTITIONING;" | ||
mysql -e "ALTER TABLE comp_test.t1_TokuDB_default UPGRADE PARTITIONING;" | ||
mysql -e "ALTER TABLE comp_test.t1_TokuDB_lzma UPGRADE PARTITIONING;" | ||
mysql -e "ALTER TABLE comp_test.t1_TokuDB_no UPGRADE PARTITIONING;" | ||
mysql -e "ALTER TABLE comp_test.t1_TokuDB_quicklz UPGRADE PARTITIONING;" | ||
mysql -e "ALTER TABLE comp_test.t1_TokuDB_snappy UPGRADE PARTITIONING;" | ||
mysql -e "ALTER TABLE comp_test.t1_TokuDB_zlib UPGRADE PARTITIONING;" | ||
|
||
echo "remove the config vars" | ||
sed -i '/rocksdb_enable_native_partition=/d' ${MYCNF} | ||
sed -i '/tokudb_enable_native_partition=/d' ${MYCNF} | ||
service mysql restart | ||
sleep 10 |
Oops, something went wrong.