PT-1554 fixed sandbox script for gtid with 5.6

This commit is contained in:
Carlos Salguero
2018-05-30 00:26:20 -03:00
parent af62172435
commit f4e7230bbd
2 changed files with 9 additions and 3 deletions

View File

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

View File

@@ -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);