summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2016-08-12 11:17:45 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2016-09-02 13:22:28 +0300
commit2e814d4702d71a04388386a9f591d14a35980bfe (patch)
treef3f9b48d116a3738c5e71f3a360ca61f16cfb632 /sql/handler.h
parent848d211c5c4df00b819cd84d7530cf7d29bb0524 (diff)
downloadmariadb-git-2e814d4702d71a04388386a9f591d14a35980bfe.tar.gz
Merge InnoDB 5.7 from mysql-5.7.9.
Contains also MDEV-10547: Test multi_update_innodb fails with InnoDB 5.7 The failure happened because 5.7 has changed the signature of the bool handler::primary_key_is_clustered() const virtual function ("const" was added). InnoDB was using the old signature which caused the function not to be used. MDEV-10550: Parallel replication lock waits/deadlock handling does not work with InnoDB 5.7 Fixed mutexing problem on lock_trx_handle_wait. Note that rpl_parallel and rpl_optimistic_parallel tests still fail. MDEV-10156 : Group commit tests fail on 10.2 InnoDB (branch bb-10.2-jan) Reason: incorrect merge MDEV-10550: Parallel replication can't sync with master in InnoDB 5.7 (branch bb-10.2-jan) Reason: incorrect merge
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h38
1 files changed, 35 insertions, 3 deletions
diff --git a/sql/handler.h b/sql/handler.h
index cae95ea4ae6..75f8df98add 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -573,7 +573,32 @@ struct xid_t {
long bqual_length;
char data[XIDDATASIZE]; // not \0-terminated !
- xid_t() {} /* Remove gcc warning */
+ xid_t() {} /* Remove gcc warning */
+ long get_format_id() const
+ { return formatID; }
+ void set_format_id(long v)
+ {
+ formatID= v;
+ }
+ long get_gtrid_length() const
+ { return gtrid_length; }
+ void set_gtrid_length(long v)
+ {
+ gtrid_length= v;
+ }
+ long get_bqual_length() const
+ { return bqual_length; }
+ void set_bqual_length(long v)
+ {
+ bqual_length= v;
+ }
+ const char* get_data() const
+ { return data; }
+ void set_data(const void* v, long l)
+ {
+ DBUG_ASSERT(l <= XIDDATASIZE);
+ memcpy(data, v, l);
+ }
bool eq(struct xid_t *xid)
{ return !xid->is_null() && eq(xid->gtrid_length, xid->bqual_length, xid->data); }
bool eq(long g, long b, const char *d)
@@ -586,6 +611,13 @@ struct xid_t {
memcpy(data, g, gtrid_length= gl);
memcpy(data+gl, b, bqual_length= bl);
}
+ void reset()
+ {
+ formatID= -1;
+ gtrid_length= 0;
+ bqual_length= 0;
+ memset(data, 0, XIDDATASIZE);
+ }
void set(ulonglong xid)
{
my_xid tmp;
@@ -3885,8 +3917,8 @@ public:
TABLE_SHARE* get_table_share() { return table_share; }
protected:
/* deprecated, don't use in new engines */
- inline void ha_statistic_increment(ulong SSV::*offset) const { }
-
+ // inline void ha_statistic_increment(ulong SSV::*offset) const { }
+ #define ha_statistic_increment(A)
/* Service methods for use by storage engines. */
void **ha_data(THD *) const;
THD *ha_thd(void) const;