Fix issue in dbutils where do_cleanup runs twice in a row
Dbutils for mysql currently experiences a small issues where it will attempt to run the do_cleanup function twice in a row. This would occur when running individual commands in non-interactive mode and using the persistent flag -p for the on-demand pod. Since dbutils requires a namespace to be entered for these commands the code was failing to match and thus running an additional do_cleanup when it was not needed. This was also updated for postgresql so the script matches mysql. Change-Id: I74c3bd948e7bf63caaa3249a486be818698e62b1
This commit is contained in:
parent
f3fb2d5680
commit
18516ee2be
@ -1082,7 +1082,7 @@ function main() {
|
||||
# Arguments are passed, execute the requested command then exit
|
||||
else
|
||||
execute_selection "${ARGS[@]}"
|
||||
if [[ "${ARGS[@]}" != "c" && "${ARGS[@]}" != "cleanup" && "${ARGS[@]}" != "quit" && "${ARGS[@]}" != "q" ]]; then
|
||||
if [[ "${ARGS[0]}" != "c" && "${ARGS[0]}" != "cleanup" && "${ARGS[0]}" != "quit" && "${ARGS[0]}" != "q" ]]; then
|
||||
do_cleanup
|
||||
fi
|
||||
echo "Task Complete"
|
||||
|
@ -982,7 +982,7 @@ function main() {
|
||||
# Arguments are passed, execute the requested command then exit
|
||||
else
|
||||
execute_selection "${ARGS[@]}"
|
||||
if [[ "${ARGS[@]}" != "c" && "${ARGS[@]}" != "cleanup" && "${ARGS[@]}" != "quit" && "${ARGS[@]}" != "q" ]]; then
|
||||
if [[ "${ARGS[0]}" != "c" && "${ARGS[0]}" != "cleanup" && "${ARGS[0]}" != "quit" && "${ARGS[0]}" != "q" ]]; then
|
||||
do_cleanup
|
||||
fi
|
||||
echo "Task Complete"
|
||||
|
Loading…
x
Reference in New Issue
Block a user