Bug #15714 MySQL crashes - Full-text Search (Boolean Mode) - Data Encoded in UTF-8
Submitted: 13 Dec 2005 15:24 Modified: 13 Dec 2005 19:16
Reporter: AmirBehzad Eslami Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.1.7 OS:Windows (Windows XP Pro)
Assigned to: MySQL Verification Team CPU Architecture:Any

[13 Dec 2005 15:24] AmirBehzad Eslami
Description:
I'm programming a search engine to locate words within Persian articles. These articles are encoded in Unicode (UTF-8), the famous multi-byte character set.

I have a simple table, which consists of 2 columns: `article_id` and `article_text`. There's a full-text index on `article_text`.

Everything works perfect in a normal MATCH(article_title)...AGAINST('"EXACT PHRASE - multibyte"').

But MySQL crashes on Boolean Full-text search, using MATCH(article_title)...AGAINST('"EXACT PHRASE - multibyte"' IN BOOLEAN MODE).

And this error only occures when there is at least one matching row.

P.S.
I'm running MySQL 4.1.7-nt-log under Windows XP Pro.

How to repeat:
-- It is suffice to execute to following query:

CREATE TABLE `mytable` (
  `article_id` int(10) unsigned NOT NULL default '0',
  `article_title` text collate utf8_persian_ci NOT NULL,
  PRIMARY KEY  (`article_id`),
  FULLTEXT KEY `article_title` (`article_title`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;

INSERT INTO
`mytable` ( `article_id` , `article_title` ) 
VALUES
('1', 'بحری است بحر عشق، که هیچش کناره نیست'),
('2', 'هفت شهر عشق را عطار گشت'),
('3', 'علت عشق ز علتها جداست'),
('4', 'هر که هوایی نپخت، یا به فراقی نسوخت');

SELECT MATCH(article_title) AGAINST ('"عطار"' IN BOOLEAN MODE) FROM mytable
[13 Dec 2005 15:42] MySQL Verification Team
I was unable to repeat the crash with 4.1.16. Could you please try
with the latest release, your version is quite older.

Thanks in advance.
[13 Dec 2005 18:40] AmirBehzad Eslami
Dear Miguel,
Thank you for your advice.

You meant that it was a bug which is fixed after MySQL 4.1.7 ?

I tested the query at home under MySQL 5 and - Yes! it works perfect. Thanks Man!

But I'm not sure whether my client would install the latest release or not.
They are not using a dedicated server.

I would really appreciate if you take a brief moment of your time to answer my questions:

-- Is there any patch for such a bug?

-- What is the lowest MySQL version, which perfectly performs the Boolean Full-text search within multi-byte characters?

-- I just visited http://dev.mysql.com/downloads/mysql/4.1.html and noted there is only version 4.1.15 available to download. Where can I find MySQL 4.1.16 which you're using now? Where can I find older versions, such as MySQL 4.1.8?

Thank you in advance
[13 Dec 2005 19:06] MySQL Verification Team
When verifying bug we do on the current source and sometimes we are aware
when the bug was fixed, however in this case I can't say for you how was done
the fix, so I recommend you to download the today latest release and to test
on test environment, anyway for sure there are a lot of fixes from that older
version.

Thanks in advance.
[13 Dec 2005 19:16] AmirBehzad Eslami
I found it :-D
http://bugs.mysql.com/bug.php?id=8351