summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-09-12 09:16:09 +0200
committerErich Eckner <git@eckner.net>2018-09-12 09:16:09 +0200
commitc67ca190d30757758928cd9c06a1a7a710a6d694 (patch)
tree0925d3361c306ea40bb0312a8aa16fcb4d15726f
parent80142b16c6bcaad0fcd7c7edb9678c2670c93836 (diff)
downloadbuilder-c67ca190d30757758928cd9c06a1a7a710a6d694.tar.xz
lib/mysql-functions: mysql_run_query(): wait 10..20 seconds between successive trials of mysql queries
-rwxr-xr-xlib/mysql-functions3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 15ed375..13a751e 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -48,6 +48,9 @@ mysql_run_query() {
query_stderr="${query_stdin%.stdin}.stderr"
cat > "${query_stdin}"
for _ in {1..10}; do
+ if [ -f "${query_stdout}" ]; then
+ wait_some_time 10 10
+ fi
${mysql_command} -N --raw --batch "$@" \
< "${query_stdin}" \
> "${query_stdout}" \