Always wait for all background INSERTs to finish to catch stuck queries

This commit is contained in:
Nicolae Vartolomei 2020-02-06 11:38:04 +00:00
parent 0939a9460f
commit 949b498d37

View File

@ -24,7 +24,8 @@ EOF
# Also, helps detect data races.
function insert_thread() {
trap 'exit' INT
# Always wait for all background INSERTs to finish to catch stuck queries.
trap 'wait; exit;' INT
INSERT[0]="INSERT INTO TABLE src_a VALUES (1);"
INSERT[1]="INSERT INTO TABLE src_b VALUES (2);"