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
4a77f335
Commit
4a77f335
authored
Jan 16, 2003
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
field.cc:
strnxfrm for binary and simple charsets
parent
4b9d29c8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
27 deletions
+8
-27
sql/field.cc
sql/field.cc
+8
-27
No files found.
sql/field.cc
View file @
4a77f335
...
@@ -4591,38 +4591,19 @@ void Field_blob::sort_string(char *to,uint length)
...
@@ -4591,38 +4591,19 @@ void Field_blob::sort_string(char *to,uint length)
{
{
char
*
blob
;
char
*
blob
;
uint
blob_length
=
get_length
();
uint
blob_length
=
get_length
();
#ifdef USE_STRCOLL
uint
blob_org_length
=
blob_length
;
#endif
if
(
!
blob_length
)
if
(
!
blob_length
)
bzero
(
to
,
length
);
bzero
(
to
,
length
);
else
else
{
{
if
(
blob_length
>
length
)
blob_length
=
length
;
memcpy_fixed
(
&
blob
,
ptr
+
packlength
,
sizeof
(
char
*
));
memcpy_fixed
(
&
blob
,
ptr
+
packlength
,
sizeof
(
char
*
));
if
(
binary
())
{
memcpy
(
to
,
blob
,
blob_length
);
to
+=
blob_length
;
}
else
{
#ifdef USE_STRCOLL
if
(
use_strnxfrm
(
field_charset
))
{
blob_length
=
my_strnxfrm
(
field_charset
,
blob_length
=
my_strnxfrm
(
field_charset
,
(
unsigned
char
*
)
to
,
length
,
(
unsigned
char
*
)
to
,
length
,
(
unsigned
char
*
)
blob
,
blob_org
_length
);
(
unsigned
char
*
)
blob
,
blob
_length
);
if
(
blob_length
>=
length
)
if
(
blob_length
>=
length
)
return
;
return
;
to
+=
blob_length
;
to
+=
blob_length
;
}
else
#endif
for
(
char
*
end
=
blob
+
blob_length
;
blob
!=
end
;)
*
to
++=
(
char
)
field_charset
->
sort_order
[(
uint
)
(
uchar
)
*
blob
++
];
}
bzero
(
to
,
length
-
blob_length
);
bzero
(
to
,
length
-
blob_length
);
}
}
}
}
...
...
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