So, I have MySQL installed on my machine, and I need to change the ft_max_word_len, the maximum word length that MySQL will index. However, when I set it up via the tools provided, and query it, it still lists it as a max of 84 (I need 128+). When I try and use the command line, I get the following:

C:\>mysqld --ft_max_word_len=128
111210 23:55:46 [Warning] option 'ft_max_word_len': unsigned value 256 adjusted to 84
111210 23:55:46 [Warning] option 'ft_max_word_len': unsigned value 128 adjusted to 84

It should be noted, I tried to change it to 256 in the GUI tools, so that may be where that value is coming from. But why would I get both, and why can I not adjust this value?

Of note, I am on Windows 7, and MySQL 5.1.41 for 64bit.

Update: From @thinice's comment, this leads me to believe that this is a bug in MySQL (and from the sounds of it an mostly undocumented one, which I will need to change). So maybe my question is, would anyone have any inkling of how to change that value?

  • 2
    Doesn't change using my.cnf in CentOS on 5.5.18 either - there's little to no documentation on it and no bugs (from my search) - maybe report it as one? – thinice Dec 11 '11 at 8:34
  • This is indeed poorly documented. The issue is that max value varies on different OS/bit versions of MySQL. I am not so sure it is a bug in later version as much as poorly documented. Have you tested MySQL 5.5? – jeffatrackaid Jan 2 '12 at 16:40
  • I figured out the problem without needing to increase the ft_max_word_len, but I will test later versions at some point and see if that works. In the meantime, it has been filed as a MySQL bug at bugs.mysql.com/bug.php?id=63718 – LoveAndCoding Jan 2 '12 at 17:22
  • It's a common question, since on a lot of versions default max value cannot be increased. It only changes when you set a smaller value. :/ – grosshat May 23 '12 at 19:48
  • I get the same output on Windows 7 x64 and mysql 5.5.24 x64. – barancw Jul 29 '12 at 12:52

The value of 84 for HA_FT_MAXCHARLEN is defined as a third of HA_FT_MAXBYTELEN (which is 254). This is defined in include/ft_global.h and changing it will mean recompiling MySQL - it is not a run-time variable. The reason it's a third is because in many character sets one character is not equal to one byte.

If you were to change HA_FT_MAXBYTELEN and recompile the tests will fail, so you're moving into unsupported-land, though your specific application may work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.