# MySQL Fulltext Query problem on MySQL 5.1

**URL:** <https://forums.percona.com/t/mysql-fulltext-query-problem-on-mysql-5-1/2082>\
**Category:** Sphinx & Full-Text Search\
**Created:** [December 29, 2009, 10:41am UTC](https://forums.percona.com/t/mysql-fulltext-query-problem-on-mysql-5-1/2082 "2009-12-29T10:41:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hi\_irf](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@hi\_irf](https://forums.percona.com/u/hi_irf)\
**Post date:** [December 29, 2009, 10:41am UTC](https://forums.percona.com/t/mysql-fulltext-query-problem-on-mysql-5-1/2082/1 "2009-12-29T10:41:54Z")

</div>

Hi,

I upraded my database server from 4.1 to 5.1.32. But somehow following query doesn’t shows any results in 5.1 it just running look likes query hung.

mysql 5.1.32\> SELECT colname FROM table1  
WHERE (related=1 or related=2) AND match(colname) against (‘+dimension w_h_d’ in boolean mode)  
AND (LENGTH(TRIM(colname)) - LENGTH(REPLACE(TRIM(colname), ’ ', ‘’)))\<4  
GROUP BY colname ORDER BY date DESC LIMIT 0,50;

"_" between w h d ('+dimension w_h\*d’ in boolean mode) causing the problem. when i remove those \* query runs without any problem. I tried same query on MySQL 4.1 it runs without any problem. Might be i need to edit characterset file but not sure.

mysql\> show variables like ‘%ft%’;

±-------------------------±---------------+  
| Variable\_name | Value |  
±-------------------------±---------------+  
| ft\_boolean\_syntax | + -\>\<()~\*:“”&| |  
| ft\_max\_word\_len | 84 |  
| ft\_min\_word\_len | 3 |  
| ft\_query\_expansion\_limit | 20 |  
| ft\_stopword\_file | (built-in) |  
±-------------------------±---------------+

full text related parameters are same on both i.e. MySQL 4.1 & MySQL 5.1.

Thank you.  
Aspen

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [December 29, 2009, 3:12pm UTC](https://forums.percona.com/t/mysql-fulltext-query-problem-on-mysql-5-1/2082/2 "2009-12-29T15:12:19Z")

</div>

Check EXPLAIN on both servers and see if there is a difference. When you say it looks like it’s hung, what does that mean? Is it really? Check SHOW FULL PROCESSLIST, and check a few samples of SHOW GLOBAL STATUS LIKE ‘Handler%’ and see if it’s doing anything, or if it’s truly hung.

---

<div class="post-metadata">

**Author:** ![hi\_irf](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@hi\_irf](https://forums.percona.com/u/hi_irf)\
**Post date:** [December 29, 2009, 10:51pm UTC](https://forums.percona.com/t/mysql-fulltext-query-problem-on-mysql-5-1/2082/3 "2009-12-29T22:51:57Z")

</div>

Hello,

Hung means query shows in SHOW FULL PROCESSLIST from a long time on MySQL 5.1. Further i executed this query manually on MySQL 5.1 it doesn’t execute didn’t give me results. It’s running only and i didn’t get MySQL prompt back.

Thank you.
