> >Description:
> With mysqlhotcopy version 1.15 (from MySQL-3.23.49-1) I used
> to do like this:
> mysqlhotcopy --user=root --password=foo -q --allowold
> --record_log_pos backup.log_pos db1 db2 backup $TMPDIR
> After upgrading to MySQL-3.23.55-1 and thus mysqlhotcopy
> version 1.17 the same command gave this error:
> DBD::mysql::db do failed: Not unique table/alias: 'log_pos' at
> /usr/bin/mysqlhotcopy line 437.
> The problem is that line 311 now adds backticks around
> database and table names:
> my @hc_tables = map { "`$db`.`$_`" } @dbh_tables;
> This is not taken into account at line 422 where $table comes
> directly from $opt{checkpoint} or $opt{record_log_pos}:
> unless ( $hc_locks =~ s/$table\s+READ/$table WRITE/ );
> The resulting lock-command becomes:
> LOCK TABLES `db1`.`table1` READ, `db2`.`table1` READ,
> `backup`.`log_pos` READ, backup.log_pos WRITE
> >How-To-Repeat:
> Try issuing the command
> mysqlhotcopy --user=root --password=foo -q --allowold
> --record_log_pos backup.log_pos db1 db2 backup $TMPDIR
> where the database that the log_pos is recorded in is also in the
> list of databases to backup.
> >Fix:
> Fix documentation so it doesn't say
> The name of the log-pos table should be supplied in database.table
> format.
> but
> ... supplied in \`database\`.\`table\` format.
>
> Or better, add this fix (sorry about my Perl - I know it is
> bad):
> --- mysqlhotcopy.orig Wed Jan 29 14:00:00 2003
> +++ mysqlhotcopy Wed Jan 29 14:00:14 2003
> @@ -113,6 +113,14 @@
> "dryrun|n",
> ) or usage("Invalid option");
>
> +# Make sure that $opt{record_log_pos} is of form `db`.`table`
> +if (defined($opt{record_log_pos}))
> +{
> + $opt{record_log_pos} =~ tr/\`//d;
> + $opt{record_log_pos} =~ s/\./\`\.\`/;
> + $opt{record_log_pos} = "\`$opt{record_log_pos}\`";
> +}
> +
> # @db_desc
> # ==========
> # a list of hash-refs containing:
>
The same should probably be done for $opt{checkpoint}.
> >Submitter-Id: [EMAIL PROTECTED]
> >Originator: Soeren Thing Andersen
> >Organization:
> TDC
> >MySQL support: none
> >Synopsis: Backticks not added to $opt{record_log_pos}
> >Severity: non-critical
> >Priority: medium
> >Category: mysql
> >Class: sw-bug
> >Release: mysql-3.23.55 (Official MySQL RPM)
>
> >Environment:
> System: Linux alarmnetgw2.vpn.alarm-net.dk 2.4.9-31 #1 Tue Feb 26 07:11:02
> EST 2002 i686 unknown
> Architecture: i686
>
> Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
> /usr/bin/cc
> GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
> gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85)
> Compilation info: CC='gcc' CFLAGS='-O6 -fno-omit-frame-pointer -mpentium'
> CXX='gcc' CXXFLAGS='-O6 -fno-omit-frame-pointer
> -felide-constructors -fno-exceptions -fno-rtti -mpentium' LDFLAGS=''
> LIBC:
> lrwxrwxrwx 1 root root 13 Oct 10 14:51 /lib/libc.so.6 ->
> libc-2.2.4.so
> -rwxr-xr-x 1 root root 1285884 Sep 9 18:10 /lib/libc-2.2.4.so
> -rw-r--r-- 1 root root 27336078 Sep 9 17:48 /usr/lib/libc.a
> -rw-r--r-- 1 root root 178 Sep 9 17:48 /usr/lib/libc.so
> Configure command: ./configure '--disable-shared'
> '--with-mysqld-ldflags=-all-static' '--with-client-ldflags=-all-static'
> '--without-berkeley-db' '--without-innodb' '--enable-assembler'
> '--enable-local-infile' '--with-mysqld-user=mysql'
> '--with-unix-socket-path=/var/lib/mysql/mysql.sock' '--prefix=/'
> '--with-extra-charsets=complex' '--exec-prefix=/usr'
> '--libexecdir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share'
> '--localstatedir=/var/lib/mysql' '--infodir=/usr/share/info'
> '--includedir=/usr/include' '--mandir=/usr/share/man'
> '--with-comment=Official MySQL RPM' 'CC=gcc' 'CFLAGS=-O6
> -fno-omit-frame-pointer -mpentium' 'CXXFLAGS=-O6 -fno-omit-frame-pointer
> -felide-constructors -fno-exceptions -fno-rtti -mpentium' 'CXX=gcc'
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php