'Setting ft_stopword_file back to default (built-in) without restarting MySQL
I need to test something by changing the ft_stopword_file
without restarting the server. I know that SET GLOBAL
works to change global variables until the next restart. After testing, I want to return it to its default value just in case it breaks something.
The problem is: if I understood correctly, ft_stopword_file
only resets back to its default value (its built-in word set) when being completely unset (in other words: no ft_stop_word_file
in my.cnf
).
Is there a way to set it (be it with SET GLOBAL
or any other command) to use the built-in word set again without needing to restart the server?
Solution 1:[1]
Is there a way to set it (be it with SET GLOBAL or any other command) to use the built-in word set again without needing to restart the server?
Yes and no.
No, there isn't.
But you can set it to a custom list of your choice, which can therefore be identical to the built-in word set (you find this in the fine sources). You need to do this only if the variable value happens to be "(built-in)".
Even if you set it from the main list to the identical list, you will have to run a REPAIR TABLE yourtable QUICK
to have it digested.
Solution 2:[2]
What is the ultimate goal? Would either of these suffice?
Plan A:
MyISAM? It will be going away soon. Perhaps you should set up the table in InnoDB. All the settings for InnoDB are separate from those of MyISAM. There are many subtle differences between the two implementations of Fulltext; the stopword file is just one of them.
Plan B:
Spin up a separate server (or instance on the same server). Set whatever you need it it. Move data from one instance to the other using mysqldump (or similar) with appropriate arguments. If appropriate, make the new instance smaller and use a "where" argument on mysqldump to limit the amount of data copied over.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | LSerni |
Solution 2 | Rick James |