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, version 2.0, 5 as published by the Free Software Foundation. 6 7 This program is also distributed with certain software (including 8 but not limited to OpenSSL) that is licensed under separate terms, 9 as designated in a particular file or component or in included license 10 documentation. The authors of MySQL hereby grant you an additional 11 permission to link the program and your derivative works with the 12 separately licensed software that they have included with MySQL. 13 14 This program is distributed in the hope that it will be useful, 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 GNU General Public License, version 2.0, for more details. 18 19 You should have received a copy of the GNU General Public License 20 along with this program; if not, write to the Free Software Foundation, 21 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ 22 23 #ifndef TRANSACTION_H 24 #define TRANSACTION_H 25 26 #include <my_global.h> 27 #include <m_string.h> 28 29 class THD; 30 31 bool trans_check_state(THD *thd); 32 33 bool trans_begin(THD *thd, uint flags= 0); 34 bool trans_commit(THD *thd); 35 bool trans_commit_implicit(THD *thd); 36 bool trans_rollback(THD *thd); 37 bool trans_rollback_implicit(THD *thd); 38 39 bool trans_commit_stmt(THD *thd); 40 bool trans_rollback_stmt(THD *thd); 41 42 bool trans_savepoint(THD *thd, LEX_STRING name); 43 bool trans_rollback_to_savepoint(THD *thd, LEX_STRING name); 44 bool trans_release_savepoint(THD *thd, LEX_STRING name); 45 46 bool trans_xa_start(THD *thd); 47 bool trans_xa_end(THD *thd); 48 bool trans_xa_prepare(THD *thd); 49 bool trans_xa_commit(THD *thd); 50 bool trans_xa_rollback(THD *thd); 51 52 #endif /* TRANSACTION_H */ 53