mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-03-19 01:02:16 +08:00
PT-1554 fixed sandbox script for gtid with 5.6
This commit is contained in:
@@ -122,8 +122,12 @@ make_sandbox() {
|
||||
fi
|
||||
|
||||
if [ -n "$GTID" ]; then
|
||||
#echo "gtid_mode=on" >> ${TMP_DIR}/$port/my.sandbox.cnf
|
||||
echo "gtid_mode=ON_PERMISSIVE" >> ${TMP_DIR}/$port/my.sandbox.cnf
|
||||
if [ "$version" "<" '5.7' ]; then
|
||||
echo "gtid_mode=on" >> ${TMP_DIR}/$port/my.sandbox.cnf
|
||||
fi
|
||||
if [ ! "$version" "<" '5.7' ]; then
|
||||
echo "gtid_mode=ON_PERMISSIVE" >> ${TMP_DIR}/$port/my.sandbox.cnf
|
||||
fi
|
||||
echo "enforce_gtid_consistency" >> ${TMP_DIR}/$port/my.sandbox.cnf
|
||||
fi
|
||||
if [ -n "$REPLICATION_THREADS" ]; then
|
||||
@@ -143,7 +147,7 @@ make_sandbox() {
|
||||
|
||||
if [ $generating_database -eq 1 ]; then
|
||||
echo "Creating default databases ..."
|
||||
if [ "$version" > "5.6" ]; then
|
||||
if [ "$version" ">" "5.6" ]; then
|
||||
rm -f ${TMP_DIR}/empty-defaults.txt
|
||||
touch ${TMP_DIR}/empty-defaults.txt
|
||||
rm -rf ${TMP_DIR}/$port/data
|
||||
|
||||
@@ -19,7 +19,9 @@ if ( $sandbox_version lt '5.6' ) {
|
||||
plan skip_all => "Requires MySQL 5.6";
|
||||
}
|
||||
|
||||
diag('Restarting the sandbox');
|
||||
diag(`SAKILA=0 GTID=1 $trunk/sandbox/test-env restart`);
|
||||
diag("Sandbox restarted");
|
||||
|
||||
my $dp = new DSNParser(opts=>$dsn_opts);
|
||||
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
|
||||
|
||||
Reference in New Issue
Block a user