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
1d771aa4
Commit
1d771aa4
authored
Nov 07, 2012
by
Venkata Sidagam
Browse files
Options
Browse Files
Download
Plain Diff
Bug #11759445: CAN'T DELETE ROWS FROM MEMORY TABLE WITH HASH KEY.
Merging from 5.1 to 5.5
parents
9e13157b
2226b108
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
storage/heap/hp_delete.c
storage/heap/hp_delete.c
+14
-4
No files found.
storage/heap/hp_delete.c
View file @
1d771aa4
...
...
@@ -104,7 +104,7 @@ int hp_rb_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
int
hp_delete_key
(
HP_INFO
*
info
,
register
HP_KEYDEF
*
keyinfo
,
const
uchar
*
record
,
uchar
*
recpos
,
int
flag
)
{
ulong
blength
,
pos2
,
pos_hashnr
,
lastpos_hashnr
;
ulong
blength
,
pos2
,
pos_hashnr
,
lastpos_hashnr
,
key_pos
;
HASH_INFO
*
lastpos
,
*
gpos
,
*
pos
,
*
pos3
,
*
empty
,
*
last_ptr
;
HP_SHARE
*
share
=
info
->
s
;
DBUG_ENTER
(
"hp_delete_key"
);
...
...
@@ -116,9 +116,9 @@ int hp_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
last_ptr
=
0
;
/* Search after record with key */
pos
=
hp_find_hash
(
&
keyinfo
->
block
,
hp_mask
(
hp_rec_hashnr
(
keyinfo
,
record
),
blength
,
share
->
records
+
1
));
key_pos
=
hp_mask
(
hp_rec_hashnr
(
keyinfo
,
record
),
blength
,
share
->
records
+
1
);
pos
=
hp_find_hash
(
&
keyinfo
->
block
,
key_pos
);
gpos
=
pos3
=
0
;
while
(
pos
->
ptr_to_rec
!=
recpos
)
...
...
@@ -188,6 +188,16 @@ int hp_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
DBUG_RETURN
(
0
);
}
pos3
=
pos
;
/* Link pos->next after lastpos */
/*
One of elements from the bucket we're scanning is moved to the
beginning of the list. Reset search since this element may not have
been processed yet.
*/
if
(
flag
&&
pos2
==
key_pos
)
{
info
->
current_ptr
=
0
;
info
->
current_hash_ptr
=
0
;
}
}
else
{
...
...
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