[Bug 781985] [NEW] Format string bugs in mysqlhotcopy
Emanuel Bronshtein
781985 at bugs.launchpad.net
Fri May 13 03:22:33 UTC 2011
Public bug reported:
Binary package hint: mysql-server-5.1
/usr/bin/mysqlhotcopy have format string bugs .
test case :
connect to mysql server and execute :
mysql> create database test;
Query OK, 1 row affected (0.00 sec)
mysql> use test;
Database changed
mysql> create table `a%n%n%n%n%n%n` (id int);
Query OK, 0 rows affected (0.03 sec)
root at emanuel-desktop:/# mkdir /tmp/mysqltest
root at emanuel-desktop:/# /usr/bin/mysqlhotcopy -u root -p "Password" "test" "/tmp/mysqltest" --allowold --keepold
Locked 1 tables in 0 seconds.
Modification of a read-only value attempted at /usr/bin/mysqlhotcopy line 459.
the bug can be found at :
printf "Flushed tables ($hc_tables) in %d seconds.\n", time-$start unless $opt{quiet};
fix :
printf "Flushed tables (%s) in %d seconds.\n", $hc_tables , time-$start unless $opt{quiet};
also here better use %s for $0 :
printf "$0 copied %d tables (%d files) in %d second%s (%d seconds overall).\n",
$num_tables, $num_files,
$hc_dur, ($hc_dur==1)?"":"s", time - $start_time
unless $opt{quiet};
** Affects: mysql-5.1 (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to mysql-5.1 in Ubuntu.
https://bugs.launchpad.net/bugs/781985
Title:
Format string bugs in mysqlhotcopy
More information about the Ubuntu-server-bugs
mailing list