Assertion `page->size <= share->max_index_block_size' failed at ma_page.c:196: _ma_write_keypage on column charset modification
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Medium
|
Michael Widenius |
Bug Description
#8 0x4023f014 in __assert_fail () from /lib/libc.so.6
#9 0x0863a81c in _ma_write_keypage (page=0x4894c2f4,
lock=
#10 0x08601fea in w_search (info=0x94c23e0, comp_flag=131076, key=0x4894ce7c,
page_pos=8192, father_page=0x0, father_keypos=0x0, insert_last=0 '\000')
at ma_write.c:730
#11 0x086015ea in _ma_ck_
root=
#12 0x0860147b in _ma_ck_
root=0x94d5d80, comp_flag=131076) at ma_write.c:491
#13 0x086012eb in _ma_ck_write_btree (info=0x94c23e0, key=0x4894ce7c)
at ma_write.c:451
#14 0x0860125a in _ma_ck_write (info=0x94c23e0, key=0x4894ce7c)
at ma_write.c:436
#15 0x08600b85 in maria_write (info=0x94c23e0, record=0x94bc600 "\376@\006")
at ma_write.c:189
#16 0x08595998 in ha_maria::write_row (this=0x9478f50,
buf=0x94bc600 "\376@\006") at ha_maria.cc:1135
#17 0x08438821 in handler:
buf=0x94bc600 "\376@\006") at handler.cc:4918
#18 0x0846281c in copy_data_
to=0x94baf98, create=..., ignore=false, order_num=0, order=0x0,
copied=
error_
#19 0x08460d5d in mysql_alter_table (thd=0x93eaa98, new_db=0x9459f18 "test",
new_
alter_
require_
#20 0x082e4e7f in mysql_execute_
#21 0x082ee463 in mysql_parse (thd=0x93eaa98,
rawbuf=
length=51, found_semicolon
#22 0x082e0e66 in dispatch_command (command=COM_QUERY, thd=0x93eaa98,
packet=
packet_
#23 0x082e0310 in do_command (thd=0x93eaa98) at sql_parse.cc:922
#24 0x082dd2d5 in handle_
#25 0x400c2b25 in start_thread () from /lib/libpthread
#26 0x402ee34e in clone () from /lib/libc.so.6
bzr version-info
revision-id: <email address hidden>
date: 2011-12-16 08:05:14 -0800
build-date: 2011-12-17 19:44:33 +0400
revno: 3358
branch-nick: maria-5.3
Also reproducible on 5.1.60, 5.2.10, 5.3.2 release versions.
So far I could only get it while modifying charset to ucs2.
Test case:
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 is not needed to reproduce the problem,
# but shows that by this time the table appears to be okay.
CHECK TABLE t1;
ALTER TABLE t1 MODIFY a VARCHAR(800) CHARSET `ucs2`;
Changed in maria: | |
status: | New → In Progress |
importance: | Undecided → Medium |
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.