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
08f44a43
Commit
08f44a43
authored
Oct 10, 2002
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use sort_order directly
parent
72174d5b
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 @
08f44a43
...
@@ -301,11 +301,7 @@ ulong hp_hashnr(register HP_KEYDEF *keydef, register const byte *key)
...
@@ -301,11 +301,7 @@ ulong hp_hashnr(register HP_KEYDEF *keydef, register const byte *key)
}
}
if
(
seg
->
type
==
HA_KEYTYPE_TEXT
)
if
(
seg
->
type
==
HA_KEYTYPE_TEXT
)
{
{
for
(;
pos
<
(
uchar
*
)
key
;
pos
++
)
seg
->
charset
->
hash_sort
(
seg
->
charset
,
pos
,((
uchar
*
)
key
)
-
pos
,
&
nr
,
NULL
);
{
nr
*=
16777619
;
nr
^=
((
uint
)
my_sort_order
[(
uint
)
*
pos
]);
}
}
}
else
else
{
{
...
@@ -339,11 +335,7 @@ ulong hp_rec_hashnr(register HP_KEYDEF *keydef, register const byte *rec)
...
@@ -339,11 +335,7 @@ ulong hp_rec_hashnr(register HP_KEYDEF *keydef, register const byte *rec)
}
}
if
(
seg
->
type
==
HA_KEYTYPE_TEXT
)
if
(
seg
->
type
==
HA_KEYTYPE_TEXT
)
{
{
for
(
;
pos
<
end
;
pos
++
)
seg
->
charset
->
hash_sort
(
seg
->
charset
,
pos
,((
uchar
*
)
key
)
-
pos
,
&
nr
,
NULL
);
{
nr
*=
16777619
;
nr
^=
(
uint
)
my_sort_order
[(
uint
)
*
pos
];
}
}
}
else
else
{
{
...
...
myisam/mi_unique.c
View file @
08f44a43
...
@@ -98,22 +98,11 @@ ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const byte *record)
...
@@ -98,22 +98,11 @@ ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const byte *record)
}
}
end
=
pos
+
length
;
end
=
pos
+
length
;
if
(
type
==
HA_KEYTYPE_TEXT
||
type
==
HA_KEYTYPE_VARTEXT
)
if
(
type
==
HA_KEYTYPE_TEXT
||
type
==
HA_KEYTYPE_VARTEXT
)
{
if
(
keyseg
->
charset
->
hash_sort
)
{
{
ulong
nr
=
1
,
nr2
=
4
;
ulong
nr
=
1
,
nr2
=
4
;
keyseg
->
charset
->
hash_sort
(
keyseg
->
charset
,(
const
uchar
*
)
pos
,
length
,
&
nr
,
&
nr2
);
keyseg
->
charset
->
hash_sort
(
keyseg
->
charset
,(
const
uchar
*
)
pos
,
length
,
&
nr
,
&
nr2
);
crc
=
nr
;
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
else
while
(
pos
!=
end
)
while
(
pos
!=
end
)
crc
=
((
crc
<<
8
)
+
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