summaryrefslogtreecommitdiff
blob: 36b4f3d854e70fb08652b4a126c867296568f3db (plain)
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
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
diff -Naur -Naur mysql-4.0.26/scripts/Makefile.am mysql-4.0.26.new/scripts/Makefile.am
--- mysql-4.0.26/scripts/Makefile.am	2005-09-02 22:38:04.000000000 +0000
+++ mysql-4.0.26.new/scripts/Makefile.am	2005-12-06 15:30:25.000000000 +0000
@@ -81,11 +81,41 @@
 			mysql_find_rows \
 			mysqlhotcopy \
 			mysqldumpslow \
+			mysql_explain_log \
+			mysql_tableinfo \
 			mysqld_multi \
 			make_win_src_distribution
 
 SUPERCLEANFILES =	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
+
 # We want the right version and configure comand line in mysqlbug
 mysqlbug: ${top_builddir}/config.status mysqlbug.sh
 
@@ -93,8 +123,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 -Naur mysql-4.0.26/scripts/msql2mysql.sh mysql-4.0.26.new/scripts/msql2mysql.sh
--- mysql-4.0.26/scripts/msql2mysql.sh	2005-09-02 22:38:10.000000000 +0000
+++ mysql-4.0.26.new/scripts/msql2mysql.sh	2005-12-06 15:26:25.000000000 +0000
@@ -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 -Naur mysql-4.0.26/scripts/mysql_config.sh mysql-4.0.26.new/scripts/mysql_config.sh
--- mysql-4.0.26/scripts/mysql_config.sh	2005-09-02 22:37:59.000000000 +0000
+++ mysql-4.0.26.new/scripts/mysql_config.sh	2005-12-06 15:26:25.000000000 +0000
@@ -69,7 +69,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 -Naur mysql-4.0.26/scripts/mysql_config.sh.orig mysql-4.0.26.new/scripts/mysql_config.sh.orig
--- mysql-4.0.26/scripts/mysql_config.sh.orig	1970-01-01 00:00:00.000000000 +0000
+++ mysql-4.0.26.new/scripts/mysql_config.sh.orig	2005-09-02 22:37:59.000000000 +0000
@@ -0,0 +1,152 @@
+#!/bin/sh
+# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+# This script reports various configuration settings that may be needed
+# when using the MySQL client library.
+
+which ()
+{
+  IFS="${IFS=   }"; save_ifs="$IFS"; IFS=':'
+  for file
+  do
+    for dir in $PATH
+    do
+      if test -f $dir/$file
+      then
+        echo "$dir/$file"
+        continue 2
+      fi
+    done
+    echo "which: no $file in ($PATH)"
+    exit 1
+  done
+  IFS="$save_ifs"
+}
+
+#
+# If we can find the given directory relatively to where mysql_config is
+# we should use this instead of the incompiled one.
+# This is to ensure that this script also works with the binary MySQL
+# version
+
+fix_path ()
+{
+  var=$1
+  shift
+  for filename
+  do
+    path=$basedir/$filename
+    if [ -d "$path" ] ;
+    then
+      eval "$var"=$path
+      return
+    fi
+  done
+}
+
+get_full_path ()
+{
+  case $1 in
+    /*)	echo "$1";;
+    ./*) tmp=`pwd`/$1; echo $tmp | sed -e 's;/\./;/;' ;;
+     *) which $1 ;;
+   esac
+}
+
+me=`get_full_path $0`
+
+basedir=`echo $me | sed -e 's;/bin/mysql_config;;'`
+
+ldata='@localstatedir@'
+execdir='@libexecdir@'
+bindir='@bindir@'
+pkglibdir='@pkglibdir@'
+fix_path pkglibdir lib/mysql lib
+pkgincludedir='@pkgincludedir@'
+fix_path pkgincludedir include/mysql include
+version='@VERSION@'
+socket='@MYSQL_UNIX_ADDR@'
+port='@MYSQL_TCP_PORT@'
+ldflags='@LDFLAGS@'
+client_libs='@CLIENT_LIBS@'
+
+# Create options
+
+libs="$ldflags -L$pkglibdir -lmysqlclient $client_libs"
+libs=`echo "$libs" | sed -e 's;  \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'`
+libs_r="$ldflags -L$pkglibdir -lmysqlclient_r @LIBS@ @openssl_libs@"
+libs_r=`echo "$libs_r" | sed -e 's;  \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'`
+cflags="-I$pkgincludedir @CFLAGS@ " #note: end space!
+include="-I$pkgincludedir"
+embedded_libs="$ldflags -L$pkglibdir -lmysqld @LIBS@ @WRAPLIBS@ @innodb_system_libs@"
+embedded_libs=`echo "$embedded_libs" | sed -e 's;  \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'`
+
+# Remove some options that a client doesn't have to care about
+for remove in DDBUG_OFF DSAFEMALLOC USAFEMALLOC DSAFE_MUTEX \
+              DPEDANTIC_SAFEMALLOC DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS \
+              DEXTRA_DEBUG DHAVE_purify 'O[0-9]' 'W[-A-Za-z]*'
+do
+  cflags=`echo "$cflags"|sed -e "s/-$remove  *//g"` 
+done
+cflags=`echo "$cflags"|sed -e 's/ *\$//'` 
+
+usage () {
+        cat <<EOF
+Usage: $0 [OPTIONS]
+Options:
+        --cflags         [$cflags]
+	--include	 [$include]
+        --libs           [$libs]
+        --libs_r         [$libs_r]
+        --socket         [$socket]
+        --port           [$port]
+        --version        [$version]
+	--libmysqld-libs [$embedded_libs]
+EOF
+        exit 1
+}
+
+if test $# -le 0; then usage; fi
+
+while test $# -gt 0; do
+        case $1 in
+        --cflags)  echo "$cflags" ;;
+	--include) echo "$include" ;;
+        --libs)    echo "$libs" ;;
+        --libs_r)  echo "$libs_r" ;;
+        --socket)  echo "$socket" ;;
+        --port)    echo "$port" ;;
+        --version) echo "$version" ;;
+	--embedded-libs | --embedded | --libmysqld-libs) echo "$embedded_libs" ;;
+        *)         usage ;;
+        esac
+
+        shift
+done
+
+#echo "ldata: '"$ldata"'"
+#echo "execdir: '"$execdir"'"
+#echo "bindir: '"$bindir"'"
+#echo "pkglibdir: '"$pkglibdir"'"
+#echo "pkgincludedir: '"$pkgincludedir"'"
+#echo "version: '"$version"'"
+#echo "socket: '"$socket"'"
+#echo "port: '"$port"'"
+#echo "ldflags: '"$ldflags"'"
+#echo "client_libs: '"$client_libs"'"
+
+exit 0
diff -Naur -Naur mysql-4.0.26/scripts/mysql_install_db.sh mysql-4.0.26.new/scripts/mysql_install_db.sh
--- mysql-4.0.26/scripts/mysql_install_db.sh	2005-09-02 22:38:00.000000000 +0000
+++ mysql-4.0.26.new/scripts/mysql_install_db.sh	2005-12-06 15:37:24.000000000 +0000
@@ -61,20 +61,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=
@@ -95,10 +95,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
@@ -107,13 +107,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
@@ -137,22 +137,22 @@
 # 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 not 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"
       exit 1
     fi
