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
69dc5ef8
Commit
69dc5ef8
authored
Oct 10, 2002
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use sort_order directly
parent
a0dd5feb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
24 deletions
+5
-24
heap/hp_hash.c
heap/hp_hash.c
+2
-10
myisam/mi_unique.c
myisam/mi_unique.c
+3
-14
No files found.
heap/hp_hash.c
View file @
69dc5ef8
...
...
@@ -301,11 +301,7 @@ ulong hp_hashnr(register HP_KEYDEF *keydef, register const byte *key)
}
if
(
seg
->
type
==
HA_KEYTYPE_TEXT
)
{
for
(;
pos
<
(
uchar
*
)
key
;
pos
++
)
{
nr
*=
16777619
;
nr
^=
((
uint
)
my_sort_order
[(
uint
)
*
pos
]);
}
seg
->
charset
->
hash_sort
(
seg
->
charset
,
pos
,((
uchar
*
)
key
)
-
pos
,
&
nr
,
NULL
);
}
else
{
...
...
@@ -339,11 +335,7 @@ ulong hp_rec_hashnr(register HP_KEYDEF *keydef, register const byte *rec)
}
if
(
seg
->
type
==
HA_KEYTYPE_TEXT
)
{
for
(
;
pos
<
end
;
pos
++
)
{
nr
*=
16777619
;
nr
^=
(
uint
)
my_sort_order
[(
uint
)
*
pos
];
}
seg
->
charset
->
hash_sort
(
seg
->
charset
,
pos
,((
uchar
*
)
key
)
-
pos
,
&
nr
,
NULL
);
}
else
{
...
...
myisam/mi_unique.c
View file @
69dc5ef8
...
...
@@ -98,22 +98,11 @@ ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const byte *record)
}
end
=
pos
+
length
;
if
(
type
==
HA_KEYTYPE_TEXT
||
type
==
HA_KEYTYPE_VARTEXT
)
{
if
(
keyseg
->
charset
->
hash_sort
)
{
ulong
nr
=
1
,
nr2
=
4
;
keyseg
->
charset
->
hash_sort
(
keyseg
->
charset
,(
const
uchar
*
)
pos
,
length
,
&
nr
,
&
nr2
);
crc
=
nr
;
}
else
{
uchar
*
sort_order
=
keyseg
->
charset
->
sort_order
;
while
(
pos
!=
end
)
crc
=
((
crc
<<
8
)
+
(((
uchar
)
sort_order
[
*
(
uchar
*
)
pos
++
])))
+
(
crc
>>
(
8
*
sizeof
(
ha_checksum
)
-
8
));
}
}
else
while
(
pos
!=
end
)
crc
=
((
crc
<<
8
)
+
...
...
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