>Description:
mysqlhotcopy does not read defaults from my.cnf and .my.cnf files.
>How-To-Repeat:
Run mysqlhotcopy and observe it doesn't read client defaults.
>Fix:
See below for patch, shown as a context diff
>Submitter-Id: <submitter ID>
>Originator: Larry Stone
>Organization:
MIT (Massachusetts Institute of Technology)
>MySQL support: none
>Synopsis: mysqlhotcopy does not read defaults from my.cnf and .my.cnf files.
>Severity: non-critical
>Priority: medium
>Category: mysql
>Class: sw-bug
>Release: mysql-4.0.12-standard (Official MySQL-standard binary)
>C compiler: gcc (GCC) 3.2
>C++ compiler: gcc (GCC) 3.2
>Environment:
System: SunOS speaker-to-teletypes.mit.edu 5.8 Generic_108528-18 sun4u sparc
SUNW,Sun-Blade-100
Architecture: sun4
Some paths: /usr/athena/bin/perl /usr/ccs/bin/make /usr/athena/bin/gmake
/mit/gnu/arch/sun4x_58/bin/gcc /usr/athena/bin/cc
GCC: Reading specs from
/mit/gnu/arch/sun4x_58/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs
gcc version 2.95.3 20010315 (release)
Compilation info: CC='gcc' CFLAGS='-O3 -fno-omit-frame-pointer' CXX='gcc'
CXXFLAGS='-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti'
LDFLAGS='' ASFLAGS=''
LIBC:
lrwxrwxrwx 1 root root 18 Aug 9 2002 /lib/libc.a -> /os/usr/lib/libc.a
lrwxrwxrwx 1 root root 11 Aug 9 2002 /lib/libc.so -> ./libc.so.1
-rwxr-xr-x 1 root bin 1157924 Mar 18 21:34 /lib/libc.so.1
lrwxrwxrwx 1 root root 18 Aug 9 2002 /usr/lib/libc.a ->
/os/usr/lib/libc.a
lrwxrwxrwx 1 root root 11 Aug 9 2002 /usr/lib/libc.so -> ./libc.so.1
-rwxr-xr-x 1 root bin 1157924 Mar 18 21:34 /usr/lib/libc.so.1
Configure command: ./configure '--prefix=/usr/local/mysql' '--with-comment=Official
MySQL-standard binary' '--with-extra-charsets=complex'
'--with-server-suffix=-standard' '--enable-thread-safe-client' '--enable-local-infile'
'--enable-assembler' '--with-named-z-libs=no' '--with-named-curses-libs=-lcurses'
'--disable-shared' '--with-innodb' 'CC=gcc' 'CFLAGS=-O3 -fno-omit-frame-pointer'
'CXXFLAGS=-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti'
'CXX=gcc'
------------------------------------------
Here is my patch that fixes the problem, agains the version 4.0.12 source:
*** mysqlhotcopy.orig Sat Mar 15 12:06:50 2003
--- mysqlhotcopy Fri Apr 11 19:33:13 2003
***************
*** 80,85 ****
--- 80,100 ----
die @_, $OPTIONS;
}
+ ## get defaults from my.cnf, .my.cnf files:
+ my $my_print_defaults = 'my_print_defaults';
+ if ($0 =~ m#^/#) {
+ my ($mybindir) = ($0 =~ m#(^.+)/[^/]+$#);
+ $my_print_defaults = "${mybindir}/my_print_defaults"
+ if length($mybindir);
+ }
+ my @defops = `$my_print_defaults client mysqlhotcopy`;
+ if ($?) {
+ warn "Failed to invoke $my_print_defaults, cannot read defaults from
files.";
+ } else {
+ chop @defops;
+ splice @ARGV, 0, 0, @defops;
+ }
+
my %opt = (
user => scalar getpwuid($>),
noindices => 0,
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]