1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

------------------------------------------------------------

revno: 2617.22.4
committer: Davi Arnaut <Davi.Arnaut@Sun.COM>
branch nick: mysql-6.0-runtime
timestamp: Mon 2009-01-26 15:19:14 -0200
message:
Move checks for OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN to a separate
helper function.


sql/ha_ndbcluster.cc:
  Use helper method to check transaction mode.
sql/log.cc:
  Use helper method to check transaction mode.
sql/sql_cache.cc:
  Use helper method to check transaction mode.
sql/sql_class.cc:
  Use helper method to check transaction mode.
sql/sql_class.h:
  Add helper method to check whether session is in a multi-statement
  transaction.
sql/sql_parse.cc:
  Use helper method to check transaction mode.
sql/transaction.cc:
  Use helper method to check transaction mode.
This commit is contained in:
Konstantin Osipov
2009-12-04 01:46:14 +03:00
parent cd155be564
commit 411a81954e
7 changed files with 38 additions and 34 deletions

View File

@ -2008,6 +2008,21 @@ public:
{
return server_status & SERVER_STATUS_IN_TRANS;
}
/**
Returns TRUE if session is in a multi-statement transaction mode.
OPTION_NOT_AUTOCOMMIT: When autocommit is off, a multi-statement
transaction is implicitly started on the first statement after a
previous transaction has been ended.
OPTION_BEGIN: Regardless of the autocommit status, a multi-statement
transaction can be explicitly started with the statements "START
TRANSACTION", "BEGIN [WORK]", "[COMMIT | ROLLBACK] AND CHAIN", etc.
*/
inline bool in_multi_stmt_transaction()
{
return options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN);
}
inline bool fill_derived_tables()
{
return !stmt_arena->is_stmt_prepare() && !lex->only_view_structure();