diff --git a/scripts/deb-install.sh b/scripts/deb-install.sh index 2ef59d5e..2f799501 100755 --- a/scripts/deb-install.sh +++ b/scripts/deb-install.sh @@ -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 diff --git a/scripts/deb-upgrade.sh b/scripts/deb-upgrade.sh index ba7f380c..bc1ca3b5 100755 --- a/scripts/deb-upgrade.sh +++ b/scripts/deb-upgrade.sh @@ -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 diff --git a/scripts/rpm-upgrade.sh b/scripts/rpm-upgrade.sh index d5de3c43..d183670a 100755 --- a/scripts/rpm-upgrade.sh +++ b/scripts/rpm-upgrade.sh @@ -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