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
7d9572c2
Commit
7d9572c2
authored
May 06, 2002
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use keyseg charset instead of default_charset_info
parent
234dc3a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
heap/hp_hash.c
heap/hp_hash.c
+8
-15
No files found.
heap/hp_hash.c
View file @
7d9572c2
...
...
@@ -213,14 +213,13 @@ ulong hp_hashnr(register HP_KEYDEF *keydef, register const byte *key)
}
if
(
seg
->
type
==
HA_KEYTYPE_TEXT
)
{
if
(
default_charset_info
->
hash_sort
)
default_charset_info
->
hash_sort
(
default_charset_info
,
pos
,((
uchar
*
)
key
)
-
pos
,
&
nr
,
&
nr2
);
if
(
seg
->
charset
->
hash_sort
)
seg
->
charset
->
hash_sort
(
seg
->
charset
,
pos
,((
uchar
*
)
key
)
-
pos
,
&
nr
,
&
nr2
);
else
for
(;
pos
<
(
uchar
*
)
key
;
pos
++
)
{
nr
^=
(
ulong
)
((((
uint
)
nr
&
63
)
+
nr2
)
*
((
uint
)
default_charset_info
->
sort_order
[(
uint
)
*
pos
]))
+
(
nr
<<
8
);
((
uint
)
seg
->
charset
->
sort_order
[(
uint
)
*
pos
]))
+
(
nr
<<
8
);
nr2
+=
3
;
}
}
...
...
@@ -257,14 +256,13 @@ ulong hp_rec_hashnr(register HP_KEYDEF *keydef, register const byte *rec)
}
if
(
seg
->
type
==
HA_KEYTYPE_TEXT
)
{
if
(
default_charset_info
->
hash_sort
)
default_charset_info
->
hash_sort
(
default_charset_info
,
pos
,
end
-
pos
,
&
nr
,
&
nr2
);
if
(
seg
->
charset
->
hash_sort
)
seg
->
charset
->
hash_sort
(
seg
->
charset
,
pos
,
end
-
pos
,
&
nr
,
&
nr2
);
else
for
(;
pos
<
end
;
pos
++
)
{
nr
^=
(
ulong
)
((((
uint
)
nr
&
63
)
+
nr2
)
*
((
uint
)
default_charset_info
->
sort_order
[(
uint
)
*
pos
]))
+
(
nr
<<
8
);
((
uint
)
seg
->
charset
->
sort_order
[(
uint
)
*
pos
]))
+
(
nr
<<
8
);
nr2
+=
3
;
}
}
...
...
@@ -397,7 +395,7 @@ int hp_rec_key_cmp(HP_KEYDEF *keydef, const byte *rec1, const byte *rec2)
case
HA_KEYTYPE_END
:
return
0
;
case
HA_KEYTYPE_TEXT
:
if
(
my_sortcmp
(
default_charset_info
,
rec1
+
seg
->
start
,
rec2
+
seg
->
start
,
seg
->
length
))
if
(
my_sortcmp
(
seg
->
charset
,
rec1
+
seg
->
start
,
rec2
+
seg
->
start
,
seg
->
length
))
return
1
;
break
;
default:
...
...
@@ -428,12 +426,7 @@ int hp_key_cmp(HP_KEYDEF *keydef, const byte *rec, const byte *key)
}
if
(
seg
->
type
==
HA_KEYTYPE_TEXT
)
{
/*
BAR TODO: this will not use default_charset_info
I need Ram to apply his HEAP patches with
CHARSET_INFO field in HP segments
*/
if
(
my_sortcmp
(
default_charset_info
,
rec
+
seg
->
start
,
key
,
seg
->
length
))
if
(
my_sortcmp
(
seg
->
charset
,
rec
+
seg
->
start
,
key
,
seg
->
length
))
return
1
;
}
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