Commit 459d6da8 authored by Natanael Copa's avatar Natanael Copa Committed by Sergey Vojtovich

MDEV-18269 - fix off-by-one bug in unittest

Fix the off-by-one overflow which was introduced with commit
b0fd06a6 (MDEV-15670 - unit.my_atomic failed in buildbot with
Signal 11 thrown)

Closes #1098.
parent 1ecccb50
......@@ -34,7 +34,7 @@ void test_concurrently(const char *test, pthread_handler handler, int n, int m)
bad= 0;
diag("Testing %s with %d threads, %d iterations... ", test, n, m);
for (i= n; i; i--)
for (i= 0; i < n; i++)
{
if (pthread_create(&threads[i], 0, handler, &m) != 0)
{
......@@ -43,7 +43,7 @@ void test_concurrently(const char *test, pthread_handler handler, int n, int m)
}
}
for (i= n; i; i--)
for (i= 0; i < n; i++)
pthread_join(threads[i], 0);
now= my_interval_timer() - now;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment