1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
|
diff -Naur mysql-4.1.23-bk-20070101.orig/scripts/Makefile.am mysql-4.1.23-bk-20070101/scripts/Makefile.am
--- mysql-4.1.23-bk-20070101.orig/scripts/Makefile.am 2007-01-01 20:44:41.000000000 +0100
+++ mysql-4.1.23-bk-20070101/scripts/Makefile.am 2007-01-03 00:14:16.000000000 +0100
@@ -66,6 +66,32 @@
mysqlaccess.conf \
mysqlbug
+sql_libexec_REPLACE = mysqld
+instance_manager_libexec_REPLACE= mysqlmanager
+client_bin_REPLACE = mysql mysqladmin mysqlcheck mysqlshow \
+ mysqldump mysqlimport mysqltest mysqlbinlog \
+ mysqltestmanagerc mysqltestmanager-pwgen
+extra_bin_REPLACE = replace comp_err perror resolveip my_print_defaults \
+ resolve_stack_dump mysql_waitpid innochecksum
+myisam_bin_REPLACE = myisamchk myisamlog myisampack myisam_ftdump
+tools_bin_REPLACE = mysqltestmanager
+cw_cpcd_ndbbin_REPLACE = ndb_cpcd
+kernel_ndbbin_REPLACE = ndbd
+mgmsrv_ndbbin_REPLACE = ndb_mgmd
+sql_bin_REPLACE = mysql_tzinfo_to_sql
+tests_bin_REPLACE = mysql_client_test
+ndbtools_bin_REPLACE = ndb_test_platform ndb_waiter \
+ ndb_drop_table ndb_delete_all \
+ ndb_desc ndb_drop_index \
+ ndb_show_tables ndb_select_all \
+ ndb_select_count ndb_restore ndb_config
+EXTRA_REPLACE_BIN = safe_mysqld mysqlanalyze mysqloptimize mysqlrepair mysqld-max isamchk \
+ $(sql_libexec_REPLACE) $(ndbtools_bin_REPLACE) \
+ $(instance_manager_libexec_REPLACE) $(client_bin_REPLACE) \
+ $(extra_bin_REPLACE) $(myisam_bin_REPLACE) $(tools_bin_REPLACE) \
+ $(cw_cpcd_ndbbin_REPLACE) $(kernel_ndbbin_REPLACE) $(mgmsrv_ndbbin_REPLACE) \
+ $(sql_bin_REPLACE) $(tests_bin_REPLACE)
+
dist_pkgdata_DATA = fill_help_tables.sql mysql_fix_privilege_tables.sql
# mysqlbug should be distributed built so that people can report build
@@ -100,8 +126,17 @@
.sh:
@RM@ -f $@ $@-t
+ bin_REPLACE='';\
+ list='$(EXTRA_SCRIPTS) $(EXTRA_REPLACE_BIN)'; \
+ for p in $${list}; do \
+ f1=$${p/\.sh}; \
+ f2=`echo "$${p}" | @SED@ -e 's|\.sh$$||' -e 's|^.*/||;$(transform)'`; \
+ bin_REPLACE="$${bin_REPLACE}s!@mybin_$${f1}@!$${f2}!g;";\
+ done; \
@SED@ \
+ -e "$${bin_REPLACE}" \
-e 's!@''bindir''@!$(bindir)!g' \
+ -e 's!@''sharedstatedir''@!$(sharedstatedir)!g' \
-e 's!@''sbindir''@!$(sbindir)!g' \
-e 's!@''scriptdir''@!$(bindir)!g' \
-e 's!@''prefix''@!$(prefix)!g' \
diff -Naur mysql-4.1.23-bk-20070101.orig/scripts/msql2mysql.sh mysql-4.1.23-bk-20070101/scripts/msql2mysql.sh
--- mysql-4.1.23-bk-20070101.orig/scripts/msql2mysql.sh 2007-01-01 20:44:41.000000000 +0100
+++ mysql-4.1.23-bk-20070101/scripts/msql2mysql.sh 2007-01-03 00:14:16.000000000 +0100
@@ -13,4 +13,4 @@
# described in the License. Among other things, the License requires that
# the copyright notice and this notice be preserved on all copies.
-@bindir@/replace msqlConnect mysql_connect msqlListDBs mysql_list_dbs msqlNumRows mysql_num_rows msqlFetchRow mysql_fetch_row msqlFetchField mysql_fetch_field msqlFreeResult mysql_free_result msqlListFields mysql_list_fields msqlListTables mysql_list_tables msqlErrMsg 'mysql_error(mysql)' msqlStoreResult mysql_store_result msqlQuery mysql_query msqlField mysql_field msqlSelect mysql_select msqlSelectDB mysql_select_db msqlNumFields mysql_num_fields msqlClose mysql_close msqlDataSeek mysql_data_seek m_field MYSQL_FIELD m_result MYSQL_RES m_row MYSQL_ROW msql mysql mSQL mySQL MSQL MYSQL msqlCreateDB mysql_create_db msqlDropDB mysql_drop_db msqlFieldSeek mysql_field_seek -- $*
+@bindir@/@mybin_replace@ msqlConnect mysql_connect msqlListDBs mysql_list_dbs msqlNumRows mysql_num_rows msqlFetchRow mysql_fetch_row msqlFetchField mysql_fetch_field msqlFreeResult mysql_free_result msqlListFields mysql_list_fields msqlListTables mysql_list_tables msqlErrMsg 'mysql_error(mysql)' msqlStoreResult mysql_store_result msqlQuery mysql_query msqlField mysql_field msqlSelect mysql_select msqlSelectDB mysql_select_db msqlNumFields mysql_num_fields msqlClose mysql_close msqlDataSeek mysql_data_seek m_field MYSQL_FIELD m_result MYSQL_RES m_row MYSQL_ROW msql mysql mSQL mySQL MSQL MYSQL msqlCreateDB mysql_create_db msqlDropDB mysql_drop_db msqlFieldSeek mysql_field_seek -- $*
diff -Naur mysql-4.1.23-bk-20070101.orig/scripts/mysql_config.sh mysql-4.1.23-bk-20070101/scripts/mysql_config.sh
--- mysql-4.1.23-bk-20070101.orig/scripts/mysql_config.sh 2007-01-01 20:44:41.000000000 +0100
+++ mysql-4.1.23-bk-20070101/scripts/mysql_config.sh 2007-01-03 00:14:16.000000000 +0100
@@ -77,7 +77,7 @@
me=`get_full_path $0`
-basedir=`echo $me | sed -e 's;/bin/mysql_config;;'`
+basedir=`echo $me | sed -e 's;/bin/@mybin_mysql_config@;;'`
ldata='@localstatedir@'
execdir='@libexecdir@'
diff -Naur mysql-4.1.23-bk-20070101.orig/scripts/mysql_create_system_tables.sh mysql-4.1.23-bk-20070101/scripts/mysql_create_system_tables.sh
--- mysql-4.1.23-bk-20070101.orig/scripts/mysql_create_system_tables.sh 2007-01-01 20:44:41.000000000 +0100
+++ mysql-4.1.23-bk-20070101/scripts/mysql_create_system_tables.sh 2007-01-03 00:14:16.000000000 +0100
@@ -19,7 +19,7 @@
new context from the manual (from fill_help_tables.sql).
Usage:
- mysql_create_system_tables [test|verbose|real] <path to mysql-database directory> <hostname> <windows option>
+ @mybin_mysql_create_system_tables@ [test|verbose|real] <path to mysql-database directory> <hostname> <windows option>
"
exit
fi
diff -Naur mysql-4.1.23-bk-20070101.orig/scripts/mysql_fix_privilege_tables.sh mysql-4.1.23-bk-20070101/scripts/mysql_fix_privilege_tables.sh
--- mysql-4.1.23-bk-20070101.orig/scripts/mysql_fix_privilege_tables.sh 2007-01-01 20:44:41.000000000 +0100
+++ mysql-4.1.23-bk-20070101/scripts/mysql_fix_privilege_tables.sh 2007-01-03 00:19:37.000000000 +0100
@@ -76,17 +76,17 @@
# Get first arguments from the my.cfg file, groups [mysqld] and
# [mysql_install_db], and then merge with the command line arguments
-print_defaults=my_print_defaults
+print_defaults=@mybin_my_print_defaults@
for dir in ./bin @bindir@ @bindir@ extra $print_defaults_bindir/../bin $print_defaults_bindir/../extra
do
- if test -x $dir/my_print_defaults
+ if test -x $dir/@mybin_my_print_defaults@
then
- print_defaults="$dir/my_print_defaults"
+ print_defaults="$dir/@mybin_my_print_defaults@"
break
fi
done
-parse_arguments `$print_defaults $defaults mysql_install_db mysql_fix_privilege_tables`
+parse_arguments `$print_defaults $defaults @mybin_mysql_install_db@ @mybin_mysql_fix_privilege_tables@`
parse_arguments PICK-ARGS-FROM-ARGV "$@"
if test -z "$basedir"
@@ -103,10 +103,10 @@
then
bindir="$basedir/bin"
fi
- if test -x "$basedir/libexec/mysqld"
+ if test -x "$basedir/libexec/@mybin_mysqld@"
then
execdir="$basedir/libexec"
- elif test -x "@libexecdir@/mysqld"
+ elif test -x "@libexecdir@/@mybin_mysqld@"
then
execdir="@libexecdir@"
else
@@ -119,7 +119,7 @@
password=$old_style_password
fi
-cmd="$bindir/mysql --no-defaults --force --user=$user --host=$host"
+cmd="$bindir/@mybin_mysql@ --no-defaults --force --user=$user --host=$host"
if test ! -z "$port"; then
cmd="$cmd --port=$port"
fi
@@ -134,7 +134,7 @@
fi
# Find where first mysql_fix_privilege_tables.sql is located
-for i in $basedir/support-files $basedir/share $basedir/share/mysql \
+for i in @sharedstatedir@ $basedir/support-files $basedir/share $basedir/share/mysql \
$basedir/scripts @pkgdatadir@ . ./scripts
do
if test -f $i/$file
diff -Naur mysql-4.1.23-bk-20070101.orig/scripts/mysql_install_db.sh mysql-4.1.23-bk-20070101/scripts/mysql_install_db.sh
--- mysql-4.1.23-bk-20070101.orig/scripts/mysql_install_db.sh 2007-01-01 20:44:41.000000000 +0100
+++ mysql-4.1.23-bk-20070101/scripts/mysql_install_db.sh 2007-01-03 00:14:16.000000000 +0100
@@ -57,20 +57,20 @@
# Get first arguments from the my.cfg file, groups [mysqld] and
# [mysql_install_db], and then merge with the command line arguments
-if test -x ./bin/my_print_defaults
+if test -x "./bin/@mybin_my_print_defaults@"
then
- print_defaults="./bin/my_print_defaults"
-elif test -x ./extra/my_print_defaults
+ print_defaults="./bin/@mybin_my_print_defaults@"
+elif test -x "./extra/@mybin_my_print_defaults@"
then
- print_defaults="./extra/my_print_defaults"
-elif test -x @bindir@/my_print_defaults
+ print_defaults="./extra/@mybin_my_print_defaults@"
+elif test -x "@bindir@/@mybin_my_print_defaults@"
then
- print_defaults="@bindir@/my_print_defaults"
-elif test -x @bindir@/mysql_print_defaults
+ print_defaults="@bindir@/@mybin_my_print_defaults@"
+elif test -x "@bindir@/@mybin_my_print_defaults@"
then
- print_defaults="@bindir@/mysql_print_defaults"
+ print_defaults="@bindir@/@mybin_my_print_defaults@"
else
- print_defaults="my_print_defaults"
+ print_defaults="@mybin_my_print_defaults@"
fi
args=
@@ -94,10 +94,10 @@
pkgdatadir=@pkgdatadir@
else
bindir="$basedir/bin"
- if test -x "$basedir/libexec/mysqld"
+ if test -x "$basedir/libexec/@mybin_mysqld@"
then
execdir="$basedir/libexec"
- elif test -x "$basedir/sbin/mysqld"
+ elif test -x "$basedir/sbin/@mybin_mysqld@"
then
execdir="$basedir/sbin"
else
@@ -106,7 +106,7 @@
fi
# find fill_help_tables.sh
-for i in $basedir/support-files $basedir/share $basedir/share/mysql $basedir/scripts `pwd` `pwd`/scripts @pkgdatadir@
+for i in @sharedstatedir@ $basedir/support-files $basedir/share $basedir/share/mysql $basedir/scripts `pwd` `pwd`/scripts @pkgdatadir@
do
if test -f $i/fill_help_tables.sql
then
@@ -123,13 +123,13 @@
fi
mdata=$ldata/mysql
-mysqld=$execdir/mysqld
+mysqld=$execdir/@mybin_mysqld@
mysqld_opt=""
scriptdir=$bindir
if test "$windows" = 1
then
- mysqld="./sql/mysqld"
+ mysqld="./sql/@mybin_mysqld@"
mysqld_opt="--language=./sql/share/english"
scriptdir="./scripts"
fi
@@ -153,14 +153,14 @@
# Check if hostname is valid
if test "$windows" = 0 -a "$in_rpm" = 0 -a $force = 0
then
- resolved=`$bindir/resolveip $hostname 2>&1`
+ resolved=`$bindir/@mybin_resolveip@ $hostname 2>&1`
if [ $? -ne 0 ]
then
- resolved=`$bindir/resolveip localhost 2>&1`
+ resolved=`$bindir/@mybin_resolveip@ localhost 2>&1`
if [ $? -ne 0 ]
then
echo "Neither host '$hostname' nor 'localhost' could be looked up with"
- echo "$bindir/resolveip"
+ echo "$bindir/@mybin_resolveip@"
echo "Please configure the 'hostname' command to return a correct hostname."
echo "If you want to solve this at a later stage, restart this script with"
echo "the --force option"
@@ -168,7 +168,7 @@
fi
echo "WARNING: The host '$hostname' could not be looked up with resolveip."
echo "This probably means that your libc libraries are not 100 % compatible"
- echo "with this binary MySQL version. The MySQL daemon, mysqld, should work"
+ echo "with this binary MySQL version. The MySQL daemon, @mybin_mysqld@, should work"
echo "normally with the exception that host name resolving will not work."
echo "This means that you should use IP addresses instead of hostnames"
echo "when specifying MySQL privileges !"
@@ -213,7 +213,7 @@
mysqld_install_cmd_line="$mysqld $defaults $mysqld_opt --bootstrap \
--skip-grant-tables --basedir=$basedir --datadir=$ldata --skip-innodb \
--skip-bdb --skip-ndbcluster $args --max_allowed_packet=8M --net_buffer_length=16K"
-if $scriptdir/mysql_create_system_tables $create_option $mdata $hostname $windows \
+if $scriptdir/@mybin_mysql_create_system_tables@ $create_option $mdata $hostname $windows \
| eval "$mysqld_install_cmd_line"
then
if test -n "$fill_help_tables"
@@ -243,8 +243,8 @@
then
echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !"
echo "To do so, start the server, then issue the following commands:"
- echo "$bindir/mysqladmin -u root password 'new-password'"
- echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'"
+ echo "$bindir/@mybin_mysqladmin@ -u root password 'new-password'"
+ echo "$bindir/@mybin_mysqladmin@ -u root -h $hostname password 'new-password'"
echo "See the manual for more instructions."
#
# Print message about upgrading unless we have created a new db table.
@@ -252,14 +252,14 @@
then
echo
echo "NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run"
- echo "the $bindir/mysql_fix_privilege_tables. Otherwise you will not be"
+ echo "the $bindir/@mybin_mysql_fix_privilege_tables@. Otherwise you will not be"
echo "able to use the new GRANT command!"
fi
echo
if test "$in_rpm" = "0"
then
echo "You can start the MySQL daemon with:"
- echo "cd @prefix@ ; $bindir/mysqld_safe &"
+ echo "cd @prefix@ ; $bindir/@mybin_mysqld_safe@ &"
echo
echo "You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:"
echo "cd sql-bench ; perl run-all-tests"
@@ -279,13 +279,13 @@
echo "You can also try to start the mysqld daemon with:"
echo "$mysqld --skip-grant &"
echo "You can use the command line tool"
- echo "$bindir/mysql to connect to the mysql"
+ echo "$bindir/@mybin_mysql@ to connect to the mysql"
echo "database and look at the grant tables:"
echo
- echo "shell> $bindir/mysql -u root mysql"
+ echo "shell> $bindir/@mybin_mysql@ -u root mysql"
echo "mysql> show tables"
echo
- echo "Try 'mysqld --help' if you have problems with paths. Using --log"
+ echo "Try '@mybin_mysqld@ --help' if you have problems with paths. Using --log"
echo "gives you a log in $ldata that may be helpful."
echo
echo "The latest information about MySQL is available on the web at"
@@ -294,6 +294,6 @@
echo "and the manual section that describes problems on your OS."
echo "Another information source is the MySQL email archive."
echo "Please check all of the above before mailing us!"
- echo "And if you do mail us, you MUST use the @scriptdir@/mysqlbug script!"
+ echo "And if you do mail us, you MUST use the @scriptdir@/@mybin_mysqlbug@ script!"
exit 1
fi
diff -Naur mysql-4.1.23-bk-20070101.orig/scripts/mysql_secure_installation.sh mysql-4.1.23-bk-20070101/scripts/mysql_secure_installation.sh
--- mysql-4.1.23-bk-20070101.orig/scripts/mysql_secure_installation.sh 2007-01-01 20:44:41.000000000 +0100
+++ mysql-4.1.23-bk-20070101/scripts/mysql_secure_installation.sh 2007-01-03 00:14:16.000000000 +0100
@@ -30,7 +30,7 @@
do_query() {
echo $1 >$command
- mysql --defaults-file=$config <$command
+ @mybin_mysql@ --defaults-file=$config <$command
return $?
}
diff -Naur mysql-4.1.23-bk-20070101.orig/scripts/mysqlaccess.sh mysql-4.1.23-bk-20070101/scripts/mysqlaccess.sh
--- mysql-4.1.23-bk-20070101.orig/scripts/mysqlaccess.sh 2007-01-01 20:44:41.000000000 +0100
+++ mysql-4.1.23-bk-20070101/scripts/mysqlaccess.sh 2007-01-03 00:14:16.000000000 +0100
@@ -17,7 +17,7 @@
# ****************************
# information on MySQL
- $MYSQL = '@bindir@/mysql'; # path to mysql executable
+ $MYSQL = '@bindir@/@mybin_mysql@'; # path to mysql executable
$SERVER = '3.21';
$MYSQL_OPT = ' --batch --unbuffered';
$ACCESS_DB = 'mysql'; # name of DB with grant-tables
@@ -32,7 +32,7 @@
$ACCESS_U_BCK = 'user_backup';
$ACCESS_D_BCK = 'db_backup';
$DIFF = '/usr/bin/diff';
- $MYSQLDUMP = '@bindir@/mysqldump';
+ $MYSQLDUMP = '@bindir@/@mybin_mysqldump@';
#path to mysqldump executable
$MYSQLADMIN= 'http://foobar.com/MySQLadmin';
diff -Naur mysql-4.1.23-bk-20070101.orig/scripts/mysqld_multi.sh mysql-4.1.23-bk-20070101/scripts/mysqld_multi.sh
--- mysql-4.1.23-bk-20070101.orig/scripts/mysqld_multi.sh 2007-01-01 20:44:41.000000000 +0100
+++ mysql-4.1.23-bk-20070101/scripts/mysqld_multi.sh 2007-01-03 00:14:16.000000000 +0100
@@ -10,8 +10,8 @@
$opt_example = 0;
$opt_help = 0;
$opt_log = undef();
-$opt_mysqladmin = "@bindir@/mysqladmin";
-$opt_mysqld = "@libexecdir@/mysqld";
+$opt_mysqladmin = "@bindir@/@mybin_mysqladmin@";
+$opt_mysqld = "@libexecdir@/@mybin_mysqld@";
$opt_no_log = 0;
$opt_password = undef();
$opt_tcp_ip = 0;
@@ -39,11 +39,11 @@
{
my ($flag_exit);
- if (!defined(my_which(my_print_defaults)))
+ if (!defined(my_which(@mybin_my_print_defaults@)))
{
# We can't throw out yet, since --version, --help, or --example may
# have been given
- print "WARNING! my_print_defaults command not found!\n";
+ print "WARNING! @mybin_my_print_defaults@ command not found!\n";
print "Please make sure you have this command available and\n";
print "in your path. The command is available from the latest\n";
print "MySQL distribution.\n";
@@ -69,9 +69,9 @@
}
}
}
- my $com= "my_print_defaults ";
+ my $com= "@mybin_my_print_defaults@ ";
$com.= "--config-file=$opt_config_file " if (defined($opt_config_file));
- $com.= "mysqld_multi";
+ $com.= "@mybin_mysqld_multi@";
my @defops = `$com`;
chop @defops;
splice @ARGV, 0, 0, @defops;
@@ -101,9 +101,9 @@
print "Error with an option, see $my_progname --help for more info!\n";
exit(1);
}
- if (!defined(my_which(my_print_defaults)))
+ if (!defined(my_which(@mybin_my_print_defaults@)))
{
- print "ABORT: Can't find command 'my_print_defaults'!\n";
+ print "ABORT: Can't find command '@mybin_my_print_defaults@'!\n";
print "This command is available from the latest MySQL\n";
print "distribution. Please make sure you have the command\n";
print "in your PATH.\n";
@@ -165,7 +165,7 @@
{
if ($my_print_defaults_exists)
{
- @mysqld_opts= `my_print_defaults mysqld`;
+ @mysqld_opts= `@mybin_my_print_defaults@ mysqld`;
chomp @mysqld_opts;
foreach my $opt (@mysqld_opts)
{
@@ -266,7 +266,7 @@
@groups = &find_groups($groupids);
for ($i = 0; defined($groups[$i]); $i++)
{
- $com = "my_print_defaults";
+ $com = "@mybin_my_print_defaults@";
$com.= defined($opt_config_file) ? " --config-file=$opt_config_file" : "";
$com.= " $groups[$i]";
@options = `$com`;
@@ -295,7 +295,7 @@
$tmp.= " '$options[$j]'";
}
}
- if ($opt_verbose && $com =~ m/\/safe_mysqld$/ && !$info_sent)
+ if ($opt_verbose && $com =~ m/\/@mybin_safe_mysqld@$/ && !$info_sent)
{
print "WARNING: safe_mysqld is being used to start mysqld. In this case you ";
print "may need to pass\n\"ledir=...\" under groups [mysqldN] to ";
@@ -366,7 +366,7 @@
my ($i, @groups)= @_;
my ($mysqladmin_found, $com, $tmp, $j);
- $com = "my_print_defaults";
+ $com = "@mybin_my_print_defaults@";
$com.= defined($opt_config_file) ? " --config-file=$opt_config_file" : "";
$com.= " $groups[$i]";
@options = `$com`;
diff -Naur mysql-4.1.23-bk-20070101.orig/scripts/mysqld_safe.sh mysql-4.1.23-bk-20070101/scripts/mysqld_safe.sh
--- mysql-4.1.23-bk-20070101.orig/scripts/mysqld_safe.sh 2007-01-01 20:44:41.000000000 +0100
+++ mysql-4.1.23-bk-20070101/scripts/mysqld_safe.sh 2007-01-03 00:14:16.000000000 +0100
@@ -93,7 +93,7 @@
then
MYSQLD="mysqld-$tmp"
else
- MYSQLD="mysqld"
+ MYSQLD="@mybin_mysqld@"
fi
;;
--nice=*) niceness=`echo "$arg" | sed -e "s;--nice=;;"` ;;
@@ -119,13 +119,13 @@
MY_PWD=`pwd`
# Check for the directories we would expect from a binary release install
-if test -f ./share/mysql/english/errmsg.sys -a -x ./bin/mysqld
+if test -f ./share/mysql/english/errmsg.sys -a -x ./bin/@mybin_mysqld@
then
MY_BASEDIR_VERSION=$MY_PWD # Where bin, share and data are
ledir=$MY_BASEDIR_VERSION/bin # Where mysqld is
# Check for the directories we would expect from a source install
elif test -f ./share/mysql/english/errmsg.sys -a \
- -x ./libexec/mysqld
+ -x ./libexec/@mybin_mysqld@
then
MY_BASEDIR_VERSION=$MY_PWD # Where libexec, share and var are
ledir=$MY_BASEDIR_VERSION/libexec # Where mysqld is
@@ -165,17 +165,17 @@
# Get first arguments from the my.cnf file, groups [mysqld] and [mysqld_safe]
# and then merge with the command line arguments
-if test -x ./bin/my_print_defaults
+if test -x "./bin/@mybin_my_print_defaults@"
then
- print_defaults="./bin/my_print_defaults"
-elif test -x @bindir@/my_print_defaults
+ print_defaults="./bin/@mybin_my_print_defaults@"
+elif test -x "@bindir@/@mybin_my_print_defaults@"
then
- print_defaults="@bindir@/my_print_defaults"
-elif test -x @bindir@/mysql_print_defaults
+ print_defaults="@bindir@/@mybin_my_print_defaults@"
+elif test -x "@bindir@/@mybin_my_print_defaults@"
then
- print_defaults="@bindir@/mysql_print_defaults"
+ print_defaults="@bindir@/@mybin_my_print_defaults@"
else
- print_defaults="my_print_defaults"
+ print_defaults="@mybin_my_print_defaults@"
fi
args=
@@ -200,11 +200,11 @@
# Use the mysqld-max binary by default if the user doesn't specify a binary
if test -z "$MYSQLD"
then
- if test -x $ledir/mysqld-max
+ if test -x $ledir/@mybin_mysqld-max@
then
- MYSQLD=mysqld-max
+ MYSQLD=@mybin_mysqld-max@
else
- MYSQLD=mysqld
+ MYSQLD=@mybin_mysqld@
fi
fi
@@ -213,7 +213,7 @@
echo "The file $ledir/$MYSQLD doesn't exist or is not executable"
echo "Please do a cd to the mysql installation directory and restart"
echo "this script from there as follows:"
- echo "./bin/mysqld_safe".
+ echo "./bin/@mybin_mysqld_safe@".
echo "See http://dev.mysql.com/doc/mysql/en/mysqld_safe.html for more"
echo "information"
exit 1
@@ -346,8 +346,8 @@
# the manual for details.
#
# echo "Checking tables in $DATADIR"
-# $MY_BASEDIR_VERSION/bin/myisamchk --silent --force --fast --medium-check $DATADIR/*/*.MYI
-# $MY_BASEDIR_VERSION/bin/isamchk --silent --force $DATADIR/*/*.ISM
+# $MY_BASEDIR_VERSION/bin/@mybin_myisamchk@ --silent --force --fast --medium-check $DATADIR/*/*.MYI
+# $MY_BASEDIR_VERSION/bin/@mybin_isamchk@ --silent --force $DATADIR/*/*.ISM
echo "Starting $MYSQLD daemon with databases from $DATADIR"
diff -Naur mysql-4.1.23-bk-20070101.orig/scripts/mysqldumpslow.sh mysql-4.1.23-bk-20070101/scripts/mysqldumpslow.sh
--- mysql-4.1.23-bk-20070101.orig/scripts/mysqldumpslow.sh 2007-01-01 20:44:41.000000000 +0100
+++ mysql-4.1.23-bk-20070101/scripts/mysqldumpslow.sh 2007-01-03 00:14:16.000000000 +0100
@@ -34,16 +34,16 @@
$opt{'help'} and usage();
unless (@ARGV) {
- my $defaults = `my_print_defaults mysqld`;
+ my $defaults = `@mybin_my_print_defaults@ mysqld`;
my $basedir = ($defaults =~ m/--basedir=(.*)/)[0]
- or die "Can't determine basedir from 'my_print_defaults mysqld' output: $defaults";
+ or die "Can't determine basedir from '@mybin_my_print_defaults@ mysqld' output: $defaults";
warn "basedir=$basedir\n" if $opt{v};
my $datadir = ($defaults =~ m/--datadir=(.*)/)[0];
if (!$datadir or $opt{i}) {
# determine the datadir from the instances section of /etc/my.cnf, if any
- my $instances = `my_print_defaults instances`;
- die "Can't determine datadir from 'my_print_defaults mysqld' output: $defaults"
+ my $instances = `@mybin_my_print_defaults@ instances`;
+ die "Can't determine datadir from '@mybin_my_print_defaults@ mysqld' output: $defaults"
unless $instances;
my @instances = ($instances =~ m/^--(\w+)-/mg);
die "No -i 'instance_name' specified to select among known instances: @instances.\n"
@@ -51,7 +51,7 @@
die "Instance '$opt{i}' is unknown (known instances: @instances)\n"
unless grep { $_ eq $opt{i} } @instances;
$datadir = ($instances =~ m/--$opt{i}-datadir=(.*)/)[0]
- or die "Can't determine --$opt{i}-datadir from 'my_print_defaults instances' output: $instances";
+ or die "Can't determine --$opt{i}-datadir from '@mybin_my_print_defaults@ instances' output: $instances";
warn "datadir=$datadir\n" if $opt{v};
}
|