summaryrefslogtreecommitdiff
path: root/base/mysql.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/mysql.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/mysql.hh')
-rw-r--r--base/mysql.hh18
1 files changed, 18 insertions, 0 deletions
diff --git a/base/mysql.hh b/base/mysql.hh
index b2e87dcbd..e16558dd3 100644
--- a/base/mysql.hh
+++ b/base/mysql.hh
@@ -185,6 +185,24 @@ class Connection
return query(sql.str());
}
+ bool
+ autocommit(bool mode)
+ {
+ return mysql_autocommit(&mysql, mode);
+ }
+
+ bool
+ commit()
+ {
+ return mysql_commit(&mysql);
+ }
+
+ bool
+ rollback()
+ {
+ return mysql_rollback(&mysql);
+ }
+
unsigned
field_count()
{