Bug #46 mysqlcheck bug in autorepair mode

Submitted: 28 Jan 2003 14:26 Modified: 8 Feb 2003 2:47
Reporter: Peter Zaitsev (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:4.0 and 3.23 OS:Any (all)
Assigned to: Jani Tolonen CPU Architecture:Any

[28 Jan 2003 14:26] Peter Zaitsev
Description:
1) --auto-repair does not work if -c is not specified, while  
check seems to be default option for other purposes. This gave 
me a lot of of hassle finding it out.

2) --auto-repair does not work at all :)
It runs  REPAIR TABLE `database.table` which is parsed as a table 
name only and returned "Invalid table name error"

Here is the log snip:

# tail /usr/local/var/prddbs03.log
                      2 Query       CHECK TABLE `airline_destinations`
                      2 Query       CHECK TABLE `airline_status`
                      2 Query       CHECK TABLE `airlines`
                      2 Query       CHECK TABLE `airlines_LM2`
                      2 Query       CHECK TABLE `airlines_LM6`
                      2 Query       CHECK TABLE `airlines_TP2`
                      2 Query       CHECK TABLE `airlines_TP4`
                      2 Query       CHECK TABLE `daily_da_airline_count`
                      2 Query       REPAIR TABLE `Airlines.access_log`

Notice table name is escaped together with database name.
                      

How to repeat:
1) create corrupted table in database test 
2) run mysqlcheck -c --auto-repair -A

Suggested fix:
Workaround to use --all-in-1 option
which does proper table name escaping.
[8 Feb 2003 2:47] Matt Wagner
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/

Fixed in 4.0.11

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.