mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-21166 Add Mroonga initialized check to Mroonga UDFs
Mroonga UDFs can't be used without loading Mroonga.
This commit is contained in:
committed by
Daniel Black
parent
49dff5a4b6
commit
383d53edbc
@@ -17,6 +17,7 @@
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
|
||||
*/
|
||||
|
||||
#include <mrn.hpp>
|
||||
#include <mrn_mysql.h>
|
||||
#include <mrn_mysql_compat.h>
|
||||
#include <mrn_path_mapper.hpp>
|
||||
@@ -74,6 +75,15 @@ MRN_API my_bool mroonga_query_expand_init(UDF_INIT *init,
|
||||
MRN_DBUG_ENTER_FUNCTION();
|
||||
|
||||
init->ptr = NULL;
|
||||
|
||||
if (!mrn_initialized)
|
||||
{
|
||||
snprintf(message,
|
||||
MYSQL_ERRMSG_SIZE,
|
||||
"mroonga_query_expand(): Mroonga isn't initialized");
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (args->arg_count != 4) {
|
||||
sprintf(message,
|
||||
"mroonga_query_expand(): wrong number of arguments: %u for 4",
|
||||
|
Reference in New Issue
Block a user