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
83e0c3a6
Commit
83e0c3a6
authored
Dec 04, 2019
by
Nikita Malyavin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compare refs instead of whole rows (fixme: innodb case fails)
parent
96b8697d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
sql/handler.cc
sql/handler.cc
+17
-5
No files found.
sql/handler.cc
View file @
83e0c3a6
...
...
@@ -6984,6 +6984,10 @@ int handler::ha_check_overlaps(const uchar *old_data, const uchar* new_data)
return
error
;
}
handler
=
check_overlaps_handler
;
// Needs to compare record refs later is old_row_found()
if
(
is_update
)
position
(
old_data
);
}
// Save and later restore this handler's keyread
...
...
@@ -7013,13 +7017,21 @@ int handler::ha_check_overlaps(const uchar *old_data, const uchar* new_data)
if
(
error
)
return
error
;
auto
old_row_found
=
[
is_update
,
old_data
,
record_buffer
,
this
](){
auto
old_row_found
=
[
is_update
,
old_data
,
record_buffer
,
this
,
handler
](){
if
(
!
is_update
)
return
false
;
/* In case of update it could appear that the nearest neighbour is
* a record we are updating. It means, that there are no overlaps
* from this side. */
return
is_update
&&
memcmp
(
old_data
+
table
->
s
->
null_bytes
,
record_buffer
+
table
->
s
->
null_bytes
,
table
->
s
->
reclength
-
table
->
s
->
null_bytes
)
==
0
;
* from this side.
*
* An assumption is made that during update we always have the last
* fetched row in old_data. Therefore, comparing ref's is enough
* */
DBUG_ASSERT
(
handler
!=
this
&&
inited
!=
NONE
);
DBUG_ASSERT
(
ref_length
==
handler
->
ref_length
);
handler
->
position
(
record_buffer
);
return
memcmp
(
ref
,
handler
->
ref
,
ref_length
)
==
0
;
};
error
=
handler
->
ha_start_keyread
(
key_nr
);
...
...
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