diff options
author | Michael Widenius <monty@askmonty.org> | 2012-08-07 07:25:15 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2012-08-07 07:25:15 +0300 |
commit | b39e6e3d093b45f792959ef06fea1c175263ae1a (patch) | |
tree | b642aba6ff438e50d67a884f4cb5d9c6c3287644 /sql/sys_vars.h | |
parent | 0a70eb33d159036c5d3f6929df57c2f18bda8471 (diff) | |
download | mariadb-git-b39e6e3d093b45f792959ef06fea1c175263ae1a.tar.gz |
Added support of thd->tx_read_only
Moved timestamp handling from all handler::write() methods in the storage engines to handler::ha_write
sql/handler.cc:
Added PSI_CALL's
Diffstat (limited to 'sql/sys_vars.h')
-rw-r--r-- | sql/sys_vars.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sql/sys_vars.h b/sql/sys_vars.h index c680ce6ab51..b594ff35571 100644 --- a/sql/sys_vars.h +++ b/sql/sys_vars.h @@ -1840,6 +1840,30 @@ public: } }; + +/** + Class representing the tx_read_only system variable for setting + default transaction access mode. + + Note that there is a special syntax - SET TRANSACTION READ ONLY + (or READ WRITE) that sets the access mode for the next transaction + only. +*/ + +class Sys_var_tx_read_only: public Sys_var_mybool +{ +public: + Sys_var_tx_read_only(const char *name_arg, const char *comment, int flag_args, + ptrdiff_t off, size_t size, CMD_LINE getopt, + my_bool def_val, PolyLock *lock, + enum binlog_status_enum binlog_status_arg, + on_check_function on_check_func) + :Sys_var_mybool(name_arg, comment, flag_args, off, size, getopt, + def_val, lock, binlog_status_arg, on_check_func) + {} + virtual bool session_update(THD *thd, set_var *var); +}; + /* Class for replicate_events_marked_for_skip. We need a custom update function that ensures the slave is stopped when |