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
8dce8ecf
Commit
8dce8ecf
authored
Mar 01, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor cleanup
parent
45236704
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
21 deletions
+14
-21
strings/ctype-bin.c
strings/ctype-bin.c
+6
-9
strings/ctype-mb.c
strings/ctype-mb.c
+3
-5
strings/ctype-ucs2.c
strings/ctype-ucs2.c
+5
-7
No files found.
strings/ctype-bin.c
View file @
8dce8ecf
...
...
@@ -276,18 +276,17 @@ void my_hash_sort_8bit_bin(CHARSET_INFO *cs __attribute__((unused)),
const
uchar
*
key
,
size_t
len
,
ulong
*
nr1
,
ulong
*
nr2
)
{
const
uchar
*
pos
=
key
;
/*
Remove trailing spaces. We have to do this to be able to compare
'A ' and 'A' as identical
*/
key
=
skip_trailing_space
(
key
,
len
);
const
uchar
*
end
=
skip_trailing_space
(
key
,
len
);
for
(;
pos
<
(
uchar
*
)
key
;
pos
++
)
for
(;
key
<
end
;
key
++
)
{
nr1
[
0
]
^=
(
ulong
)
((((
uint
)
nr1
[
0
]
&
63
)
+
nr2
[
0
])
*
((
uint
)
*
pos
))
+
(
nr1
[
0
]
<<
8
);
((
uint
)
*
key
))
+
(
nr1
[
0
]
<<
8
);
nr2
[
0
]
+=
3
;
}
}
...
...
@@ -296,14 +295,12 @@ void my_hash_sort_8bit_bin(CHARSET_INFO *cs __attribute__((unused)),
void
my_hash_sort_bin
(
CHARSET_INFO
*
cs
__attribute__
((
unused
)),
const
uchar
*
key
,
size_t
len
,
ulong
*
nr1
,
ulong
*
nr2
)
{
const
uchar
*
pos
=
key
;
const
uchar
*
end
=
key
+
len
;
key
+=
len
;
for
(;
pos
<
(
uchar
*
)
key
;
pos
++
)
for
(;
key
<
end
;
key
++
)
{
nr1
[
0
]
^=
(
ulong
)
((((
uint
)
nr1
[
0
]
&
63
)
+
nr2
[
0
])
*
((
uint
)
*
pos
))
+
(
nr1
[
0
]
<<
8
);
((
uint
)
*
key
))
+
(
nr1
[
0
]
<<
8
);
nr2
[
0
]
+=
3
;
}
}
...
...
strings/ctype-mb.c
View file @
8dce8ecf
...
...
@@ -680,18 +680,16 @@ void
my_hash_sort_mb_bin
(
CHARSET_INFO
*
cs
__attribute__
((
unused
)),
const
uchar
*
key
,
size_t
len
,
ulong
*
nr1
,
ulong
*
nr2
)
{
const
uchar
*
pos
=
key
;
/*
Remove trailing spaces. We have to do this to be able to compare
'A ' and 'A' as identical
*/
key
=
skip_trailing_space
(
key
,
len
);
const
uchar
*
end
=
skip_trailing_space
(
key
,
len
);
for
(;
pos
<
(
uchar
*
)
key
;
pos
++
)
for
(;
key
<
end
;
key
++
)
{
nr1
[
0
]
^=
(
ulong
)
((((
uint
)
nr1
[
0
]
&
63
)
+
nr2
[
0
])
*
((
uint
)
*
pos
))
+
(
nr1
[
0
]
<<
8
);
((
uint
)
*
key
))
+
(
nr1
[
0
]
<<
8
);
nr2
[
0
]
+=
3
;
}
}
...
...
strings/ctype-ucs2.c
View file @
8dce8ecf
...
...
@@ -3311,17 +3311,15 @@ static
void
my_hash_sort_ucs2_bin
(
CHARSET_INFO
*
cs
__attribute__
((
unused
)),
const
uchar
*
key
,
size_t
len
,
ulong
*
nr1
,
ulong
*
nr2
)
{
const
uchar
*
pos
=
key
;
key
+=
len
;
const
uchar
*
end
=
key
+
len
;
while
(
key
>
pos
+
1
&&
key
[
-
1
]
==
' '
&&
key
[
-
2
]
==
'\0'
)
key
-=
2
;
while
(
end
>
key
+
1
&&
end
[
-
1
]
==
' '
&&
end
[
-
2
]
==
'\0'
)
end
-=
2
;
for
(;
pos
<
(
uchar
*
)
key
;
pos
++
)
for
(;
key
<
(
uchar
*
)
end
;
key
++
)
{
nr1
[
0
]
^=
(
ulong
)
((((
uint
)
nr1
[
0
]
&
63
)
+
nr2
[
0
])
*
((
uint
)
*
pos
))
+
(
nr1
[
0
]
<<
8
);
((
uint
)
*
key
))
+
(
nr1
[
0
]
<<
8
);
nr2
[
0
]
+=
3
;
}
}
...
...
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