diff options
author | Nathan Binkert <binkertn@umich.edu> | 2005-06-13 11:46:56 -0400 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2005-06-13 11:46:56 -0400 |
commit | 7a8ca6a6b01361adf47e004fc44168b7932cc761 (patch) | |
tree | c00046f17f4d84eae19c595b9ffe409b06f61c62 /base/mysql.hh | |
parent | ebb35e57cefbe83d0c99fa17dafdfe6945964bf6 (diff) | |
download | gem5-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.hh | 18 |
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() { |