REPAIR TABLE crashes server
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
Critical
|
Stewart Smith |
Bug Description
The REPAIR TABLE statement will crash the server.
Steps to repeat:
./config/autorun.sh && ./configure --with-debug && make -j2
cd tests
./dtr --suite=broken myisam
Output:
drizzletest: At line 338: query 'REPAIR TABLE t1' failed: 2013: Lost connection to Drizzle server during query
The result from queries just before the failure was:
< snip >
drop table t1;
CREATE TABLE `t1` (
`post_id` int NOT NULL auto_increment,
`topic_id` int NOT NULL default '0',
`post_time` datetime NOT NULL default '0000-00-00 00:00:00',
`post_text` text NOT NULL,
`icon_url` varchar(10) NOT NULL default '',
`sign` int NOT NULL default '0',
`post_edit` varchar(150) NOT NULL default '',
`poster_login` varchar(35) NOT NULL default '',
`ip` varchar(15) NOT NULL default '',
PRIMARY KEY (`post_id`),
KEY `post_time` (`post_time`),
KEY `ip` (`ip`),
KEY `poster_login` (`poster_login`),
KEY `topic_id` (`topic_id`)
# FULLTEXT KEY `post_text` (`post_text`)
) ENGINE=MyISAM;
INSERT INTO t1 (post_text) VALUES ('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test');
REPAIR TABLE t1;
GDB Backtrace:
Breakpoint 1, mysql_parse (session=
inBuf=0x1accdd0 "drop table if exists t1,t2", length=26,
found_
2543 lex_start(session);
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x41ac4950 (LWP 22372)]
0x00007ff0be78e007 in memcpy () from /lib/libc.so.6
(gdb) where
#0 0x00007ff0be78e007 in memcpy () from /lib/libc.so.6
#1 0x000000000072f217 in _mi_rec_pack (info=0x204ce00,
to=0x19 <Address 0x19 out of bounds>, from=0x204dca8 "\001")
at mi_dynrec.c:966
#2 0x000000000073f363 in sort_write_record (sort_param=
at mi_check.c:3335
#3 0x000000000073dd52 in sort_key_read (sort_param=
at mi_check.c:2890
#4 0x000000000074969c in find_all_keys (info=0x41ab96e0, keys=10,
sort_
tempfile=
#5 0x00000000007490ea in _create_
no_
#6 0x000000000073b96f in mi_repair_by_sort (param=0x41aba0a0, info=0x204ce00,
name=0x41ab9df0 "./test/t1", rep_quick=0) at mi_check.c:2197
#7 0x000000000070f876 in ha_myisam::repair (this=0x202ac70,
session=
at ha_myisam.cc:895
#8 0x00000000007103e0 in ha_myisam::repair (this=0x202ac70,
session=
#9 0x0000000000548a3f in handler::ha_repair (this=0x202ac70,
session=
#10 0x0000000000522159 in mysql_admin_table (session=
tables=
operator_
open_
prepare_
operator_
at sql_table.cc:2593
#11 0x0000000000523076 in mysql_repair_table (session=
tables=
#12 0x00000000004dde67 in mysql_execute_
at sql_parse.cc:1511
#13 0x00000000004e02e0 in mysql_parse (session=
inBuf=0x1accdd0 "REPAIR TABLE t1", length=15, found_semicolon
at sql_parse.cc:2573
#14 0x00000000004e09a8 in dispatch_command (command=COM_QUERY,
session=
at sql_parse.cc:593
#15 0x00000000004e15dc in do_command (session=
at sql_parse.cc:414
#16 0x000000000048afdd in libevent_
#17 0x00007ff0bf4313ea in start_thread () from /lib/libpthread
#18 0x00007ff0be7efc6d in clone () from /lib/libc.so.6
#19 0x0000000000000000 in ?? ()
Changed in drizzle: | |
status: | Fix Committed → Fix Released |
fixed as part of work to get repair test going.