-    echo "WARNING: The host '$hostname' could not be looked up with resolveip."
+    echo "WARNING: The host '$hostname' could not be looked up with @mybin_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 !"
@@ -371,8 +371,8 @@
   fi
   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.
@@ -380,14 +380,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"
@@ -407,13 +407,13 @@
   echo "You can also try to start the mysqld daemon with:"
   echo "$execdir/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"
@@ -422,6 +422,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 -Naur mysql-4.0.26/scripts/mysql_secure_installation.sh mysql-4.0.26.new/scripts/mysql_secure_installation.sh
--- mysql-4.0.26/scripts/mysql_secure_installation.sh	2005-09-02 22:37:55.000000000 +0000
+++ mysql-4.0.26.new/scripts/mysql_secure_installation.sh	2005-12-06 15:26:49.000000000 +0000
@@ -30,7 +30,7 @@
 
 do_query() {
     echo $1 >$command
-    mysql --defaults-file=$config <$command
+    @mybin_mysql@ --defaults-file=$config <$command
     return $?
 }
 
diff -Naur -Naur mysql-4.0.26/scripts/mysqlaccess.sh mysql-4.0.26.new/scripts/mysqlaccess.sh
--- mysql-4.0.26/scripts/mysqlaccess.sh	2005-09-02 22:37:59.000000000 +0000
+++ mysql-4.0.26.new/scripts/mysqlaccess.sh	2005-12-06 15:26:49.000000000 +0000
@@ -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 -Naur mysql-4.0.26/scripts/mysqld_multi.sh mysql-4.0.26.new/scripts/mysqld_multi.sh
--- mysql-4.0.26/scripts/mysqld_multi.sh	2005-09-02 22:38:07.000000000 +0000
+++ mysql-4.0.26.new/scripts/mysqld_multi.sh	2005-12-06 15:41:13.000000000 +0000
@@ -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;
@@ -37,11 +37,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";
@@ -67,9 +67,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;
@@ -102,9 +102,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";
@@ -149,7 +149,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)
     {
@@ -263,7 +263,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`;
@@ -574,8 +574,8 @@
 #   give you extra performance in a threaded system!
 #
 [mysqld_multi]
-mysqld     = @bindir@/mysqld_safe
-mysqladmin = @bindir@/mysqladmin
+mysqld     = @bindir@/@mybin_safe_mysqld@
+mysqladmin = @bindir@/@mybin_mysqladmin@
 user       = root
 password   = your_password
 
diff -Naur -Naur mysql-4.0.26/scripts/mysqld_safe.sh mysql-4.0.26.new/scripts/mysqld_safe.sh
--- mysql-4.0.26/scripts/mysqld_safe.sh	2005-09-02 22:37:59.000000000 +0000
+++ mysql-4.0.26.new/scripts/mysqld_safe.sh	2005-12-06 15:43:55.000000000 +0000
@@ -67,7 +67,7 @@
 	then
 	  MYSQLD="mysqld-$tmp"
 	else
-	  MYSQLD="mysqld"
+	  MYSQLD="@mybin_mysqld@"
 	fi
 	;;
       --nice=*) niceness=`echo "$arg" | sed -e "s;--nice=;;"` ;;
@@ -87,7 +87,7 @@
 MY_PWD=`pwd`
 # Check if we are starting this relative (for the binary release)
 if test -d $MY_PWD/data/mysql -a -f ./share/mysql/english/errmsg.sys -a \
- -x ./bin/mysqld
+ -x ./bin/@mybin_mysqld@
 then
   MY_BASEDIR_VERSION=$MY_PWD		# Where bin, share and data are
   ledir=$MY_BASEDIR_VERSION/bin		# Where mysqld is
@@ -98,7 +98,7 @@
   fi
 # Check if this is a 'moved install directory'
 elif test -f ./var/mysql/db.frm -a -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
@@ -113,11 +113,11 @@
 niceness=0
 
 # Use the mysqld-max binary by default if the user doesn't specify a binary
-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
 
 # these rely on $DATADIR by default, so we'll set them later on
@@ -126,17 +126,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=
@@ -155,7 +155,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
@@ -284,12 +284,12 @@
 # checked and repaired during startup. You should add sensible key_buffer
 # and sort_buffer values to my.cnf to improve check performance or require
 # less disk space.
-# Alternatively, you can start mysqld with the "myisam-recover" option. See
+# Alternatively, you can start @mybin_mysqld@ with the "myisam-recover" option. See
 # 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"
 
@@ -299,7 +299,7 @@
 #  ulimit -n 256 > /dev/null 2>&1		# Fix for BSD and FreeBSD systems
 #fi
 
-echo "`date +'%y%m%d %H:%M:%S  mysqld started'`" >> $err_log
+echo "`date +'%y%m%d %H:%M:%S  @mybin_mysqld@ started'`" >> $err_log
 while true
 do
   rm -f $safe_mysql_unix_port $pid_file	# Some extra safety
@@ -344,9 +344,9 @@
       I=`expr $I + 1`
     done
   fi
-  echo "`date +'%y%m%d %H:%M:%S'`  mysqld restarted" | tee -a $err_log
+  echo "`date +'%y%m%d %H:%M:%S'`  @mybin_mysqld@ restarted" | tee -a $err_log
 done
 
-echo "`date +'%y%m%d %H:%M:%S'`  mysqld ended" | tee -a $err_log
+echo "`date +'%y%m%d %H:%M:%S'`  @mybin_mysqld@ ended" | tee -a $err_log
 echo "" | tee -a $err_log
 
diff -Naur -Naur mysql-4.0.26/scripts/mysqldumpslow.sh mysql-4.0.26.new/scripts/mysqldumpslow.sh
--- mysql-4.0.26/scripts/mysqldumpslow.sh	2005-09-02 22:37:59.000000000 +0000
+++ mysql-4.0.26.new/scripts/mysqldumpslow.sh	2005-12-06 15:26:49.000000000 +0000
@@ -32,16 +32,16 @@
 
 
 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"
@@ -49,7 +49,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};
     }