Bug #31821 "mysqlcheck --fix-table-names --all-in-1" doesn't work
Submitted: 24 Oct 2007 17:31 Modified: 6 Aug 2009 23:52
Reporter: Ramil Kalimullin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to: Jim Winstead CPU Architecture:Any

[24 Oct 2007 17:31] Ramil Kalimullin
Description:
Combination of --fix-table-names and --all-in-1 mysqlcheck options
is not properly handled.

How to repeat:
using 5.1, create a table with "#mysql50#" prefix:
use test;
create table `#mysql50#r-r` (a int);
show tables;

launch:
mysqlcheck --check-upgrade --fix-table-names --all-in-1 --databases test

check the result:
show tables;

launch:
mysqlcheck --check-upgrade --fix-table-names --databases test

check the result:
show tables;

Suggested fix:
Either ignore --all-in-1 if --fix-table-names given
or use "RENAME TABLE t1old TO t1new, t2old TO t2new..." syntax.
[28 Oct 2007 10:36] Valeriy Kravchuk
Thank you for a bug report. Verified just as described.
[21 May 2009 1:31] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/74666

2907 Jim Winstead	2009-05-20
      mysqlcheck failed to fix table names when using the --fix-table-names
      and --all-in-1 options together. (Bug #31821)
      modified:
        client/mysqlcheck.c
        mysql-test/r/mysqlcheck.result
        mysql-test/t/mysqlcheck.test
[14 Jul 2009 17:20] Jim Winstead
Pushed to 5.1-bugteam and mysql-pe.
[4 Aug 2009 19:50] Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090804194615-h40sa098mx4z49qg) (version source revid:jimw@mysql.com-20090714171651-ziq080rkon3u244l) (merge vers: 5.4.4-alpha) (pib:11)
[4 Aug 2009 20:45] Bugs System
Pushed into 5.1.38 (revid:davi.arnaut@sun.com-20090804204317-ggodqkik7de6nfpz) (version source revid:davi.arnaut@sun.com-20090804204317-ggodqkik7de6nfpz) (merge vers: 5.1.38) (pib:11)
[6 Aug 2009 23:52] Paul DuBois
Noted in 5.1.38, 5.4.4 changelogs.

mysqlcheck failed to fix table names when the --fix-table-names and
--all-in-1 options were both specified.
[12 Aug 2009 22:59] Paul DuBois
Noted in 5.4.2 changelog because next 5.4 version will be 5.4.2 and not 5.4.4.
[15 Aug 2009 2:18] Paul DuBois
Ignore previous comment about 5.4.2.
[1 Oct 2009 5:59] Bugs System
Pushed into 5.1.39-ndb-6.3.28 (revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (version source revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (merge vers: 5.1.39-ndb-6.3.28) (pib:11)
[1 Oct 2009 7:25] Bugs System
Pushed into 5.1.39-ndb-7.0.9 (revid:jonas@mysql.com-20091001072547-kv17uu06hfjhgjay) (version source revid:jonas@mysql.com-20091001071652-irejtnumzbpsbgk2) (merge vers: 5.1.39-ndb-7.0.9) (pib:11)
[1 Oct 2009 13:25] Bugs System
Pushed into 5.1.39-ndb-7.1.0 (revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (version source revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (merge vers: 5.1.39-ndb-7.1.0) (pib:11)
[5 Oct 2009 10:50] Bugs System
Pushed into 5.1.39-ndb-6.2.19 (revid:jonas@mysql.com-20091005103850-dwij2dojwpvf5hi6) (version source revid:jonas@mysql.com-20090930185117-bhud4ek1y0hsj1nv) (merge vers: 5.1.39-ndb-6.2.19) (pib:11)
[9 Oct 2009 1:28] Paul DuBois
The 5.4 fix has been pushed to 5.4.2.