Bug #39246 Found too long record (26) at 0
Submitted: 4 Sep 2008 14:38 Modified: 8 Sep 2008 6:21
Reporter: Jeppe Skovbon Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S2 (Serious)
Version:5.0.27 and 5.0.67-community-nt OS:Windows (XP)
Assigned to: CPU Architecture:Any
Tags: crash, myisam

[4 Sep 2008 14:38] Jeppe Skovbon
Description:
I still on getting an error when inserting data into a table and afterwards doing a select query. I use mySQL Server 5.0 

The error is : 
java.sql.SQLException: Table 'certuserid' is marked as crashed and should be 
repaired at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946) 

When executing a check I get this message:
Found too long record (26) at 0 

Any idea why the table crash? Thanks in advance. 

/*INSERT*/ 
INSERT INTO certuserid ( userID, certificateID, userTypeID, createdDatetime ) VALUES ( 5, 7, 6, '20080903014257' ) 

/*DDL Information For - auc.certuserid*/ 
CREATE TABLE `certuserid` ( 
`certUserID` int(11) NOT NULL auto_increment, 
`userID` int(11) NOT NULL, 
`certificateID` int(11) NOT NULL, 
`usertypeID` int(11) NOT NULL, 
`createdDatetime` datetime NOT NULL, 
PRIMARY KEY (`certUserID`) 
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC 

/*Index Information For - auc.certuserid*/ 
------------------------------------------ 

Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment 
---------- ---------- -------- ------------ ----------- --------- ----------- -------- ------ ------ ---------- ------- 
certuserid 0 PRIMARY 1 certUserID A 1 (NULL) (NULL) BTREE

How to repeat:
/*CREATE TABLE*/ 
CREATE TABLE `certuserid` ( 
`certUserID` int(11) NOT NULL auto_increment, 
`userID` int(11) NOT NULL, 
`certificateID` int(11) NOT NULL, 
`usertypeID` int(11) NOT NULL, 
`createdDatetime` datetime NOT NULL, 
PRIMARY KEY (`certUserID`) 
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC

/*INSERT*/ 
INSERT INTO certuserid ( userID, certificateID, userTypeID, createdDatetime ) VALUES ( 5, 7, 6, '20080903014257' )

/*SELECT*/
SELECT * FROM certuserid

/*ERROR CODE */
Error Code : 1194
Table 'certuserid' is marked as crashed and should be repaired
(0 ms taken)
[4 Sep 2008 14:43] Valeriy Kravchuk
Thank you for a problem report. What exact version of MySQL server, 5.0.x, you had used?
[4 Sep 2008 20:34] Jeppe Skovbon
The mySQL server version is 5.0.27-community-nt
[5 Sep 2008 5:41] Sveta Smirnova
Thank you for the feedback.

Did table crash one time? Did you repair the table?

Or do you mean scenario like "making insert -> select reports table is crashed -> check -> repair -> insert ->table crashes again"?

Regarding to the first case please read http://dev.mysql.com/doc/refman/5.0/en/corrupted-myisam-tables.html for reasons.

If you experience second case please try current version 5.0.67 and in case if problem still exists provide your configuration file.
[5 Sep 2008 8:34] Uldis Nelsons
I have same problem.
MySQL 5.0.51b-community-nt

After insert table is crashed. Insert do not show any error.

table

CREATE TABLE `snrc_record` (
  `snrc_id` int(10) unsigned NOT NULL auto_increment,
  `snrc_srv_id` smallint(6) NOT NULL COMMENT 'remote server id',
  `snc_sntb_id` smallint(6) NOT NULL COMMENT 'tabula',
  `snc_local_id` int(11) NOT NULL COMMENT 'lokalas tabulas id',
  `snc_rem_id` int(11) default NULL COMMENT 'remote server table id',
  `snc_rec_vers` smallint(6) NOT NULL COMMENT 'ieraksta versija',
  PRIMARY KEY  (`snrc_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC COMMENT='';

insert into snrc_record 
(snrc_srv_id,snc_sntb_id,snc_local_id,snc_rem_id,snc_rec_vers ) 
values 
('1','3','39','91','1')
[5 Sep 2008 10:20] Jeppe Skovbon
Yes, I have tried to repair the table. Also to truncate the table.

But then the error repeats like:

"making insert -> select reports table iscrashed -> check -> repair -> insert ->table crashes again"
[5 Sep 2008 16:25] MySQL Verification Team
I couldn't repeat with source server, are you tried with 5.0.67 released version as asked before?. Thanks.
[5 Sep 2008 19:06] Jeppe Skovbon
Okay I upgraded the mySQL server to version 5.0.67-community-nt.

I still on getting the same error. I have tried to delete the table and reconstruct it, but it didn´t solve the problem.

I have also tried to rename the table, but that didn´t helped me either.

When I did a repair (quick, local, extended, USE_frm was checked) I got this message:

Table           Op      Msg_type  Msg_text                                
--------------  ------  --------  ----------------------------------------
auc.certuserid  repair  info      Wrong bytesec:   3-  0- 26 at 0; Skipped
auc.certuserid  repair  status    Operation failed 

Table '.\auc\certuserid' is marked as crashed and last (automatic?) repair failed

Then I did a quick repair and the error repeats when inserting and then doing a select query. 

I am wondering why this error suddenly appears, as I have used the mySQL version 5.0.27 for several month, creating hundred of tables without any errors before?!
[6 Sep 2008 15:29] Jeppe Skovbon
My configuration file

Attachment: my.ini (application/octet-stream, text), 8.75 KiB.

[7 Sep 2008 17:15] MySQL Verification Team
probably a duplicate of bug #37310 or bug #37752 . workaround is to comment out the "row_format=dynamic" option in the create table statement.
[7 Sep 2008 18:38] Jeppe Skovbon
Thanks, now it works fine.

I commented out the "row_format=dynamic" option in the create tablestatement.
[8 Sep 2008 6:21] Sveta Smirnova
Thank you for the feedback.

Marked as duplicate of  bug #37310 because last comment.