diff options
author | unknown <kent@mysql.com> | 2006-03-30 00:48:46 +0200 |
---|---|---|
committer | unknown <kent@mysql.com> | 2006-03-30 00:48:46 +0200 |
commit | 3479ec37801027bb4767af9e586d5396b8416a39 (patch) | |
tree | b0321f0faa8e8d871df1d91acfa88ffd1ff16c49 /mysql-test/mysql-test-run.pl | |
parent | 2d8acd2fdcd4c1dc49e58dc98babc85ff6d62838 (diff) | |
download | mariadb-git-3479ec37801027bb4767af9e586d5396b8416a39.tar.gz |
mysql-test-run.pl:
Check that port range is valid, bug#16807
mysql-test/mysql-test-run.pl:
Check that port range is valid, bug#16807
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 6aa97ba6d37..d4f759604dd 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -477,6 +477,10 @@ sub command_line_setup () { # 5.1 test run, even if different MTR_BUILD_THREAD is used. This means # all port numbers might not be used in this version of the script. # + # Also note the limiteation of ports we are allowed to hand out. This + # differs between operating systems and configuration, see + # http://www.ncftp.com/ncftpd/doc/misc/ephemeral_ports.html + # But a fairly safe range seems to be 5001 - 32767 if ( $ENV{'MTR_BUILD_THREAD'} ) { # Up to two masters, up to three slaves @@ -485,6 +489,13 @@ sub command_line_setup () { $opt_ndbcluster_port= $opt_master_myport + 5; } + if ( $opt_master_myport < 5001 or $opt_master_myport + 10 >= 32767 ) + { + mtr_error("MTR_BUILD_THREAD number results in a port", + "outside 5001 - 32767", + "($opt_master_myport - $opt_master_myport + 10)"); + } + # Read the command line # Note: Keep list, and the order, in sync with usage at end of this file |