MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
transaction.h
1 /* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
2 
3  This program is free software; you can redistribute it and/or modify
4  it under the terms of the GNU General Public License as published by
5  the Free Software Foundation; version 2 of the License.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  GNU General Public License for more details.
11 
12  You should have received a copy of the GNU General Public License
13  along with this program; if not, write to the Free Software Foundation,
14  51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
15 
16 #ifndef TRANSACTION_H
17 #define TRANSACTION_H
18 
19 #include <my_global.h>
20 #include <m_string.h>
21 
22 class THD;
23 
24 bool trans_check_state(THD *thd);
25 
26 bool trans_begin(THD *thd, uint flags= 0);
27 bool trans_commit(THD *thd);
28 bool trans_commit_implicit(THD *thd);
29 bool trans_rollback(THD *thd);
30 bool trans_rollback_implicit(THD *thd);
31 
32 bool trans_commit_stmt(THD *thd);
33 bool trans_rollback_stmt(THD *thd);
34 
35 bool trans_savepoint(THD *thd, LEX_STRING name);
36 bool trans_rollback_to_savepoint(THD *thd, LEX_STRING name);
37 bool trans_release_savepoint(THD *thd, LEX_STRING name);
38 
39 bool trans_xa_start(THD *thd);
40 bool trans_xa_end(THD *thd);
41 bool trans_xa_prepare(THD *thd);
42 bool trans_xa_commit(THD *thd);
43 bool trans_xa_rollback(THD *thd);
44 
45 #endif /* TRANSACTION_H */