summaryrefslogtreecommitdiff
path: root/unittest/mysys
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-02-02 13:00:15 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-02-02 13:00:15 +0200
commit213ece2f2e8c23ee0e727cc02dcecfae6f510ca2 (patch)
tree5ce93ecb5caa9a58ebc08f8cd3e94c59d7219377 /unittest/mysys
parentc1e1764fc4b913ee688b383aac2698b83661d64c (diff)
parentd9d83f1d92b696ef56f4944df036b8a78364ebb4 (diff)
downloadmariadb-git-213ece2f2e8c23ee0e727cc02dcecfae6f510ca2.tar.gz
Merge 10.1 into 10.1
This is joint work with Oleksandr Byelkin.
Diffstat (limited to 'unittest/mysys')
-rw-r--r--unittest/mysys/thr_template.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/unittest/mysys/thr_template.c b/unittest/mysys/thr_template.c
index de68aca6d36..38b8d2903a5 100644
--- a/unittest/mysys/thr_template.c
+++ b/unittest/mysys/thr_template.c
@@ -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;