mirror of
https://github.com/MariaDB/server.git
synced 2025-03-15 11:38:42 +01:00
MDBF-534: Coverity scan: fix client folder
--------------------------------- File: `mysqlslap` --------------------------------- - Coverity (CHECKED_RETURN): https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728428&defectInstanceId=53073524&mergedDefectId=1520114 - FALSE POSITIVES - Coverity (DC.WEAK_CRYPTO) (`random()`): https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728428&defectInstanceId=53073112&mergedDefectId=1225806 https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728428&defectInstanceId=53074491&mergedDefectId=1409160 https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728428&defectInstanceId=53074151&mergedDefectId=1409180 https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728428&defectInstanceId=53073799&mergedDefectId=1409183 - Coverity (TAINTED_SCALAR): https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728428&defectInstanceId=53074667&mergedDefectId=1519586 - Coverity (UNINT): - Coverity (BAD_FREE): https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728428&defectInstanceId=53074415&mergedDefectId=1520371
This commit is contained in:
parent
023bb2fc20
commit
24911a34b3
1 changed files with 6 additions and 2 deletions
|
@ -1768,6 +1768,7 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
|
|||
uint x;
|
||||
struct timeval start_time, end_time;
|
||||
thread_context con;
|
||||
int error;
|
||||
pthread_t mainthread; /* Thread descriptor */
|
||||
pthread_attr_t attr; /* Thread attributes */
|
||||
DBUG_ENTER("run_scheduler");
|
||||
|
@ -1776,8 +1777,11 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
|
|||
con.limit= limit;
|
||||
|
||||
pthread_attr_init(&attr);
|
||||
pthread_attr_setdetachstate(&attr,
|
||||
PTHREAD_CREATE_DETACHED);
|
||||
if ((error= pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)))
|
||||
{
|
||||
printf("Got error: %d from pthread_attr_setdetachstate\n", error);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&counter_mutex);
|
||||
thread_counter= 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue