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
32757a34
Commit
32757a34
authored
Dec 28, 2004
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InnoDB: Fix some bugs in the new record format. (Bug #7493)
parent
9c12543e
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
13 additions
and
35 deletions
+13
-35
innobase/btr/btr0btr.c
innobase/btr/btr0btr.c
+2
-3
innobase/btr/btr0cur.c
innobase/btr/btr0cur.c
+1
-1
innobase/btr/btr0pcur.c
innobase/btr/btr0pcur.c
+1
-3
innobase/include/rem0cmp.h
innobase/include/rem0cmp.h
+0
-8
innobase/include/rem0cmp.ic
innobase/include/rem0cmp.ic
+1
-2
innobase/include/rem0rec.ic
innobase/include/rem0rec.ic
+2
-1
innobase/page/page0page.c
innobase/page/page0page.c
+1
-2
innobase/rem/rem0cmp.c
innobase/rem/rem0cmp.c
+2
-12
innobase/rem/rem0rec.c
innobase/rem/rem0rec.c
+3
-3
No files found.
innobase/btr/btr0btr.c
View file @
32757a34
...
...
@@ -2735,9 +2735,8 @@ btr_validate_level(
offsets
,
ULINT_UNDEFINED
,
&
heap
);
offsets2
=
rec_get_offsets
(
right_rec
,
index
,
offsets2
,
ULINT_UNDEFINED
,
&
heap
);
if
(
cmp_rec_rec
(
rec
,
right_rec
,
offsets
,
offsets2
,
dict_index_get_n_fields
(
index
),
index
)
>=
0
)
{
if
(
cmp_rec_rec
(
rec
,
right_rec
,
offsets
,
offsets2
,
index
)
>=
0
)
{
btr_validate_report2
(
index
,
level
,
page
,
right_page
);
...
...
innobase/btr/btr0cur.c
View file @
32757a34
...
...
@@ -2848,7 +2848,7 @@ btr_estimate_number_of_different_key_vals(
cmp_rec_rec_with_match
(
rec
,
next_rec
,
offsets1
,
offsets2
,
index
,
n_cols
,
&
matched_fields
,
index
,
&
matched_fields
,
&
matched_bytes
);
for
(
j
=
matched_fields
+
1
;
j
<=
n_cols
;
j
++
)
{
...
...
innobase/btr/btr0pcur.c
View file @
32757a34
...
...
@@ -268,9 +268,7 @@ btr_pcur_restore_position(
cursor
->
old_n_fields
,
&
heap
);
ut_ad
(
cmp_rec_rec
(
cursor
->
old_rec
,
rec
,
offsets1
,
offsets2
,
cursor
->
old_n_fields
,
index
)
==
0
);
rec
,
offsets1
,
offsets2
,
index
)
==
0
);
mem_heap_free
(
heap
);
#endif
/* UNIV_DEBUG */
return
(
TRUE
);
...
...
innobase/include/rem0cmp.h
View file @
32757a34
...
...
@@ -137,10 +137,6 @@ cmp_rec_rec_with_match(
const
ulint
*
offsets1
,
/* in: rec_get_offsets(rec1, index) */
const
ulint
*
offsets2
,
/* in: rec_get_offsets(rec2, index) */
dict_index_t
*
index
,
/* in: data dictionary index */
ulint
n
,
/* in: number of fields to compare,
or ULINT_UNDEFINED if both records
contain all fields, and all fields
should be compared */
ulint
*
matched_fields
,
/* in/out: number of already completely
matched fields; when the function returns,
contains the value the for current
...
...
@@ -163,10 +159,6 @@ cmp_rec_rec(
rec_t
*
rec2
,
/* in: physical record */
const
ulint
*
offsets1
,
/* in: rec_get_offsets(rec1, index) */
const
ulint
*
offsets2
,
/* in: rec_get_offsets(rec2, index) */
ulint
n
,
/* in: number of fields to compare,
or ULINT_UNDEFINED if both records
contain all fields, and all fields
should be compared */
dict_index_t
*
index
);
/* in: data dictionary index */
...
...
innobase/include/rem0cmp.ic
View file @
32757a34
...
...
@@ -59,12 +59,11 @@ cmp_rec_rec(
rec_t* rec2, /* in: physical record */
const ulint* offsets1,/* in: rec_get_offsets(rec1, index) */
const ulint* offsets2,/* in: rec_get_offsets(rec2, index) */
ulint n, /* in: number of fields to compare */
dict_index_t* index) /* in: data dictionary index */
{
ulint match_f = 0;
ulint match_b = 0;
return(cmp_rec_rec_with_match(rec1, rec2, offsets1, offsets2, index,
n,
return(cmp_rec_rec_with_match(rec1, rec2, offsets1, offsets2, index,
&match_f, &match_b));
}
innobase/include/rem0rec.ic
View file @
32757a34
...
...
@@ -946,7 +946,8 @@ rec_offs_nth_size(
{
ut_ad(rec_offs_validate(NULL, NULL, offsets));
ut_ad(n < rec_offs_n_fields(offsets));
return(rec_offs_base(offsets)[1 + n] & REC_OFFS_MASK);
return((rec_offs_base(offsets)[1 + n] - rec_offs_base(offsets)[n])
& REC_OFFS_MASK);
}
/**********************************************************
...
...
innobase/page/page0page.c
View file @
32757a34
...
...
@@ -1749,8 +1749,7 @@ page_validate(
/* Check that the records are in the ascending order */
if
((
count
>=
2
)
&&
(
!
page_cur_is_after_last
(
&
cur
)))
{
if
(
!
(
1
==
cmp_rec_rec
(
rec
,
old_rec
,
offsets
,
old_offsets
,
ULINT_UNDEFINED
,
index
)))
{
offsets
,
old_offsets
,
index
)))
{
fprintf
(
stderr
,
"InnoDB: Records in wrong order on page %lu"
,
(
ulong
)
buf_frame_get_page_no
(
page
));
...
...
innobase/rem/rem0cmp.c
View file @
32757a34
...
...
@@ -728,10 +728,6 @@ cmp_rec_rec_with_match(
const
ulint
*
offsets1
,
/* in: rec_get_offsets(rec1, index) */
const
ulint
*
offsets2
,
/* in: rec_get_offsets(rec2, index) */
dict_index_t
*
index
,
/* in: data dictionary index */
ulint
n
,
/* in: number of fields to compare,
or ULINT_UNDEFINED if both records
contain all fields, and all fields
should be compared */
ulint
*
matched_fields
,
/* in/out: number of already completely
matched fields; when the function returns,
contains the value the for current
...
...
@@ -765,14 +761,8 @@ cmp_rec_rec_with_match(
ut_ad
(
rec_offs_comp
(
offsets1
)
==
rec_offs_comp
(
offsets2
));
comp
=
rec_offs_comp
(
offsets1
);
if
(
n
==
ULINT_UNDEFINED
)
{
rec1_n_fields
=
rec_offs_n_fields
(
offsets1
);
rec2_n_fields
=
rec_offs_n_fields
(
offsets2
);
}
else
{
ut_ad
(
n
<=
rec_offs_n_fields
(
offsets1
));
ut_ad
(
n
<=
rec_offs_n_fields
(
offsets2
));
rec1_n_fields
=
rec2_n_fields
=
n
;
}
rec1_n_fields
=
rec_offs_n_fields
(
offsets1
);
rec2_n_fields
=
rec_offs_n_fields
(
offsets2
);
cur_field
=
*
matched_fields
;
cur_bytes
=
*
matched_bytes
;
...
...
innobase/rem/rem0rec.c
View file @
32757a34
...
...
@@ -333,14 +333,14 @@ rec_get_offsets_func(
n
=
n_fields
;
}
size
=
(
n
+
(
1
+
REC_OFFS_HEADER_SIZE
))
*
sizeof
(
ulint
);
size
=
n
+
(
1
+
REC_OFFS_HEADER_SIZE
);
if
(
!
offsets
||
rec_offs_get_n_alloc
(
offsets
)
<
size
)
{
if
(
!*
heap
)
{
*
heap
=
mem_heap_create_func
(
size
,
*
heap
=
mem_heap_create_func
(
size
*
sizeof
(
ulint
)
,
NULL
,
MEM_HEAP_DYNAMIC
,
file
,
line
);
}
offsets
=
mem_heap_alloc
(
*
heap
,
size
);
offsets
=
mem_heap_alloc
(
*
heap
,
size
*
sizeof
(
ulint
)
);
rec_offs_set_n_alloc
(
offsets
,
size
);
}
...
...
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