I have pared down my bug scenario to a single script, at the end of which I have failed to update my table, and have reports that the MYD file cannot be opened. Here it is:
#This script file for mysql shows a possible bug. #The update statement near the bottom of the file (a) appears not to #work (as shown by the fact that the two selects return the same result) #(b) leaves the table <clips> in a state which myisamchk describes as #"crashed", and (c) after a flush leaves clips.MYD unreadable #Drop and re-create the test table DROP TABLE IF EXISTS Clips ; CREATE TABLE Clips ( ClipID INTEGER NOT NULL, Owner TINYTEXT DEFAULT NULL, PRIMARY KEY (ClipID), FULLTEXT (Owner) ) ; #Create a single row INSERT INTO clips SET clipID = 2 ; #Display it SELECT ClipID, Owner FROM clips ; #Owner should be NULL #Update it #This is the line which causes the damage UPDATE Clips SET Owner = "me" WHERE ClipID = 2 ; #Display it agaim SELECT ClipID, Owner FROM clips ; #Owner should be "me" but is NULL #This works at this point SHOW COLUMNS FROM Clips ; FLUSH TABLE Clips ; #So myisamchk sees a clean file #This fails after the flush - errno 145 SHOW COLUMNS FROM Clips ; Alec Cawley <<-- This e-mail is intended for the named addressees only. Its contents may be privileged or confidential and should be treated as such. If you are not an intended recipient please notify the sender immediately; do not copy, distribute, or take any action based on this e-mail; and then delete it. In the pursuit of its legitimate business activities and its conformance with relevant legislation, Quantel Ltd. may access any e-mail (including attachments) it originates and receives, for potential scrutiny. Check out Quantel's new website, packed full of information, at : http://www.quantel.com --------------------------------------------------------------------- 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