Description:
Test case from "How to repeat" crashes server.
Stack trace from 5.1:
/users/ssmirnova/src/mysql-5.1/sql/mysqld[0x8422252]
/users/ssmirnova/src/mysql-5.1/sql/mysqld(print_stacktrace+0xb)[0x842228e]
/users/ssmirnova/src/mysql-5.1/sql/mysqld(handle_segfault+0x2bf)[0x82839b3]
[0x2ce420]
/users/ssmirnova/src/mysql-5.1/sql/mysqld(_ZN4JOIN7prepareEPPP4ItemP10TABLE_LISTjS1_jP8st_orderS7_S1_S7_P13st_select_lexP18st_select_lex_unit+0x4d5)[0x831468f]
/users/ssmirnova/src/mysql-5.1/sql/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x2a6)[0x831d19e]
/users/ssmirnova/src/mysql-5.1/sql/mysqld(_Z13handle_selectP3THDP6st_lexP13select_resultm+0x201)[0x831d59b]
/users/ssmirnova/src/mysql-5.1/sql/mysqld[0x829288b]
/users/ssmirnova/src/mysql-5.1/sql/mysqld(_Z21mysql_execute_commandP3THD+0x60c)[0x8298738]
/users/ssmirnova/src/mysql-5.1/sql/mysqld(_Z11mysql_parseP3THDPKcjPS2_+0x206)[0x82a18a4]
/users/ssmirnova/src/mysql-5.1/sql/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xa50)[0x82a2484]
/users/ssmirnova/src/mysql-5.1/sql/mysqld(_Z10do_commandP3THD+0x248)[0x82a362e]
/users/ssmirnova/src/mysql-5.1/sql/mysqld(handle_one_connection+0x115)[0x8290b69]
How to repeat:
DROP TABLE IF EXISTS `kw_names`;
CREATE TABLE `kw_names` (
`id` mediumint(9) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
UNIQUE KEY `name_unique` (`name`),
FULLTEXT KEY `ft_name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=2016 DEFAULT CHARSET=utf8;
SELECT GROUP_CONCAT(DISTINCT kn.name SEPARATOR " ") AS st
FROM kw_names AS kn
WHERE MATCH (kn.name) AGAINST ("festival" IN BOOLEAN MODE)
GROUP BY kn.id
HAVING MATCH(st) AGAINST('festival' IN BOOLEAN MODE);