mariadb/storage/innobase/include/trx0xa.h
Vicențiu Ciorbaru b87873b221 Merge branch 'merge-innodb-5.6' into bb-10.0-vicentiu
This merge reverts commit 6ca4f693c1ce472e2b1bf7392607c2d1124b4293
from current 5.6.36 innodb.

Bug #23481444	OPTIMISER CALL ROW_SEARCH_MVCC() AND READ THE
                       INDEX APPLIED BY UNCOMMITTED ROW
Problem:
========
row_search_for_mysql() does whole table traversal for range query
even though the end range is passed. Whole table traversal happens
when the record is not with in transaction read view.

Solution:
=========

Convert the innodb last record of page to mysql format and compare
with end range if the traversal of row_search_mvcc() exceeds 100,
no ICP involved. If it is out of range then InnoDB can avoid the
whole table traversal. Need to refactor the code little bit to
make it compile.

Reviewed-by: Jimmy Yang <jimmy.yang@oracle.com>
Reviewed-by: Knut Hatlen <knut.hatlen@oracle.com>
Reviewed-by: Dmitry Shulga <dmitry.shulga@oracle.com>
RB: 14660
2017-05-17 14:53:28 +03:00

61 lines
2.1 KiB
C

/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
*****************************************************************************/
/*
* Start of xa.h header
*
* Define a symbol to prevent multiple inclusions of this header file
*/
#ifndef XA_H
#define XA_H
#include "handler.h"
/*
* Transaction branch identification: XID and NULLXID:
*/
#ifndef XIDDATASIZE
/** Sizes of transaction identifier */
#define XIDDATASIZE 128 /*!< maximum size of a transaction
identifier, in bytes */
#define MAXGTRIDSIZE 64 /*!< maximum size in bytes of gtrid */
#define MAXBQUALSIZE 64 /*!< maximum size in bytes of bqual */
#endif
/** X/Open XA distributed transaction status codes */
/* @{ */
#define XA_OK 0 /*!< normal execution */
#define XAER_ASYNC -2 /*!< asynchronous operation already
outstanding */
#define XAER_RMERR -3 /*!< a resource manager error
occurred in the transaction
branch */
#define XAER_NOTA -4 /*!< the XID is not valid */
#define XAER_INVAL -5 /*!< invalid arguments were given */
#define XAER_PROTO -6 /*!< routine invoked in an improper
context */
#define XAER_RMFAIL -7 /*!< resource manager unavailable */
#define XAER_DUPID -8 /*!< the XID already exists */
#define XAER_OUTSIDE -9 /*!< resource manager doing
work outside transaction */
/* @} */
#endif /* ifndef XA_H */
/*
* End of xa.h header
*/