1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-opt

into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51


mysql-test/r/show_check.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
This commit is contained in:
unknown
2007-08-01 18:40:02 -06:00
43 changed files with 1397 additions and 204 deletions

View File

@@ -728,6 +728,35 @@ typedef struct st_thd_trans
bool no_2pc;
/* storage engines that registered themselves for this transaction */
handlerton *ht[MAX_HA];
/*
The purpose of this flag is to keep track of non-transactional
tables that were modified in scope of:
- transaction, when the variable is a member of
THD::transaction.all
- top-level statement or sub-statement, when the variable is a
member of THD::transaction.stmt
This member has the following life cycle:
* stmt.modified_non_trans_table is used to keep track of
modified non-transactional tables of top-level statements. At
the end of the previous statement and at the beginning of the session,
it is reset to FALSE. If such functions
as mysql_insert, mysql_update, mysql_delete etc modify a
non-transactional table, they set this flag to TRUE. At the
end of the statement, the value of stmt.modified_non_trans_table
is merged with all.modified_non_trans_table and gets reset.
* all.modified_non_trans_table is reset at the end of transaction
* Since we do not have a dedicated context for execution of a
sub-statement, to keep track of non-transactional changes in a
sub-statement, we re-use stmt.modified_non_trans_table.
At entrance into a sub-statement, a copy of the value of
stmt.modified_non_trans_table (containing the changes of the
outer statement) is saved on stack. Then
stmt.modified_non_trans_table is reset to FALSE and the
substatement is executed. Then the new value is merged with the
saved value.
*/
bool modified_non_trans_table;
} THD_TRANS;
enum enum_tx_isolation { ISO_READ_UNCOMMITTED, ISO_READ_COMMITTED,