MXS-1729: Allow global routeQuery to return values

The `lua_pcall` parameters were incorrect, the second number signifies the
number of parameters the function can return.
This commit is contained in:
Markus Mäkelä
2018-03-21 00:19:48 +02:00
parent f5562d2cab
commit 7359774ae1

View File

@ -576,7 +576,7 @@ static int32_t routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWB
lua_pushlstring(my_instance->global_lua_state, fullquery, strlen(fullquery));
if (lua_pcall(my_instance->global_lua_state, 1, 0, 0))
if (lua_pcall(my_instance->global_lua_state, 1, 1, 0))
{
MXS_ERROR("Global scope call to 'routeQuery' failed: '%s'.",
lua_tostring(my_instance->global_lua_state, -1));