1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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
This commit is contained in:
Michael Widenius
2012-08-07 07:25:15 +03:00
parent 0a70eb33d1
commit b39e6e3d09
30 changed files with 559 additions and 168 deletions

View File

@ -326,8 +326,24 @@
#define HA_CACHE_TBL_ASKTRANSACT 2
#define HA_CACHE_TBL_TRANSACT 4
/* Options of START TRANSACTION statement (and later of SET TRANSACTION stmt) */
#define MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT 1
/**
Options for the START TRANSACTION statement.
Note that READ ONLY and READ WRITE are logically mutually exclusive.
This is enforced by the parser and depended upon by trans_begin().
We need two flags instead of one in order to differentiate between
situation when no READ WRITE/ONLY clause were given and thus transaction
is implicitly READ WRITE and the case when READ WRITE clause was used
explicitly.
*/
// WITH CONSISTENT SNAPSHOT option
static const uint MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT = 1;
// READ ONLY option
static const uint MYSQL_START_TRANS_OPT_READ_ONLY = 2;
// READ WRITE option
static const uint MYSQL_START_TRANS_OPT_READ_WRITE = 4;
/* Flags for method is_fatal_error */
#define HA_CHECK_DUP_KEY 1
@ -1840,6 +1856,9 @@ public:
*/
PSI_table *m_psi;
virtual void unbind_psi();
virtual void rebind_psi();
handler(handlerton *ht_arg, TABLE_SHARE *share_arg)
:table_share(share_arg), table(0),
estimation_rows_to_insert(0), ht(ht_arg),