summaryrefslogtreecommitdiff
path: root/base/stats/mysql.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/stats/mysql.cc')
-rw-r--r--base/stats/mysql.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/base/stats/mysql.cc b/base/stats/mysql.cc
index 42f68811b..4c2a60127 100644
--- a/base/stats/mysql.cc
+++ b/base/stats/mysql.cc
@@ -57,7 +57,8 @@ MySqlConnected()
void
MySqlRun::connect(const string &host, const string &user, const string &passwd,
- const string &db, const string &name, const string &project)
+ const string &db, const string &name, const string &sample,
+ const string &project)
{
if (connected())
panic("can only get one database connection at this time!");
@@ -68,21 +69,22 @@ MySqlRun::connect(const string &host, const string &user, const string &passwd,
remove(name);
cleanup();
- setup(name, user, project);
+ setup(name, sample, user, project);
}
void
-MySqlRun::setup(const string &name, const string &user, const string &project)
+MySqlRun::setup(const string &name, const string &sample, const string &user,
+ const string &project)
{
assert(mysql.connected());
stringstream insert;
ccprintf(insert,
"INSERT INTO "
- "runs(rn_name, rn_user, rn_project, rn_date, rn_expire)"
- "values(\"%s\", \"%s\", \"%s\", NOW(),"
+ "runs(rn_name,rn_sample,rn_user,rn_project,rn_date,rn_expire)"
+ "values(\"%s\", \"%s\", \"%s\", \"%s\", NOW(),"
"DATE_ADD(CURDATE(), INTERVAL 31 DAY))",
- name, user, project);
+ name, sample, user, project);
mysql.query(insert);
if (mysql.error)