summaryrefslogtreecommitdiff
path: root/base/stats/mysql_run.hh
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2005-06-13 11:46:56 -0400
committerNathan Binkert <binkertn@umich.edu>2005-06-13 11:46:56 -0400
commit7a8ca6a6b01361adf47e004fc44168b7932cc761 (patch)
treec00046f17f4d84eae19c595b9ffe409b06f61c62 /base/stats/mysql_run.hh
parentebb35e57cefbe83d0c99fa17dafdfe6945964bf6 (diff)
downloadgem5-7a8ca6a6b01361adf47e004fc44168b7932cc761.tar.xz
use transactions for database access
base/mysql.hh: Add support for for transactions base/stats/mysql.cc: get rid of table locking and start using transactions base/stats/mysql_run.hh: setup()/remove()/cleanup() should be protected, not private --HG-- extra : convert_revision : ace710beb7fb689a6e25831d8032f389fc1347e7
Diffstat (limited to 'base/stats/mysql_run.hh')
-rw-r--r--base/stats/mysql_run.hh13
1 files changed, 7 insertions, 6 deletions
diff --git a/base/stats/mysql_run.hh b/base/stats/mysql_run.hh
index a58244d80..d8dcb7594 100644
--- a/base/stats/mysql_run.hh
+++ b/base/stats/mysql_run.hh
@@ -42,6 +42,13 @@ struct MySqlRun
MySQL::Connection mysql;
uint16_t run_id;
+ protected:
+ void setup(const std::string &name, const std::string &sample,
+ const std::string &user, const std::string &project);
+
+ void remove(const std::string &name);
+ void cleanup();
+
public:
bool connected() const { return mysql.connected(); }
void connect(const std::string &host, const std::string &user,
@@ -49,12 +56,6 @@ struct MySqlRun
const std::string &name, const std::string &sample,
const std::string &project);
- void setup(const std::string &name, const std::string &sample,
- const std::string &user, const std::string &project);
-
- void remove(const std::string &name);
- void cleanup();
-
MySQL::Connection &conn() { return mysql; }
uint16_t run() const { return run_id; }
};