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:
committed by
Johan Wikman
parent
552c33e14d
commit
436c563da7
@ -584,7 +584,7 @@ static int32_t routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWB
|
|||||||
|
|
||||||
lua_pushlstring(my_instance->global_lua_state, fullquery, strlen(fullquery));
|
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'.",
|
MXS_ERROR("Global scope call to 'routeQuery' failed: '%s'.",
|
||||||
lua_tostring(my_instance->global_lua_state, -1));
|
lua_tostring(my_instance->global_lua_state, -1));
|
||||||
|
|||||||
Reference in New Issue
Block a user