Tianyi Wang has uploaded a new patch set (#2).

Change subject: IMPALA-5416: Fix an impala-shell command recursion bug
......................................................................

IMPALA-5416: Fix an impala-shell command recursion bug

Impala-shell crashes with 2 source commands on the same line and runs
a command multiple times if it shares the same line with a source
command.
The cause is that there is a "cmdqueue" member in cmd library, which is
used to execute commands not directly from user input. When impala-shell
reads a line with multiple commands, it splits the line into multiple
queries and insert them into the queue, and then gives control back to
the eventloop in cmd library. The problem is that a source command
calls execute_query_list(), which executes queries in the cmdqueue as
well. So any query in the cmdqueue will be executed twice. And if there
is unfortunately a source command in the cmdqueue, it will call
execute_query_list() again, and there will be an infinite recursion.
The original purpose of running queued queries in execute_query_list()
is that in non-interactive mode, there is no event loop. And still,
there are queries like "use database" queued by connection setup
procedures, which need to be run before the user query.
This patch avoids running queries from the queue in
execute_query_list(), and for non-interactive mode, runs queued queries
in execute_queries_non_interactive_mode() instead.

Change-Id: I453af2d4694d47e184031cb07ecd2af259ba20f3
---
M shell/impala_shell.py
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/63/8063/2
-- 
To view, visit http://gerrit.cloudera.org:8080/8063
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I453af2d4694d47e184031cb07ecd2af259ba20f3
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tmarsh...@cloudera.com>

Reply via email to