Comment 1 for bug 905716

Revision history for this message
Elena Stepanova (elenst) wrote :

On Windows (release build, don't have Windows debug at hand) it does not crash, but ALTER fails with "1034: Incorrect key file for table '#sql-1b00_1'; try to repair it", even although before that the table looked okay:

CREATE TABLE t1 ( a VARCHAR(800),KEY(a) )
ENGINE=Aria DEFAULT CHARACTER SET latin1;
INSERT INTO t1 VALUES
(REPEAT('abc ',200)), (REPEAT('def ',200)),
(REPEAT('ghi ',200)), (REPEAT('jkl ',200));
INSERT INTO t1 SELECT * FROM t1;
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
ALTER TABLE t1 MODIFY a VARCHAR(800) CHARSET `ucs2`;
main.test [ fail ]
        Test ended at 2011-12-18 01:13:56

CURRENT_TEST: main.test
mysqltest: At line 10: query 'ALTER TABLE t1 MODIFY a VARCHAR(800) CHARSET `ucs2
`' failed: 1034: Incorrect key file for table '#sql-1b00_1'; try to repair it

Warnings from just before the error:
Warning 1071 Specified key was too long; max key length is 1208 bytes
Warning 1071 Specified key was too long; max key length is 1208 bytes

On Linux x86_64, it sometimes crashes/asserts, sometimes throws the error.
On Linux 32-bit, it always crashed for me, although possibly it's not 100% probability either.