mirror of
https://github.com/apache/impala.git
synced 2026-01-05 03:01:02 -05:00
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 bug is caused by a misuse of cmdqueue. The cmdqueue member of cmd.Cmd is used to execute commands not directly from user input in an event loop. When a 'source' is run, execute_query_list() is called which also executes the commands in cmdqueue, causing them to be executed twice. The fix is for execute_query_list() to not run the commands in cmdqueue. For the non-interactive case, where the event loop won't be run, we call execute_query_list() with cmdqueue so that the commands get run. A test case is added to test_shell_interactive.py. Change-Id: I453af2d4694d47e184031cb07ecd2af259ba20f3 Reviewed-on: http://gerrit.cloudera.org:8080/8063 Reviewed-by: Alex Behm <alex.behm@cloudera.com> Tested-by: Impala Public Jenkins