[Tarantool-patches] [PATCH 1/1] console: fix usage of an undeclared variable

Alexander Turenko alexander.turenko at tarantool.org
Fri Oct 18 00:06:27 MSK 2019


LGTM.

Pushed to master, 2.2, 2.1 and 1.10.

WBR, Alexander Turenko.

On Thu, Oct 17, 2019 at 09:50:44PM +0200, Vladislav Shpilevoy wrote:
> Console client's eval() method in case of an error at
> reading from a socket was trying to return a variable
> declared in a different view scope. Instead, the
> error should be raised to drop the connection.
> ---
> Branch: https://github.com/tarantool/tarantool/tree/gerold103/console-undefined-variable
> 
> No test, because can be reproduced only in repl mode of a client.
> 
>  src/box/lua/console.lua | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/box/lua/console.lua b/src/box/lua/console.lua
> index f70ed830a..52df67465 100644
> --- a/src/box/lua/console.lua
> +++ b/src/box/lua/console.lua
> @@ -451,7 +451,7 @@ local text_connection_mt = {
>                      self.print_f(rc)
>                  end
>              end
> -            return rc
> +            return error(self:set_error())
>          end,
>          --
>          -- Make the connection be in error state, set error
> -- 
> 2.21.0 (Apple Git-122)
> 


More information about the Tarantool-patches mailing list