diff options
author | unknown <tsmith@ramayana.hindu.god> | 2007-08-01 18:40:02 -0600 |
---|---|---|
committer | unknown <tsmith@ramayana.hindu.god> | 2007-08-01 18:40:02 -0600 |
commit | 15835a5693da749cc9635d127ff708286831872e (patch) | |
tree | 7db31fdc56ff34260977557c78abc33869800671 /sql/handler.h | |
parent | 7756406fa95cf4b8ddc1a473e1a273bed4474323 (diff) | |
parent | 31e33aba7b48150abfb361d3fe754ba739e7457d (diff) | |
download | mariadb-git-15835a5693da749cc9635d127ff708286831872e.tar.gz |
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
Diffstat (limited to 'sql/handler.h')
-rw-r--r-- | sql/handler.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sql/handler.h b/sql/handler.h index 7cf7bfe043d..ddea6c3a34c 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -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, |