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:
@ -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));
|
||||
|
Reference in New Issue
Block a user