Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

Commit

Permalink
Fixed bug#81257 and minor issues
Browse files Browse the repository at this point in the history
* Fixed major issue with XPlugin installation. The grants script was
      removing the account created by the X-plugin. Now this account is
      whitelisted. (https://bugs.mysql.com/bug.php?id=81257)
* Fixed minor naming in MANIFEST
* Fixed compatibility issues in deploy_to_remote_sandboxes.sh
  • Loading branch information
datacharmer committed Jun 5, 2016
1 parent 85aa90c commit 2405cf1
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 27 deletions.
6 changes: 6 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
3.1.08 04-Jun-2016
- Fixed major issue with XPlugin installation. The grants script was
removing the account created by the X-plugin. Now this account is
whitelisted. (https://bugs.mysql.com/bug.php?id=81257)
- Fixed minor naming in MANIFEST
- Fixed compatibility issues in deploy_to_remote_sandboxes.sh
3.1.07 15-May-2016
- Added support for $NOPASSWORD variable in ./use script. When this
variable is enabled, the client runs without a password. Useful to call it
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ t/start_restart_arguments.sb
t/start_restart_arguments.sb.pl
t/user_privileges.sb
t/user_privileges.sb.pl
t/test_init-exec.sh
t/test_init_exec.sh

15 changes: 8 additions & 7 deletions bin/deploy_to_remote_sandboxes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

[ -z "$MYSQL_VERSION" ] && MYSQL_VERSION=5.5.30
[ -z "$MYSQL_PORT" ] && MYSQL_PORT=15530
[ -z "$MYSQL_VERSION" ] && MYSQL_VERSION=5.7.12
[ -z "$MYSQL_PORT" ] && MYSQL_PORT=32001
[ -z "$SANDBOX_DIR" ] && SANDBOX_DIR=remote_sb

NODES_LIST=
Expand Down Expand Up @@ -128,15 +128,15 @@ BUILD_SB=$HOME/build_sb.sh
echo "#!/bin/bash" > $BUILD_SB
echo 'SANDBOX_EXISTS=$(for P in `echo $PATH | tr ":" " "` ; do if [ -f $P/make_sandbox ] ; then echo $P/make_sandbox ; fi; done)' >> $BUILD_SB
echo 'if [ -z "$SANDBOX_EXISTS" ] ; then hostname; echo "make_sandbox not found in PATH" ; exit 1; fi' >> $BUILD_SB
MY_TEMPLATE=$my_template$$.cnf
MY_TEMPLATE=my_template$$.cnf
if [ -n "$MY_CNF" ]
then
if [ ! -f $MY_CNF ]
then
echo "File '$MY_CNF' not found"
exit 1
fi
cp $MY_CNF $HOME/$MY_TEMPLATE
cp $MY_CNF $MY_TEMPLATE
echo "MY_CNF=\$HOME/$MY_TEMPLATE" >> $BUILD_SB
fi

Expand All @@ -155,6 +155,7 @@ echo " --sandbox_directory=$SANDBOX_DIR \$SANDBOX_OPTIONS" >> $BUILD_SB
# echo "if [ -f \$HOME/$MY_TEMPLATE ] ; then rm -f \$HOME/$MY_TEMPLATE ; fi "
chmod +x $BUILD_SB

BUILD_SB_FN=$(basename $BUILD_SB)
SERVER_ID_COUNTER=0
for HOST in ${NODES[*]}
do
Expand All @@ -163,9 +164,9 @@ do
ssh $HOST 'if [ ! -d $HOME/opt/mysql ] ; then mkdir -p $HOME/opt/mysql ; fi'
scp -p $TARBALL $HOST:~/opt/mysql
fi
scp -p $BUILD_SB $HOST:$BUILD_SB
scp -p $HOME/$MY_TEMPLATE $HOST:$MY_TEMPLATE
ssh $HOST $BUILD_SB ${SERVER_IDS[$SERVER_ID_COUNTER]}
scp -p $BUILD_SB $HOST:/tmp
[ -n "$MY_CNF" ] && scp -p $MY_TEMPLATE $HOST:$MY_TEMPLATE
ssh $HOST /tmp/$BUILD_SB_FN ${SERVER_IDS[$SERVER_ID_COUNTER]}
SERVER_ID_COUNTER=$(($SERVER_ID_COUNTER+1))
done

Expand Down
2 changes: 1 addition & 1 deletion lib/MySQL/Sandbox.pm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ our @EXPORT_OK= qw( is_port_open
split_version
) ;

our $VERSION=q{3.1.07};
our $VERSION=q{3.1.08};
our $DEBUG;

BEGIN {
Expand Down
2 changes: 1 addition & 1 deletion lib/MySQL/Sandbox/Recipes.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package MySQL::Sandbox::Recipes;
use strict;
use warnings;

our $VERSION=q{3.1.07};
our $VERSION=q{3.1.08};

1;
__END__
Expand Down
4 changes: 2 additions & 2 deletions lib/MySQL/Sandbox/Scripts.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ our @EXPORT_OK = qw(
);
our @EXPORT = @EXPORT_OK;

our $VERSION=q{3.1.07};
our $VERSION=q{3.1.08};

our @MANIFEST = (
'clear.sh',
Expand Down Expand Up @@ -1665,7 +1665,7 @@ set password='_DBPASSWORD_';
-- delete from tables_priv;
-- delete from columns_priv;
-- delete from db;
delete from user where user not in ('root', 'mysql.sys');
delete from user where user not in ('root', 'mysql.sys', 'mysqlxsys');
flush privileges;
Expand Down
31 changes: 16 additions & 15 deletions t/test_init_exec.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
#!/bin/bash
## Test for --pre_*_exec options
## Test for --*_exec options
## for example
## make_sandbox 5.6.29 -- --pre_start_exec=./test_init_exec.sh
echo "----------------------------------------------------------------"
echo "Stage: $EXEC_STAGE"
echo "PWD <$PWD> "
echo "VER <$MYSQL_VERSION> "
echo "DIR <$SANDBOX_DIR> "
echo "DATADIR <$DB_DATADIR> "
echo "BASEDIR <$BASEDIR> "
echo "SOCKET <$DB_SOCKET> "
echo "MY_CNF <$MY_CNF>"
echo "USER/PASSWORD/PORT <$DB_USER> <$DB_PASSWORD> <$DB_PORT> "
echo "Version components <$MYSQL_MAJOR> <$MYSQL_MINOR> <$MYSQL_REV>"

if [ "$EXEC_STAGE" == "pre_start_exec" ]
then
echo "PWD <$PWD> "
echo "VER <$MYSQL_VERSION> "
echo "DIR <$SANDBOX_DIR> "
echo "DATADIR <$DB_DATADIR> "
echo "BASEDIR <$BASEDIR> "
echo "SOCKET <$DB_SOCKET> "
echo "MY_CNF <$MY_CNF>"
echo "USER/PASSWORD/PORT <$DB_USER> <$DB_PASSWORD> <$DB_PORT> "
echo "Version components <$MYSQL_MAJOR> <$MYSQL_MINOR> <$MYSQL_REV>"
fi
cd $SANDBOX_DIR
# cat grants.mysql
ls
echo ''
ls -l data
# ls
echo '## Data directory'
ls data
echo "----------------------------------------------------------------"

0 comments on commit 2405cf1

Please sign in to comment.