Skip to content

Commit

Permalink
Use socket connexion since it's the default
Browse files Browse the repository at this point in the history
  • Loading branch information
fauust committed Feb 29, 2024
1 parent a805c7b commit e22c402
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
13 changes: 2 additions & 11 deletions scripts/deb-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,8 @@ if [[ -n $spider_package_list ]]; then
sudo sh -c "DEBIAN_FRONTEND=noninteractive MYSQLD_STARTUP_TIMEOUT=180 apt-get install -y $spider_package_list"
fi

# Unix socket (after 10.3)
if [ "${master_branch}" != 10.3 ]; then
sudo mysql -e "set password=password('rootpass')"
else
# Even without unix_socket, on some of VMs the password might be not
# pre-created as expected. This command should normally fail.
sudo mysql -uroot -e "set password = password('rootpass')" >/dev/null 2>&1
fi

mysql --verbose -uroot -prootpass -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test; create user galera identified by 'gal3ra123'; grant all on *.* to galera;"
mysql -uroot -prootpass -e "select @@version"
sudo mysql --verbose -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test; create user galera identified by 'gal3ra123'; grant all on *.* to galera;"
sudo mysql -e "select @@version"
bb_log_info "test for MDEV-18563, MDEV-18526"
set +e

Expand Down
4 changes: 2 additions & 2 deletions scripts/deb-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,11 @@ wait_for_mariadb_upgrade

# run mysql_upgrade for non GA branches
if [[ $major_version == "$development_branch" ]]; then
sudo -u mysql mysql_upgrade -uroot -prootpass
sudo mysql_upgrade
fi

# Make sure that the new server is running
if mysql -uroot -prootpass -e "select @@version" | grep "$(cat /tmp/version.old)"; then
if sudo mysql -e "select @@version" | grep "$(cat /tmp/version.old)"; then
bb_log_err "the server was not upgraded or was not restarted after upgrade"
exit 1
fi
Expand Down
4 changes: 2 additions & 2 deletions scripts/rpm-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,14 @@ if [[ $test_type == "major" ]]; then
fi

# Make sure that the new server is running
if mysql -uroot -prootpass -e "select @@version" | grep "$old_version"; then
if sudo mysql -e "select @@version" | grep "$old_version"; then
bb_log_err "the server was not upgraded or was not restarted after upgrade"
exit 1
fi

# Run mysql_upgrade for non-GA branches (minor upgrades in GA branches shouldn't need it)
if [[ $major_version == "$development_branch" ]] || [[ $test_type == "major" ]]; then
sudo -u mysql mysql_upgrade -uroot -prootpass
sudo mysql_upgrade
fi
set +e

Expand Down

0 comments on commit e22c402

Please sign in to comment.