From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id A085543D678 for ; Thu, 17 Oct 2019 00:36:19 +0300 (MSK) Received: by mail-lf1-f68.google.com with SMTP id y127so160408lfc.0 for ; Wed, 16 Oct 2019 14:36:19 -0700 (PDT) From: Cyrill Gorcunov Date: Thu, 17 Oct 2019 00:35:31 +0300 Message-Id: <20191016213531.1825-3-gorcunov@gmail.com> In-Reply-To: <20191016213531.1825-1-gorcunov@gmail.com> References: <20191016213531.1825-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 2/2] box/console: Test for exact command before setting eos List-Id: Tarantool development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml When we handle unix console connection we should setup eos if only we meet "\set output" command in a stream. For example there could be "\set language" which should not affect eos settings. Closes #4568 Signed-off-by: Cyrill Gorcunov --- src/box/lua/console.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/box/lua/console.lua b/src/box/lua/console.lua index e1941f85d..f70ed830a 100644 --- a/src/box/lua/console.lua +++ b/src/box/lua/console.lua @@ -416,9 +416,14 @@ local text_connection_mt = { end local nr_items, items = parse_operators(command) if nr_items == 3 then - local err, fmt, opts = parse_output(items[3]) - if not err then - self.eos = output_eos[fmt] + -- + -- Make sure it is exactly "\set output" command. + if operators[items[1]] == set_param and + param_handlers[items[2]] == set_output then + local err, fmt, opts = parse_output(items[3]) + if not err then + self.eos = output_eos[fmt] + end end end end, -- 2.20.1