mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=5040
This commit is contained in:
parent
ded013cc4b
commit
205d90a11d
|
@ -22427,3 +22427,9 @@ David 8 Jan 2005
|
|||
sched/
|
||||
sched_config.C,h
|
||||
sched_locality.C
|
||||
|
||||
David 9 Jan 2005
|
||||
- fix memory leak in get_insert_id()
|
||||
|
||||
db/
|
||||
db_base.C
|
||||
|
|
10
db/db_base.C
10
db/db_base.C
|
@ -48,15 +48,11 @@ int DB_CONN::insert_id() {
|
|||
MYSQL_ROW row;
|
||||
MYSQL_RES* rp;
|
||||
|
||||
if (mysql) {
|
||||
retval = do_query("select HIGH_PRIORITY LAST_INSERT_ID()");
|
||||
} else {
|
||||
retval = do_query("select LAST_INSERT_ID()");
|
||||
}
|
||||
|
||||
if (retval) return retval;
|
||||
rp = mysql_store_result(mysql);
|
||||
row = mysql_fetch_row(rp);
|
||||
mysql_free_result(rp);
|
||||
return atoi(row[0]);
|
||||
}
|
||||
|
||||
|
@ -249,10 +245,10 @@ int DB_BASE::get_integer(char* query, int& n) {
|
|||
resp = mysql_store_result(db->mysql);
|
||||
if (!resp) return ERR_DB_NOT_FOUND;
|
||||
row = mysql_fetch_row(resp);
|
||||
mysql_free_result(resp);
|
||||
if (!row) return ERR_DB_NOT_FOUND;
|
||||
if (!row[0]) return ERR_DB_NOT_FOUND;
|
||||
n = atoi(row[0]);
|
||||
mysql_free_result(resp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -266,10 +262,10 @@ int DB_BASE::get_double(char* query, double& x) {
|
|||
resp = mysql_store_result(db->mysql);
|
||||
if (!resp) return ERR_DB_NOT_FOUND;
|
||||
row = mysql_fetch_row(resp);
|
||||
mysql_free_result(resp);
|
||||
if (!row) return ERR_DB_NOT_FOUND;
|
||||
if (!row[0]) return ERR_DB_NOT_FOUND;
|
||||
x = atof(row[0]);
|
||||
mysql_free_result(resp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -156,7 +156,6 @@ static int process_wu_template(
|
|||
) {
|
||||
char* p;
|
||||
char buf[LARGE_BLOB_SIZE], md5[33], path[256], url[256], top_download_path[256];
|
||||
//char out[LARGE_BLOB_SIZE];
|
||||
std::string out;
|
||||
int retval, file_number;
|
||||
double nbytes;
|
||||
|
|
Loading…
Reference in New Issue