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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
7adeebd9
Commit
7adeebd9
authored
Dec 29, 2004
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InnoDB: Remove dependency on rem0rec.ic from dict0dict.ic (Bug #7464)
parent
d70f5c1c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
92 deletions
+33
-92
innobase/dict/dict0dict.c
innobase/dict/dict0dict.c
+23
-0
innobase/include/dict0dict.h
innobase/include/dict0dict.h
+1
-14
innobase/include/dict0dict.ic
innobase/include/dict0dict.ic
+0
-74
innobase/trx/trx0rec.c
innobase/trx/trx0rec.c
+9
-4
No files found.
innobase/dict/dict0dict.c
View file @
7adeebd9
...
...
@@ -3689,6 +3689,29 @@ dict_tree_find_index_for_tuple(
return
(
index
);
}
/***********************************************************************
Checks if a table which is a mixed cluster member owns a record. */
ibool
dict_is_mixed_table_rec
(
/*====================*/
/* out: TRUE if the record belongs to this
table */
dict_table_t
*
table
,
/* in: table in a mixed cluster */
rec_t
*
rec
)
/* in: user record in the clustered index */
{
byte
*
mix_id_field
;
ulint
len
;
ut_ad
(
!
table
->
comp
);
mix_id_field
=
rec_get_nth_field_old
(
rec
,
table
->
mix_len
,
&
len
);
return
(
len
==
table
->
mix_id_len
&&
!
ut_memcmp
(
table
->
mix_id_buf
,
mix_id_field
,
len
));
}
/**************************************************************************
Checks that a tuple has n_fields_cmp value in a sensible range, so that
no comparison can occur with the page number field in a node pointer. */
...
...
innobase/include/dict0dict.h
View file @
7adeebd9
...
...
@@ -657,19 +657,6 @@ dict_index_copy_types(
dtuple_t
*
tuple
,
/* in: data tuple */
dict_index_t
*
index
,
/* in: index */
ulint
n_fields
);
/* in: number of field types to copy */
/************************************************************************
Gets the value of a system column in a clustered index record. The clustered
index must contain the system column: if the index is unique, row id is
not contained there! */
UNIV_INLINE
dulint
dict_index_rec_get_sys_col
(
/*=======================*/
/* out: system column value */
dict_index_t
*
index
,
/* in: clustered index describing the record */
const
ulint
*
offsets
,
/* in: offsets returned by rec_get_offsets() */
ulint
type
,
/* in: column type: DATA_ROLL_PTR, ... */
rec_t
*
rec
);
/* in: record */
/*************************************************************************
Gets the index tree where the index is stored. */
UNIV_INLINE
...
...
@@ -731,7 +718,7 @@ dict_tree_find_index_for_tuple(
dtuple_t
*
tuple
);
/* in: tuple for which to find index */
/***********************************************************************
Checks if a table which is a mixed cluster member owns a record. */
UNIV_INLINE
ibool
dict_is_mixed_table_rec
(
/*====================*/
...
...
innobase/include/dict0dict.ic
View file @
7adeebd9
...
...
@@ -9,7 +9,6 @@ Created 1/8/1996 Heikki Tuuri
#include "dict0load.h"
#include "trx0undo.h"
#include "trx0sys.h"
#include "rem0rec.h"
/*************************************************************************
Gets the column data type. */
...
...
@@ -312,51 +311,6 @@ dict_index_get_sys_col_pos(
dict_table_get_sys_col_no(index->table, type)));
}
/************************************************************************
Gets the value of a system column in a clustered index record. The clustered
index must contain the system column: if the index is unique, row id is
not contained there! */
UNIV_INLINE
dulint
dict_index_rec_get_sys_col(
/*=======================*/
/* out: system column value */
dict_index_t* index, /* in: clustered index describing the record */
const ulint* offsets,/* in: offsets returned by rec_get_offsets() */
ulint type, /* in: column type: DATA_ROLL_PTR, ... */
rec_t* rec) /* in: record */
{
ulint pos;
byte* field;
ulint len;
ut_ad(index);
ut_ad(index->type & DICT_CLUSTERED);
ut_ad(rec_offs_validate(rec, index, offsets));
pos = dict_index_get_sys_col_pos(index, type);
ut_ad(pos != ULINT_UNDEFINED);
field = rec_get_nth_field(rec, offsets, pos, &len);
if (type == DATA_ROLL_PTR) {
ut_ad(len == 7);
return(trx_read_roll_ptr(field));
} else if (type == DATA_TRX_ID) {
return(trx_read_trx_id(field));
} else if (type == DATA_MIX_ID) {
return(mach_dulint_read_compressed(field));
} else {
ut_a(type == DATA_ROW_ID);
return(mach_read_from_6(field));
}
}
/*************************************************************************
Gets the index tree where the index is stored. */
UNIV_INLINE
...
...
@@ -664,31 +618,3 @@ dict_table_get_index(
return(index);
}
/***********************************************************************
Checks if a table which is a mixed cluster member owns a record. */
UNIV_INLINE
ibool
dict_is_mixed_table_rec(
/*====================*/
/* out: TRUE if the record belongs to this
table */
dict_table_t* table, /* in: table in a mixed cluster */
rec_t* rec) /* in: user record in the clustered index */
{
byte* mix_id_field;
ulint len;
ut_ad(!table->comp);
mix_id_field = rec_get_nth_field_old(rec,
table->mix_len, &len);
if ((len != table->mix_id_len)
|| (0 != ut_memcmp(table->mix_id_buf, mix_id_field, len))) {
return(FALSE);
}
return(TRUE);
}
innobase/trx/trx0rec.c
View file @
7adeebd9
...
...
@@ -485,10 +485,15 @@ trx_undo_page_report_modify(
ptr
+=
1
;
/* Store the values of the system columns */
trx_id
=
dict_index_rec_get_sys_col
(
index
,
offsets
,
DATA_TRX_ID
,
rec
);
roll_ptr
=
dict_index_rec_get_sys_col
(
index
,
offsets
,
DATA_ROLL_PTR
,
rec
);
field
=
rec_get_nth_field
(
rec
,
offsets
,
dict_index_get_sys_col_pos
(
index
,
DATA_TRX_ID
),
&
len
);
ut_ad
(
len
==
DATA_TRX_ID_LEN
);
trx_id
=
trx_read_trx_id
(
field
);
field
=
rec_get_nth_field
(
rec
,
offsets
,
dict_index_get_sys_col_pos
(
index
,
DATA_ROLL_PTR
),
&
len
);
ut_ad
(
len
==
DATA_ROLL_PTR_LEN
);
roll_ptr
=
trx_read_roll_ptr
(
field
);
len
=
mach_dulint_write_compressed
(
ptr
,
trx_id
);
ptr
+=
len
;
...
...
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