Bug #36761 Error "Table is marked as crashed and should be repaired" on new CSV table
Submitted: 16 May 2008 18:19 Modified: 19 May 2008 6:11
Reporter: Cees Hesp
Status: Analyzing
Category:Server: CSV Severity:S1 (Critical)
Version:5.1.24 OS:Microsoft Windows (XP)
Assigned to: Valeriy Kravchuk Target Version:

[16 May 2008 18:19] Cees Hesp
Description:
Hello,

I'm following the instructions in "Inside MySQL 5.1, A DBA's Perspective" to create an
"empty" table using the CSV engine, and then replacing the .CSV file via the file system.
Creating the table works fine, but when I try to query the newly created table (e.g.
SELECT * FROM ..., or SELECT COUNT(*) FROM ...) an error is reported:

(error 1194): Table ... is marked as crashed and should be repaired.

It does not help to stop the MySQL service after creating the table

How to repeat:
See description
[16 May 2008 19:16] Valeriy Kravchuk
Thank you for a problem report. What exact version of MySQL server, 5.1.x, do you use?
[16 May 2008 19:21] Cees Hesp
Server version: 5.1.24-rc-community MySQL Community Server (GPL)
[16 May 2008 19:36] Valeriy Kravchuk
Please, send SHOW CREATE TABLE results for the CSV table you had created.
[16 May 2008 19:39] Valeriy Kravchuk
As you are on Windows, looks like your problem (and a solution) is described in user
comment to http://dev.mysql.com/doc/refman/5.1/en/csv-storage-engine.html. Please, check.
That whitepaper use example form Unix environment...
[16 May 2008 20:07] Cees Hesp
Changing the .CSV file to Unix format with PFE works. But this is a workaround, not a
solution! I'm trying to automate loading the database... (and don't want manual
intervention)