From f72006c086854ca52da77c65b1307818df50cd3e Mon Sep 17 00:00:00 2001 From: Minh Vu Date: Thu, 30 Jul 2026 21:06:29 +0200 Subject: [PATCH] Process final query without trailing newline --- lib/benchmark-common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/benchmark-common.sh b/lib/benchmark-common.sh index cd451147b4..b7d8f18e66 100755 --- a/lib/benchmark-common.sh +++ b/lib/benchmark-common.sh @@ -348,7 +348,7 @@ bench_concurrent_qps() { # Read the same query file that bench_run_query consumed. local queries=() q - while IFS= read -r q; do + while IFS= read -r q || [ -n "$q" ]; do [ -z "$q" ] && continue queries+=("$q") done < "$BENCH_QUERIES_FILE" @@ -476,7 +476,7 @@ bench_main() { : > result.csv local query_num=1 - while IFS= read -r query; do + while IFS= read -r query || [ -n "$query" ]; do # Skip empty lines. [ -z "$query" ] && continue bench_run_query "$query" "$query_num"