diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-07-01 15:24:50 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-07-01 15:24:50 +0300 |
commit | 62a20f8047f074fb65b20dc0c53f5a9c7b1edd4f (patch) | |
tree | a5aaf21ef6879a8f58815600cf13f55cc369dcde /client/mysqlslap.c | |
parent | ba3354fca61fa0ee6c3dc614e7ef1be79a4038ef (diff) | |
parent | b546913ba2f17be8cc2c0d009c09082663edd703 (diff) | |
download | mariadb-git-62a20f8047f074fb65b20dc0c53f5a9c7b1edd4f.tar.gz |
Merge 10.5 into 10.6
Diffstat (limited to 'client/mysqlslap.c')
-rw-r--r-- | client/mysqlslap.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/client/mysqlslap.c b/client/mysqlslap.c index 58131077321..720616c5d5a 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -1,6 +1,6 @@ /* Copyright (c) 2005, 2015, Oracle and/or its affiliates. - Copyright (c) 2010, 2017, MariaDB + Copyright (c) 2010, 2022, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1897,12 +1897,11 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit) pthread_handler_t run_task(void *p) { - ulonglong counter= 0, queries; + ulonglong queries; ulonglong detach_counter; unsigned int commit_counter; MYSQL *mysql; MYSQL_RES *result; - MYSQL_ROW row; statement *ptr; thread_context *con= (thread_context *)p; @@ -2023,8 +2022,7 @@ limit_not_met: my_progname, mysql_errno(mysql), mysql_error(mysql)); else { - while ((row= mysql_fetch_row(result))) - counter++; + while (mysql_fetch_row(result)) {} mysql_free_result(result); } } @@ -2034,7 +2032,7 @@ limit_not_met: if (commit_rate && (++commit_counter == commit_rate)) { commit_counter= 0; - run_query(mysql, "COMMIT", strlen("COMMIT")); + run_query(mysql, C_STRING_WITH_LEN("COMMIT")); } if (con->limit && queries == con->limit) @@ -2046,7 +2044,7 @@ limit_not_met: end: if (commit_rate) - run_query(mysql, "COMMIT", strlen("COMMIT")); + run_query(mysql, C_STRING_WITH_LEN("COMMIT")); mysql_close(mysql); |