Skip to content

Commit 52a0038

Browse files
committed
Bug#23023457 DEBIAN/UBUNTU PACKAGES FAIL TO INSTALL BECAUSE OF EMPTY CONFIG VALUES
Post-push fix: The test was failing on Windows; Since the client no longer throws an error it would go on to try to connect to the server, and on Windows the test doesn't set up a server to listen on the default port. Since the test only really needs to check that the client prints the warning and does not throw an error, we change the test to run mysql --help instead of trying to connect, passing stdout to a temporary file so only the warning is left.
1 parent b2df77f commit 52a0038

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

mysql-test/r/mysql.result

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -522,13 +522,10 @@ a
522522
2
523523
#
524524
# Bug #16102788: INDETERMINATE BEHAVIOR DUE TO EMPTY OPTION VALUES
525+
# Bug #23023457: DEBIAN/UBUNTU PACKAGES FAIL TO INSTALL BECAUSE OF EMPTY CONFIG VALUES
525526
#
526527
mysql: [Warning] mysql: Empty value for 'port' specified. Will throw an error in future versions
527-
1
528-
1
529528
mysql: [Warning] mysql: Empty value for 'port' specified. Will throw an error in future versions
530-
1
531-
1
532529
#
533530
# Bug #21464621: MYSQL CLI SHOULD SUGGEST CONNECT-EXPIRED-PASSWORD WHEN ERROR 1862 OCCURS
534531
#

mysql-test/t/mysql.test

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,14 +632,21 @@ EOF
632632
--remove_file $MYSQLTEST_VARDIR/tmp/WL6797_cleanup.sql
633633

634634

635+
# Specifying an empty port option should only give a warning in 5.7
636+
# We only need to check that the client accepts it, not actually connect,
637+
# so we use --help and pass stdout to a temporary file so only the warning
638+
# is left (and connecting was failing on Windows).
635639
--echo #
636640
--echo # Bug #16102788: INDETERMINATE BEHAVIOR DUE TO EMPTY OPTION VALUES
641+
--echo # Bug #23023457: DEBIAN/UBUNTU PACKAGES FAIL TO INSTALL BECAUSE OF EMPTY CONFIG VALUES
637642
--echo #
638643
--replace_regex /mysql: .Warning. [^ ]*: Empty value for 'port' specified. Will throw an error in future versions/mysql: [Warning] mysql: Empty value for 'port' specified. Will throw an error in future versions/
639-
--exec $MYSQL --port= -e "SELECT 1" 2>&1
644+
--exec $MYSQL --port= --help 2>&1 > $MYSQLTEST_VARDIR/tmp/bug23023457.out
645+
--remove_file $MYSQLTEST_VARDIR/tmp/bug23023457.out
640646

641647
--replace_regex /mysql: .Warning. [^ ]*: Empty value for 'port' specified. Will throw an error in future versions/mysql: [Warning] mysql: Empty value for 'port' specified. Will throw an error in future versions/
642-
--exec $MYSQL -P "" -e "SELECT 1" 2>&1
648+
--exec $MYSQL -P "" --help 2>&1 > $MYSQLTEST_VARDIR/tmp/bug23023457.out
649+
--remove_file $MYSQLTEST_VARDIR/tmp/bug23023457.out
643650

644651
--echo #
645652
--echo # Bug #21464621: MYSQL CLI SHOULD SUGGEST CONNECT-EXPIRED-PASSWORD WHEN ERROR 1862 OCCURS

0 commit comments

Comments
 (0)