Creating a plugin to override QUERY_RESULT_MAX_LIMIT

Close…

I would stop using the constant and instead use GlobalSetting.query_result_max_limit everywhere, you are already configuring a default, why configure it twice.