Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
7a73cb12
Commit
7a73cb12
authored
May 24, 2011
by
Anitha Gopi
Browse files
Options
Browse Files
Download
Plain Diff
Autocommit - Updating local tree
parents
3cf30b89
0f95f99b
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
180 additions
and
136 deletions
+180
-136
mysql-test/r/variables-big.result
mysql-test/r/variables-big.result
+2
-0
mysql-test/t/variables-big.test
mysql-test/t/variables-big.test
+3
-0
storage/innobase/btr/btr0cur.c
storage/innobase/btr/btr0cur.c
+15
-3
storage/innobase/buf/buf0buf.c
storage/innobase/buf/buf0buf.c
+5
-5
storage/innobase/include/buf0buf.h
storage/innobase/include/buf0buf.h
+3
-0
storage/innobase/include/lock0lock.h
storage/innobase/include/lock0lock.h
+4
-3
storage/innobase/include/lock0lock.ic
storage/innobase/include/lock0lock.ic
+3
-3
storage/innobase/include/row0row.h
storage/innobase/include/row0row.h
+21
-9
storage/innobase/include/row0row.ic
storage/innobase/include/row0row.ic
+33
-3
storage/innobase/lock/lock0lock.c
storage/innobase/lock/lock0lock.c
+91
-81
storage/innobase/row/row0row.c
storage/innobase/row/row0row.c
+0
-29
No files found.
mysql-test/r/variables-big.result
View file @
7a73cb12
SET @def_var= @@session.transaction_prealloc_size;
SET SESSION transaction_prealloc_size=1024*1024*1024*1;
SHOW PROCESSLIST;
Id User Host db Command Time State Info
...
...
@@ -18,3 +19,4 @@ SET SESSION transaction_prealloc_size=1024*1024*1024*5;
SHOW PROCESSLIST;
Id User Host db Command Time State Info
<Id> root <Host> test Query <Time> NULL SHOW PROCESSLIST
SET @@session.transaction_prealloc_size= @def_var;
mysql-test/t/variables-big.test
View file @
7a73cb12
...
...
@@ -34,6 +34,7 @@
# There is a significant probablitity that this tests fails with testcase
# timeout if the testing box is not powerful enough.
#
SET
@
def_var
=
@@
session
.
transaction_prealloc_size
;
--
disable_warnings
SET
SESSION
transaction_prealloc_size
=
1024
*
1024
*
1024
*
1
;
...
...
@@ -53,3 +54,5 @@ SET SESSION transaction_prealloc_size=1024*1024*1024*5;
SHOW
PROCESSLIST
;
--
enable_warnings
SET
@@
session
.
transaction_prealloc_size
=
@
def_var
;
storage/innobase/btr/btr0cur.c
View file @
7a73cb12
...
...
@@ -3264,9 +3264,14 @@ btr_estimate_n_rows_in_range_on_level(
mtr_start
(
&
mtr
);
/* fetch the page */
block
=
buf_page_get
(
space
,
zip_size
,
page_no
,
RW_S_LATCH
,
&
mtr
);
/* Fetch the page. Because we are not holding the
index->lock, the tree may have changed and we may be
attempting to read a page that is no longer part of
the B-tree. We pass BUF_GET_POSSIBLY_FREED in order to
silence a debug assertion about this. */
block
=
buf_page_get_gen
(
space
,
zip_size
,
page_no
,
RW_S_LATCH
,
NULL
,
BUF_GET_POSSIBLY_FREED
,
__FILE__
,
__LINE__
,
&
mtr
);
page
=
buf_block_get_frame
(
block
);
...
...
@@ -3285,6 +3290,13 @@ btr_estimate_n_rows_in_range_on_level(
goto
inexact
;
}
/* It is possible but highly unlikely that the page was
originally written by an old version of InnoDB that did
not initialize FIL_PAGE_TYPE on other than B-tree pages.
For example, this could be an almost-empty BLOB page
that happens to contain the magic values in the fields
that we checked above. */
n_pages_read
++
;
if
(
page_no
!=
slot1
->
page_no
)
{
...
...
storage/innobase/buf/buf0buf.c
View file @
7a73cb12
...
...
@@ -2747,6 +2747,7 @@ buf_page_get_gen(
case
BUF_GET_IF_IN_POOL
:
case
BUF_PEEK_IF_IN_POOL
:
case
BUF_GET_IF_IN_POOL_OR_WATCH
:
case
BUF_GET_POSSIBLY_FREED
:
break
;
default:
ut_error
;
...
...
@@ -3062,7 +3063,10 @@ buf_page_get_gen(
#endif
/* UNIV_DEBUG || UNIV_IBUF_DEBUG */
buf_block_buf_fix_inc
(
block
,
file
,
line
);
#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
ut_a
(
mode
==
BUF_GET_POSSIBLY_FREED
||
!
block
->
page
.
file_page_was_freed
);
#endif
mutex_exit
(
&
block
->
mutex
);
/* Check if this is the first access to the page */
...
...
@@ -3075,10 +3079,6 @@ buf_page_get_gen(
buf_page_set_accessed_make_young
(
&
block
->
page
,
access_time
);
}
#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
ut_a
(
!
block
->
page
.
file_page_was_freed
);
#endif
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
ut_a
(
++
buf_dbg_counter
%
5771
||
buf_validate
());
ut_a
(
block
->
page
.
buf_fix_count
>
0
);
...
...
storage/innobase/include/buf0buf.h
View file @
7a73cb12
...
...
@@ -53,6 +53,9 @@ Created 11/5/1995 Heikki Tuuri
/*!< Get the page only if it's in the
buffer pool, if not then set a watch
on the page. */
#define BUF_GET_POSSIBLY_FREED 16
/*!< Like BUF_GET, but do not mind
if the file page has been freed. */
/* @} */
/** @name Modes for buf_page_get_known_nowait */
/* @{ */
...
...
storage/innobase/include/lock0lock.h
View file @
7a73cb12
...
...
@@ -72,9 +72,10 @@ UNIV_INLINE
trx_t
*
lock_clust_rec_some_has_impl
(
/*=========================*/
const
rec_t
*
rec
,
/*!< in: user record */
dict_index_t
*
index
,
/*!< in: clustered index */
const
ulint
*
offsets
);
/*!< in: rec_get_offsets(rec, index) */
const
rec_t
*
rec
,
/*!< in: user record */
const
dict_index_t
*
index
,
/*!< in: clustered index */
const
ulint
*
offsets
)
/*!< in: rec_get_offsets(rec, index) */
__attribute__
((
nonnull
,
warn_unused_result
));
/*********************************************************************//**
Gets the heap_no of the smallest user record on a page.
@return heap_no of smallest user record, or PAGE_HEAP_NO_SUPREMUM */
...
...
storage/innobase/include/lock0lock.ic
View file @
7a73cb12
...
...
@@ -75,9 +75,9 @@ UNIV_INLINE
trx_t*
lock_clust_rec_some_has_impl(
/*=========================*/
const rec_t* rec, /*!< in: user record */
dict_index_t* index, /*!< in: clustered index */
const ulint* offsets)/*!< in: rec_get_offsets(rec, index) */
const rec_t*
rec, /*!< in: user record */
const
dict_index_t* index, /*!< in: clustered index */
const ulint*
offsets)/*!< in: rec_get_offsets(rec, index) */
{
trx_id_t trx_id;
...
...
storage/innobase/include/row0row.h
View file @
7a73cb12
...
...
@@ -41,13 +41,24 @@ Created 4/20/1996 Heikki Tuuri
Gets the offset of the trx id field, in bytes relative to the origin of
a clustered index record.
@return offset of DATA_TRX_ID */
UNIV_IN
TERN
UNIV_IN
LINE
ulint
row_get_trx_id_offset
(
/*==================*/
const
rec_t
*
rec
,
/*!< in: record */
dict_index_t
*
index
,
/*!< in: clustered index */
const
ulint
*
offsets
);
/*!< in: rec_get_offsets(rec, index) */
row_get_trx_id_offset_func
(
/*=======================*/
#ifdef UNIV_DEBUG
const
rec_t
*
rec
,
/*!< in: record */
#endif
/* UNIV_DEBUG */
const
dict_index_t
*
index
,
/*!< in: clustered index */
const
ulint
*
offsets
)
/*!< in: rec_get_offsets(rec, index) */
__attribute__
((
nonnull
,
warn_unused_result
));
#ifdef UNIV_DEBUG
# define row_get_trx_id_offset(rec, index, offsets) \
row_get_trx_id_offset_func(rec, index, offsets)
#else
/* UNIV_DEBUG */
# define row_get_trx_id_offset(rec, index, offsets) \
row_get_trx_id_offset_func(index, offsets)
#endif
/* UNIV_DEBUG */
/*********************************************************************//**
Reads the trx id field from a clustered index record.
@return value of the field */
...
...
@@ -55,9 +66,10 @@ UNIV_INLINE
trx_id_t
row_get_rec_trx_id
(
/*===============*/
const
rec_t
*
rec
,
/*!< in: record */
dict_index_t
*
index
,
/*!< in: clustered index */
const
ulint
*
offsets
);
/*!< in: rec_get_offsets(rec, index) */
const
rec_t
*
rec
,
/*!< in: record */
const
dict_index_t
*
index
,
/*!< in: clustered index */
const
ulint
*
offsets
)
/*!< in: rec_get_offsets(rec, index) */
__attribute__
((
nonnull
,
warn_unused_result
));
/*********************************************************************//**
Reads the roll pointer field from a clustered index record.
@return value of the field */
...
...
storage/innobase/include/row0row.ic
View file @
7a73cb12
...
...
@@ -27,6 +27,36 @@ Created 4/20/1996 Heikki Tuuri
#include "rem0rec.h"
#include "trx0undo.h"
/*********************************************************************//**
Gets the offset of trx id field, in bytes relative to the origin of
a clustered index record.
@return offset of DATA_TRX_ID */
UNIV_INLINE
ulint
row_get_trx_id_offset_func(
/*=======================*/
#ifdef UNIV_DEBUG
const rec_t* rec, /*!< in: record */
#endif /* UNIV_DEBUG */
const dict_index_t* index, /*!< in: clustered index */
const ulint* offsets)/*!< in: rec_get_offsets(rec, index) */
{
ulint pos;
ulint offset;
ulint len;
ut_ad(dict_index_is_clust(index));
ut_ad(rec_offs_validate(rec, index, offsets));
pos = dict_index_get_sys_col_pos(index, DATA_TRX_ID);
offset = rec_get_nth_field_offs(offsets, pos, &len);
ut_ad(len == DATA_TRX_ID_LEN);
return(offset);
}
/*********************************************************************//**
Reads the trx id field from a clustered index record.
@return value of the field */
...
...
@@ -34,9 +64,9 @@ UNIV_INLINE
trx_id_t
row_get_rec_trx_id(
/*===============*/
const rec_t* rec, /*!< in: record */
dict_index_t* index, /*!< in: clustered index */
const ulint* offsets)/*!< in: rec_get_offsets(rec, index) */
const rec_t*
rec, /*!< in: record */
const
dict_index_t* index, /*!< in: clustered index */
const ulint*
offsets)/*!< in: rec_get_offsets(rec, index) */
{
ulint offset;
...
...
storage/innobase/lock/lock0lock.c
View file @
7a73cb12
...
...
@@ -352,6 +352,7 @@ ibool
lock_validate
(
void
);
/*===============*/
# ifdef UNIV_DEBUG_LOCK_VALIDATE
/*********************************************************************//**
Validates the record lock queues on a page.
@return TRUE if ok */
...
...
@@ -359,10 +360,9 @@ static
ibool
lock_rec_validate_page
(
/*===================*/
ulint
space
,
/*!< in: space id */
ulint
zip_size
,
/*!< in: compressed page size in bytes
or 0 for uncompressed pages */
ulint
page_no
);
/*!< in: page number */
const
buf_block_t
*
block
)
/*!< in: buffer block */
__attribute__
((
nonnull
,
warn_unused_result
));
# endif
/* UNIV_DEBUG_LOCK_VALIDATE */
#endif
/* UNIV_DEBUG */
/* The lock system */
...
...
@@ -1100,10 +1100,10 @@ lock_rec_reset_nth_bit(
Gets the first or next record lock on a page.
@return next lock, NULL if none exists */
UNIV_INLINE
lock_t
*
lock_rec_get_next_on_page
(
/*======================*/
lock_t
*
lock
)
/*!< in: a record lock */
const
lock_t
*
lock_rec_get_next_on_page
_const
(
/*======================
======
*/
const
lock_t
*
lock
)
/*!< in: a record lock */
{
ulint
space
;
ulint
page_no
;
...
...
@@ -1132,6 +1132,18 @@ lock_rec_get_next_on_page(
return
(
lock
);
}
/*********************************************************************//**
Gets the first or next record lock on a page.
@return next lock, NULL if none exists */
UNIV_INLINE
lock_t
*
lock_rec_get_next_on_page
(
/*======================*/
lock_t
*
lock
)
/*!< in: a record lock */
{
return
((
lock_t
*
)
lock_rec_get_next_on_page_const
(
lock
));
}
/*********************************************************************//**
Gets the first record lock on a page, where the page is identified by its
file address.
...
...
@@ -2645,9 +2657,7 @@ lock_move_reorganize_page(
mem_heap_free
(
heap
);
#ifdef UNIV_DEBUG_LOCK_VALIDATE
ut_ad
(
lock_rec_validate_page
(
buf_block_get_space
(
block
),
buf_block_get_zip_size
(
block
),
buf_block_get_page_no
(
block
)));
ut_ad
(
lock_rec_validate_page
(
block
));
#endif
}
...
...
@@ -2735,12 +2745,8 @@ lock_move_rec_list_end(
lock_mutex_exit_kernel
();
#ifdef UNIV_DEBUG_LOCK_VALIDATE
ut_ad
(
lock_rec_validate_page
(
buf_block_get_space
(
block
),
buf_block_get_zip_size
(
block
),
buf_block_get_page_no
(
block
)));
ut_ad
(
lock_rec_validate_page
(
buf_block_get_space
(
new_block
),
buf_block_get_zip_size
(
block
),
buf_block_get_page_no
(
new_block
)));
ut_ad
(
lock_rec_validate_page
(
block
));
ut_ad
(
lock_rec_validate_page
(
new_block
));
#endif
}
...
...
@@ -2848,9 +2854,7 @@ lock_move_rec_list_start(
lock_mutex_exit_kernel
();
#ifdef UNIV_DEBUG_LOCK_VALIDATE
ut_ad
(
lock_rec_validate_page
(
buf_block_get_space
(
block
),
buf_block_get_zip_size
(
block
),
buf_block_get_page_no
(
block
)));
ut_ad
(
lock_rec_validate_page
(
block
));
#endif
}
...
...
@@ -3833,17 +3837,18 @@ Checks if other transactions have an incompatible mode lock request in
the lock queue.
@return lock or NULL */
UNIV_INLINE
lock_t
*
const
lock_t
*
lock_table_other_has_incompatible
(
/*==============================*/
trx_t
*
trx
,
/*!< in: transaction, or NULL if all
transactions should be included */
ulint
wait
,
/*!< in: LOCK_WAIT if also waiting locks are
taken into account, or 0 if not */
dict_table_t
*
table
,
/*!< in: table */
enum
lock_mode
mode
)
/*!< in: lock mode */
const
trx_t
*
trx
,
/*!< in: transaction, or NULL if all
transactions should be included */
ulint
wait
,
/*!< in: LOCK_WAIT if also
waiting locks are taken into
account, or 0 if not */
const
dict_table_t
*
table
,
/*!< in: table */
enum
lock_mode
mode
)
/*!< in: lock mode */
{
lock_t
*
lock
;
const
lock_t
*
lock
;
ut_ad
(
mutex_own
(
&
kernel_mutex
));
...
...
@@ -3934,10 +3939,10 @@ static
ibool
lock_table_has_to_wait_in_queue
(
/*============================*/
lock_t
*
wait_lock
)
/*!< in: waiting table lock */
const
lock_t
*
wait_lock
)
/*!< in: waiting table lock */
{
dict_table_t
*
table
;
lock_t
*
lock
;
const
dict_table_t
*
table
;
const
lock_t
*
lock
;
ut_ad
(
mutex_own
(
&
kernel_mutex
));
ut_ad
(
lock_get_wait
(
wait_lock
));
...
...
@@ -4677,9 +4682,9 @@ static
ibool
lock_table_queue_validate
(
/*======================*/
dict_table_t
*
table
)
/*!< in: table */
const
dict_table_t
*
table
)
/*!< in: table */
{
lock_t
*
lock
;
const
lock_t
*
lock
;
ut_ad
(
mutex_own
(
&
kernel_mutex
));
...
...
@@ -4715,7 +4720,7 @@ lock_rec_queue_validate(
/*====================*/
const
buf_block_t
*
block
,
/*!< in: buffer block containing rec */
const
rec_t
*
rec
,
/*!< in: record to look at */
dict_index_t
*
index
,
/*!< in: index, or NULL if not known */
const
dict_index_t
*
index
,
/*!< in: index, or NULL if not known */
const
ulint
*
offsets
)
/*!< in: rec_get_offsets(rec, index) */
{
trx_t
*
impl_trx
;
...
...
@@ -4860,42 +4865,28 @@ lock_rec_queue_validate(
/*********************************************************************//**
Validates the record lock queues on a page.
@return TRUE if ok */
static
static
__attribute__
((
nonnull
,
warn_unused_result
))
ibool
lock_rec_validate_page
(
/*===================*/
ulint
space
,
/*!< in: space id */
ulint
zip_size
,
/*!< in: compressed page size in bytes
or 0 for uncompressed pages */
ulint
page_no
)
/*!< in: page number */
lock_rec_validate_page_low
(
/*=======================*/
const
buf_block_t
*
block
)
/*!< in: buffer block */
{
dict_index_t
*
index
;
buf_block_t
*
block
;
const
page_t
*
page
;
lock_t
*
lock
;
const
lock_t
*
lock
;
const
rec_t
*
rec
;
ulint
nth_lock
=
0
;
ulint
nth_bit
=
0
;
ulint
i
;
mtr_t
mtr
;
mem_heap_t
*
heap
=
NULL
;
ulint
offsets_
[
REC_OFFS_NORMAL_SIZE
];
ulint
*
offsets
=
offsets_
;
rec_offs_init
(
offsets_
);
ut_ad
(
!
mutex_own
(
&
kernel_mutex
));
mtr_start
(
&
mtr
);
ut_ad
(
zip_size
!=
ULINT_UNDEFINED
);
block
=
buf_page_get
(
space
,
zip_size
,
page_no
,
RW_X_LATCH
,
&
mtr
);
buf_block_dbg_add_level
(
block
,
SYNC_NO_ORDER_CHECK
);
page
=
block
->
frame
;
ut_ad
(
mutex_own
(
&
kernel_mutex
));
ut_ad
(
buf_block_get_state
(
block
)
==
BUF_BLOCK_FILE_PAGE
);
lock_mutex_enter_kernel
();
loop:
lock
=
lock_rec_get_first_on_page_addr
(
space
,
page_no
);
lock
=
lock_rec_get_first_on_page_addr
(
buf_block_get_space
(
block
),
buf_block_get_page_no
(
block
));
if
(
!
lock
)
{
goto
function_exit
;
...
...
@@ -4903,7 +4894,7 @@ lock_rec_validate_page(
for
(
i
=
0
;
i
<
nth_lock
;
i
++
)
{
lock
=
lock_rec_get_next_on_page
(
lock
);
lock
=
lock_rec_get_next_on_page
_const
(
lock
);
if
(
!
lock
)
{
goto
function_exit
;
...
...
@@ -4926,15 +4917,14 @@ lock_rec_validate_page(
if
(
i
==
1
||
lock_rec_get_nth_bit
(
lock
,
i
))
{
index
=
lock
->
index
;
rec
=
page_find_rec_with_heap_no
(
page
,
i
);
rec
=
page_find_rec_with_heap_no
(
block
->
frame
,
i
);
ut_a
(
rec
);
offsets
=
rec_get_offsets
(
rec
,
index
,
offsets
,
offsets
=
rec_get_offsets
(
rec
,
lock
->
index
,
offsets
,
ULINT_UNDEFINED
,
&
heap
);
#if 0
fprintf(stderr,
"Validating %
lu %l
u\n",
(ulong) space, (ulong) page_no
);
"Validating %
u %
u\n",
block->page.space, block->page.offset
);
#endif
lock_mutex_exit_kernel
();
...
...
@@ -4943,7 +4933,8 @@ lock_rec_validate_page(
check WILL break the latching order and may
cause a deadlock of threads. */
lock_rec_queue_validate
(
block
,
rec
,
index
,
offsets
);
lock_rec_queue_validate
(
block
,
rec
,
lock
->
index
,
offsets
);
lock_mutex_enter_kernel
();
...
...
@@ -4959,16 +4950,32 @@ lock_rec_validate_page(
goto
loop
;
function_exit:
lock_mutex_exit_kernel
();
mtr_commit
(
&
mtr
);
if
(
UNIV_LIKELY_NULL
(
heap
))
{
mem_heap_free
(
heap
);
}
return
(
TRUE
);
}
#ifdef UNIV_DEBUG_LOCK_VALIDATE
/*********************************************************************//**
Validates the record lock queues on a page.
@return TRUE if ok */
static
ibool
lock_rec_validate_page
(
/*===================*/
const
buf_block_t
*
block
)
/*!< in: buffer block */
{
ibool
valid
;
lock_mutex_enter_kernel
();
valid
=
lock_rec_validate_page_low
(
block
);
lock_mutex_exit_kernel
();
return
(
valid
);
}
#endif
/* UNIV_DEBUG_LOCK_VALIDATE */
/*********************************************************************//**
Validates the lock system.
@return TRUE if ok */
...
...
@@ -4977,11 +4984,8 @@ ibool
lock_validate
(
void
)
/*===============*/
{
lock_t
*
lock
;
trx_t
*
trx
;
ib_uint64_t
limit
;
ulint
space
;
ulint
page_no
;
const
lock_t
*
lock
;
const
trx_t
*
trx
;
ulint
i
;
lock_mutex_enter_kernel
();
...
...
@@ -5006,9 +5010,14 @@ lock_validate(void)
for
(
i
=
0
;
i
<
hash_get_n_cells
(
lock_sys
->
rec_hash
);
i
++
)
{
limit
=
0
;
ulint
space
;
ulint
page_no
;
ib_uint64_t
limit
=
0
;
for
(;;)
{
mtr_t
mtr
;
buf_block_t
*
block
;
lock
=
HASH_GET_FIRST
(
lock_sys
->
rec_hash
,
i
);
while
(
lock
)
{
...
...
@@ -5032,15 +5041,16 @@ lock_validate(void)
break
;
}
lock_mutex_exit_kernel
(
);
lock_rec_validate_page
(
space
,
fil_space_get_zip_size
(
space
),
page_no
);
mtr_start
(
&
mtr
);
block
=
buf_page_get
(
space
,
fil_space_get_zip_size
(
space
)
,
page_no
,
RW_X_LATCH
,
&
mtr
);
buf_block_dbg_add_level
(
block
,
SYNC_NO_ORDER_CHECK
);
lock_mutex_enter_kernel
();
ut_ad
(
lock_rec_validate_page_low
(
block
));
mtr_commit
(
&
mtr
);
limit
=
ut_ull_create
(
space
,
page_no
+
1
)
;
limit
++
;
}
}
...
...
storage/innobase/row/row0row.c
View file @
7a73cb12
...
...
@@ -47,35 +47,6 @@ Created 4/20/1996 Heikki Tuuri
#include "read0read.h"
#include "ut0mem.h"
/*********************************************************************//**
Gets the offset of trx id field, in bytes relative to the origin of
a clustered index record.
@return offset of DATA_TRX_ID */
UNIV_INTERN
ulint
row_get_trx_id_offset
(
/*==================*/
const
rec_t
*
rec
__attribute__
((
unused
)),
/*!< in: record */
dict_index_t
*
index
,
/*!< in: clustered index */
const
ulint
*
offsets
)
/*!< in: rec_get_offsets(rec, index) */
{
ulint
pos
;
ulint
offset
;
ulint
len
;
ut_ad
(
dict_index_is_clust
(
index
));
ut_ad
(
rec_offs_validate
(
rec
,
index
,
offsets
));
pos
=
dict_index_get_sys_col_pos
(
index
,
DATA_TRX_ID
);
offset
=
rec_get_nth_field_offs
(
offsets
,
pos
,
&
len
);
ut_ad
(
len
==
DATA_TRX_ID_LEN
);
return
(
offset
);
}
/*****************************************************************//**
When an insert or purge to a table is performed, this function builds
the entry to be inserted into or purged from an index on the table.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment