@@ -4,10 +4,10 @@ use Getopt::Long;
4
4
$opt_distribution =$opt_user =$opt_result =$opt_config_options =$opt_config_env =" " ;
5
5
$opt_dbd_options =$opt_perl_options =$opt_suffix =" " ;
6
6
$opt_tmp =$version_suffix =" " ;
7
- $opt_help =$opt_Information =$opt_no_delete =$opt_debug =$opt_stage =$opt_rsh_mail =$opt_no_test =$opt_no_perl =$opt_with_low_memory =$opt_fast_benchmark =$opt_static_client =$opt_static_server =$opt_static_perl =$opt_sur =$opt_with_small_disk =$opt_local_perl =$opt_tcpip =$opt_build_thread =$opt_no_mysqltest =$opt_use_old_distribution =$opt_enable_shared =$opt_no_crash_me =$opt_no_strip =0;
7
+ $opt_help =$opt_Information =$opt_no_delete =$opt_delete = $ opt_debug =$opt_stage =$opt_rsh_mail =$opt_no_test =$opt_no_perl =$opt_with_low_memory =$opt_fast_benchmark =$opt_static_client =$opt_static_server =$opt_static_perl =$opt_sur =$opt_with_small_disk =$opt_local_perl =$opt_tcpip =$opt_build_thread =$opt_no_mysqltest =$opt_use_old_distribution =$opt_enable_shared =$opt_no_crash_me =$opt_no_strip =0;
8
8
$opt_innodb =$opt_bdb =0;
9
9
10
- GetOptions(" Information" ," help" ," distribution=s" ," user=s" ," result=s" ," no-delete" ," no-test" ," no-mysqltest" ," perl-files=s" ," debug" ," config-options=s" ," config-env=s" ," stage=i" ," rsh-mail" ," with-low-memory" ," fast-benchmark" ," tmp=s" ," static-client" ," static-server" ," static-perl" ," no-perl" ," local-perl" ," perl-options=s" ," sur" ," with-small-disk" ," dbd-options=s" ," tcpip" ," suffix=s" ," build-thread=i" ," innodb" ," bdb" ," use-old-distribution" ," enable-shared" ," no-crash-me" ," no-strip" ) || usage();
10
+ GetOptions(" Information" ," help" ," distribution=s" ," user=s" ," result=s" ," no-delete" ," delete " , " no-test" ," no-mysqltest" ," perl-files=s" ," debug" ," config-options=s" ," config-env=s" ," stage=i" ," rsh-mail" ," with-low-memory" ," fast-benchmark" ," tmp=s" ," static-client" ," static-server" ," static-perl" ," no-perl" ," local-perl" ," perl-options=s" ," sur" ," with-small-disk" ," dbd-options=s" ," tcpip" ," suffix=s" ," build-thread=i" ," innodb" ," bdb" ," use-old-distribution" ," enable-shared" ," no-crash-me" ," no-strip" ) || usage();
11
11
12
12
usage() if ($opt_help || $opt_Information );
13
13
usage() if (!$opt_distribution );
@@ -68,25 +68,27 @@ delete $ENV{'MY_BASEDIR_VERSION'};
68
68
$ENV {' MYSQL_TCP_PORT' }= $mysql_tcp_port = 3334 + $opt_build_thread ;
69
69
$ENV {' MYSQL_UNIX_PORT' }=$mysql_unix_port =" $opt_tmp /mysql$opt_suffix .build" ;
70
70
$ENV {" PERL5LIB" }=" $pwd /$host /perl5:$pwd /$host /perl5/site_perl" ;
71
+ $slave_port =$mysql_tcp_port +16;
72
+
73
+ if (-x " $host /bin/mysqladmin" )
74
+ {
75
+ log_system(" $host /bin/mysqladmin --no-defaults -u root -S $mysql_unix_port -s shutdown" );
76
+ log_system(" $host /bin/mysqladmin --no-defaults -u root -P $mysql_tcp_port -h $host -s shutdown" );
77
+ log_system(" $host /bin/mysqladmin --no-defaults -u root -P $slave_port -h $host -s shutdown" );
78
+ log_system(" $host /bin/mysqladmin --no-defaults -u root -P 9306 -h $host -s shutdown" );
79
+ log_system(" $host /bin/mysqladmin --no-defaults -u root -P 9307 -h $host -s shutdown" );
80
+ }
71
81
72
82
if ($opt_stage == 0)
73
83
{
74
84
print " $host : Removing old distribution\n " if ($opt_debug );
75
- if (-x " $host /bin/mysqladmin" )
76
- {
77
- log_system(" $host /bin/mysqladmin --no-defaults -u root -S $mysql_unix_port -s shutdown" );
78
- log_system(" $host /bin/mysqladmin --no-defaults -u root -P $mysql_tcp_port -h $host -s shutdown" );
79
- log_system(" $host /bin/mysqladmin --no-defaults -u root -P 9306 -h $host -s shutdown" );
80
- log_system(" $host /bin/mysqladmin --no-defaults -u root -P 9307 -h $host -s shutdown" );
81
- }
82
85
if (!$opt_use_old_distribution )
83
86
{
84
87
system (" mkdir $host " ) if (! -d $host );
85
88
system (" touch $host /mysql-fix-for-glob" );
86
89
rm_all(<$host /mysql-*>);
87
90
system (" mkdir $host /bin" ) if (! -d " $host /bin" );
88
91
}
89
- system (" mkdir $bench_tmpdir " ) if (! -d $bench_tmpdir );
90
92
rm_all(" $host /test" );
91
93
system (" mkdir $host /test" ) if (! -d " $host /test" );
92
94
system (" mkdir Logs" ) if (! -d " Logs" );
@@ -109,6 +111,7 @@ safe_cd($ver);
109
111
if ($opt_stage <= 1)
110
112
{
111
113
$opt_config_options .=" --with-low-memory" if ($opt_with_low_memory );
114
+ # Fix files if this is in another timezone than work.mysql.com
112
115
unlink (" config.cache" );
113
116
log_system(" $make clean" ) if ($opt_use_old_distribution );
114
117
if ($opt_static_server )
@@ -140,7 +143,7 @@ if ($opt_stage <= 1)
140
143
141
144
if ($opt_stage <= 2)
142
145
{
143
- unlink ($opt_distribution ) if (!$opt_no_delete && !$opt_use_old_distribution );
146
+ unlink ($opt_distribution ) if (!$opt_delete && !$opt_use_old_distribution );
144
147
safe_system(" $make " );
145
148
}
146
149
@@ -157,7 +160,14 @@ if ($opt_stage <= 3)
157
160
$flags .=" --no-strip" if ($opt_no_strip );
158
161
check_system(" scripts/make_binary_distribution --tmp=$opt_tmp --suffix=$opt_suffix $flags " ," .tar.gz created" );
159
162
safe_system(" mv mysql*.tar.gz $pwd /$host " );
160
- safe_system(" cp client/mysqladmin $pwd /$host /bin" );
163
+ if (-f " client/.libs/mysqladmin" )
164
+ {
165
+ safe_system(" cp client/.libs/mysqladmin $pwd /$host /bin" );
166
+ }
167
+ else
168
+ {
169
+ safe_system(" cp client/mysqladmin $pwd /$host /bin" );
170
+ }
161
171
safe_system(" $make clean" ) if ($opt_with_small_disk );
162
172
}
163
173
@@ -184,13 +194,14 @@ $ENV{"LD_LIBRARY_PATH"}= "$testdir/lib:" . $ENV{"LD_LIBRARY_PATH"};
184
194
185
195
if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest )
186
196
{
187
- my ($slave_port );
188
- $slave_port =$mysql_tcp_port +16;
197
+ system (" mkdir $bench_tmpdir " ) if (! -d $bench_tmpdir );
189
198
safe_cd(" ${test_dir} /mysql-test" );
190
199
check_system(" ./mysql-test-run --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --sleep=10" , " tests were successful" );
191
200
}
192
201
193
- if ($opt_stage <= 6 && !$opt_no_test )
202
+ # Start the server if we are going to run any of the benchmarks
203
+
204
+ if (!$opt_no_test )
194
205
{
195
206
my $extra ;
196
207
safe_cd($test_dir );
@@ -207,10 +218,11 @@ if ($opt_stage <= 6 && !$opt_no_test)
207
218
{
208
219
$extra .=" --innodb_data_file_path=ibdata1:100M" ;
209
220
}
210
- safe_system(" ./bin/mysqld --no-defaults --basedir . --datadir ./data --skip-locking $extra >> $log 2>&1 &" );
221
+ safe_system(" ./bin/mysqld --no-defaults --basedir . --datadir ./data --skip-l \o cking $extra >> $log 2>&1 &" );
211
222
sleep (2);
212
223
}
213
224
225
+
214
226
if ($opt_stage <= 7 && $opt_perl_files && !$opt_no_perl && !$opt_no_test )
215
227
{
216
228
safe_cd($test_dir );
0 commit comments